API v1 preview

# The Error object

The error code, message and field details returned by every failed request.

## Fields

`code` string · required

Machine-readable error code. HTTP errors use a value from ErrorCode. Branch on this value; handle unknown codes by HTTP status.

`message` string · required

Human-readable explanation. Wording can vary; do not branch on it.

`details` array · optional

**details item fields**

`field` string · required

Request body, query or header field path, e.g. items[0].model_id or Idempotency-Key.

`message` string · required

Example

JSON

```
{
  "code": "preview_unavailable",
  "message": "A preview could not be prepared from this model."
}
```

API v1 preview

Source: https://ottomfg.com/docs/error-object
