For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inBook a demo
DocsReferenceChangelog
DocsReferenceChangelog
  • Introduction
    • SDKs
    • Errors
  • Humanloop API
LogoLogo
Sign inBook a demo
On this page
  • HTTP error codes
  • Error details
Introduction

Errors

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.
Was this page helpful?
Previous

Humanloop API

Next
Built with

HTTP error codes

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

400 Bad request

Your request was improperly formatted or presented.

401 Authentication issue

Your request was improperly formatted or presented.

400 Bad request

Your API key is incorrect or missing, or your user does not have the rights to access the relevant resource.

404 Not found

The requested resource could not be located.

422 Unprocessable entity

Your request was properly formatted but contained invalid instructions or did not match the fields required by the endpoint.

429 Rate limit reached

You’ve exceeded the maximum allowed number of requests in a given time period.

500 Unknown exception

An unexpected issue occurred on the server.

503 Service unavailable

The service is temporarily overloaded and you should try again.

Error details

Our /chat and /completion endpoints act as a unified interface across all popular model providers. The error returned by these endpoints 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}