Heura Studios Docs
Log in Book a demo

The error shape, every status and code the API returns, and the rate limits behind them.

Errors use OpenAI’s shape, so SDKs raise them as they would OpenAI’s:

{
  "error": {
    "message": "Rate limit reached: up to 60 requests a minute per API key, 120 across one account's keys. Try again in a minute.",
    "type": "rate_limit_error",
    "param": null,
    "code": "rate_limit_exceeded"
  }
}

Status codes

StatuscodeMeaningWhat to do
400missing_required_parametermodel or messages is missing.Send both.
400invalid_valueA field is the wrong type or out of range, or the last message isn’t the user’s.Read message and param.
401invalid_api_keyNo key, or not a key Heura Studios knows.Use the model’s current key.
403plan_requiredThe model’s owner is on a plan without the API.The owner upgrades on the Plan page.
404model_not_foundmodel isn’t the id of this key’s model.Send the model’s id.
429rate_limit_exceededOver the requests-a-minute limit.Wait for Retry-After.
429daily_limit_reachedThe model’s answers for today are used.Try again tomorrow, or raise the cap.
429insufficient_quotaThe account is out of credits.The owner gets more on the Plan page.
429concurrency_limit_reachedThe model already has 4 answers in progress.Retry after Retry-After.
503warming_upHeura Arche is loading after a restart, about a minute.Retry after a minute.
503not_servingThe model has no Deploy in its pipeline.Add Deploy back.
503engine_unavailableThe model’s outside engine can’t answer right now.Check the connection.
503overloadedThe server has all the answers in progress it takes.Retry with backoff.

Every 429, and a 503 for a busy or warming server, carries a Retry-After header in seconds.

Rate limits

LimitValue
Requests per key60 a minute
Requests across an account’s keys120 a minute
Answers in progress per model4 at once
Messages per request200
Characters per message8,000

Answers also draw on the account’s credits, and a model can have a daily cap on answers, set in its settings.

Retrying well

  • Retry 429 and 503 with exponential backoff, and honor Retry-After when it’s there.
  • Don’t retry 400, 401, 403 or 404: the request needs changing.
  • A refused request takes no credit.