Raon
Meet Raon-1 nano (E1.5B), smaller and faster!View on Hugging Face (new tab)
Docs

Errors

Error statuses and shapes, which ones to retry, and how long a request can take.

Error shape

Gateway-generated errors follow each API's own format. Chat Completions, Responses and GET /v1/models return:

{
  "error": {
    "message": "Incorrect API key provided.",
    "type": "authentication_error",
    "param": null,
    "code": "invalid_api_key"
  }
}

For errors generated by the gateway, Messages returns the Anthropic format, which has type but no code:

{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "Incorrect API key provided."
  }
}

The SDKs turn these into exceptions, such as openai.AuthenticationError and anthropic.RateLimitError.

Requests the model server refuses are relayed with its status and an OpenAI-style body, on Messages too. For example, a Messages request whose input is too long receives HTTP 400 with error.type: "invalid_request_error" and error.code: "context_length_exceeded", without a top-level type. A model server failure (5xx other than 504) becomes 502 upstream_error. An unexpected internal failure can also use an OpenAI-style envelope. Inspect the HTTP status and full error body rather than assuming every Messages error has the shape above.

Status codes

StatuscodeCauseRetry?
400invalid_requestThe body is not valid JSON, misses a required field, uses a refused feature, or sets a reasoning effort outside the levels the model accepts (none, low, medium, high, xhigh, max).No. Fix the request.
400unsupported_toolA tool Raon does not run, such as code_interpreter.No
400token_limit_exceededOne request exceeds a per-minute token limit.No
400context_length_exceededThe input and max_tokens together exceed the context window.No. Shorten the input.
401invalid_api_keyThe key is missing, wrong, disabled or expired.No
402insufficient_credit, spend_limit_exceededNo credit left, or the monthly spend limit is reached.No
403model_not_allowedThe model ID is wrong, or your key cannot use that model.No
403organization_inactiveYour organization is suspended or closed.No
404—The path is not served, often a base URL with a missing or doubled /v1.No
411length_requiredThe body was sent in chunks without Content-Length.No. Send a buffered JSON body.
413payload_too_largeThe body is over 28 MiB.No
429rate_limit_exceeded, overloadedSee Rate limits.Yes, after retry-after
500—An error inside Raon.Yes, with backoff
502upstream_errorThe model server failed or did not answer in time.Yes, with backoff
503service_unavailableRaon could not check your key or its limits right now.Yes, after retry-after (2 seconds)
504timeoutA non-streaming request ran longer than 5 minutes.No. Send it with streaming.

Retry with growing waits, and stop after a few attempts. Do not retry 4xx errors other than 429; the same request fails the same way. The same holds for 504: send the request again with streaming instead.

The model is free for a limited time. A 402 still indicates an organization's credit or spend-limit check; if you get one, contact us at raon.krafton.ai@krafton.com.

A 403 organization_inactive means your organization has been suspended or closed, so every key in it is refused. A suspended organization works again once it is resumed; a closed one stays closed. Contact us at raon.krafton.ai@krafton.com. On the Messages API, which has no code, both 403 errors have the type permission_error; the message This organization is not active. identifies this one.

Errors during a stream

A streamed response has already sent 200 when it starts, so an error after that arrives as an event in the stream:

APIError event
Chat Completionsa data: line holding {"error": {...}}
Responsesevent: error
Messagesevent: error, in the Anthropic format

The SDKs raise these as exceptions while you iterate. Text received before the error is incomplete; send the request again if you need the whole answer.

Timeouts

Reasoning and web search can make an answer take minutes. How long a request may run depends on whether it streams:

  • A non-streaming request that runs longer than 5 minutes may be cut off with an HTTP 504 timeout error. Use non-streaming only for work that finishes within 5 minutes.
  • A streamed response stays open for up to an hour as long as data keeps arriving, so stream anything that may take longer. A server deployment can still end a stream earlier; if the connection drops, send the request again. Streaming also shows progress sooner. When the model is silent for 10 seconds, for example during a web search, Raon sends a : ping comment line to keep data flowing; SSE clients skip it.

Set your client's timeouts to match:

  • For non-streaming requests, allow more than 5 minutes. The OpenAI and Anthropic SDKs wait 10 minutes by default, which is enough.
  • For streams, do not cap the total duration; limit only how long the client waits between pieces of data (the read timeout). The first data can take several minutes to arrive, so set the read timeout to at least 5 minutes. The OpenAI and Anthropic Python SDKs apply their 10-minute default to each read, so their defaults work as they are.

Also note:

  • If your client disconnects, Raon stops the request.
  • Requests must state their size in Content-Length. The SDKs and curl do; a chunked upload without it returns 411.

Reporting a problem

Include the request time, the response's x-request-id header, status code, and error body. Raon generates this tracking UUID for each request, including streamed responses. A client-supplied x-request-id does not override it.

On this page