Velaron.AI

DocsAPI reference

Errors

Errors use the OpenAI shape on every endpoint but /v1/messages, which uses Anthropic's, so the client you already have shows them properly.

Error body
HTTP/1.1 402 Payment Required

{
  "error": {
    "message": "You are out of credits. Buy more on your Velaron.AI dashboard.",
    "type": "invalid_request_error",
    "code": "insufficient_credits"
  }
}

type is server_error for 5xx answers and invalid_request_error otherwise. code is the field to switch on.

Codes#

StatusCodeWhat happened
401invalid_api_keyThe key is missing, mistyped or revoked.
402insufficient_creditsThe balance is at zero, or cannot cover this call even with a shortened answer. The message says how many credits it needs.
400invalid_bodyThe JSON is missing what the endpoint needs, such as model and messages, or a video option the model does not offer.
400model_not_supportedThe model exists but is the wrong kind for the endpoint, such as an embedding model sent to chat.
404model_not_foundNo model of that id is on this server. GET /v1/models lists them.
400invalid_queryA from or to date on GET /v1/usage could not be parsed.
429rate_limit_exceededMore than 60 requests in a minute on one key.
499cancelledYou cancelled an image or video request before it finished. Nothing was charged.
502provider_unreachableThe AI provider, or its model list, could not be reached. You were not charged.
502provider_errorThe provider failed while making an image or video. You were not charged.
503provider_not_configuredThis server has no AI provider yet; only velaron/test answers. Images and video also need Vercel AI Gateway as the provider.

When the provider itself fails#

If the provider answers a chat, responses, messages or embeddings call with an error of its own, Velaron.AI relays that status and body to you unchanged and charges nothing. So a provider's 400 for a malformed tool schema, or its 429, reaches you exactly as the provider wrote it, wrapped only in CORS headers.

Anthropic shape#

/v1/messages answers { "type": "error", "error": { "type", "message", "code" } } with the Anthropic type derived from the status; the table on the Messages page maps them.