In the event an issue occurs with our system, or with one of the model providers we integrate with, our API will raise a predictable and interpretable error.

HTTP error codes

Our API will return one of the following HTTP error codes in the event of an issue:

Error details

Our prompt/call endpoint acts as a unified interface across all popular model providers. The error returned by this endpoint may be raised by the model provider’s system. Details of the error are returned in the detail object of the response.

1{
2 "type": "unprocessable_entity_error",
3 "message": "This model's maximum context length is 4097 tokens. However, you requested 10000012 tokens (12 in the messages, 10000000 in the completion). Please reduce the length of the messages or completion.",
4 "code": 422,
5 "origin": "OpenAI"
6}