Skip to main content

Documentation Index

Fetch the complete documentation index at: https://sunbirdai.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Sunbird AI API uses standard HTTP status codes to indicate the success or failure of a request.

Common Error Codes

Status CodeErrorDescription
200OKThe request was successful.
201CreatedThe resource was successfully created (e.g., user registration).
400Bad RequestThe request was malformed or invalid.
401UnauthorizedAuthentication failed. Check your access token.
403ForbiddenYou do not have permission to access this resource.
413Payload Too LargeThe file uploaded exceeds the size limit (100MB).
422Validation ErrorThe request parameters failed validation.
429Too Many RequestsYou have exceeded the rate limit.
500Internal Server ErrorAn unexpected error occurred on the server.
503Service UnavailableThe service is temporarily unavailable (e.g., model timeout).

Handling Validation Errors (422)

A 422 error usually means you are missing a required field or provided an invalid value. The response body will contain details about what failed.
{
  "detail": [
    {
      "loc": ["body", "source_language"],
      "msg": "field required",
      "type": "value_error.missing"
    }
  ]
}

Handling Timeouts (503)

AI models can sometimes be slow or overloaded. If you receive a 503 error, it often means the model timed out. Recommendation: Implement an exponential backoff retry strategy. Wait a few seconds and try again.

Handling Large Files (413)

If you get a 413 error when uploading audio, your file is too large. Use the Upload URL workflow instead of direct upload.