APIDocs
/v1/messagesaccepts mid-conversationrole: "system"messages with text content. Claude Code sends them on its first request.- A provider failure inside a stream, before any content, moves the request to another provider. If every attempt fails, you get the generic
503. - A provider’s rejection inside a stream arrives as
400 invalid_request_errorwithUpstream returned an error:in front of its text. - NagaAI no longer returns
502. A request no provider could serve returns503. - Image, audio, embedding and moderation endpoints report provider errors like the chat endpoints: a generic
503,400withUpstream returned an error:, or400withRequest rejected by upstream content moderation.(was403 inappropriate_content). /v1/messagesuses Anthropic error types by status:authentication_error,billing_error,not_found_error,rate_limit_error.- A
function_call_outputwithout itsfunction_callfails with400 tool_output_unmatched. Alanguagethat is not an ISO 639-1 code fails with400on transcriptions.daysoutside 1 to 30 on/v1/account/activityfails with400instead of500. /v1/modelsno longer listsweb_search_options,functions,function_call,logit_bias,logprobsorpredictioninsupported_parameters: NagaAI does not pass them to any provider.json_objectworks without the word “json” in the prompt.- Responses output lists reasoning before the answer.
/v1/responsescarries Codex CLI’s tool formats: freeform tools such asapply_patch, MCP tools grouped by namespace, and the compact tool list ofgpt-6-*andgpt-5.6-*.- The API reference documents the
x-naga-routing-strategyrequest and response header. - An unknown
default_routing_strategyinPOSTorPATCH /v1/account/keysnow fails with400instead of500. The response toPOST /v1/account/keysincludesdefault_routing_strategy. - This documentation was rewritten against the current API. New pages: Routing, Differences from OpenAI and Anthropic, Limits.
Billing
- Crypto top-ups go through CoinGate: BTC, ETH, USDC, SOL and other coins. USDT is not accepted there.
- The legacy crypto method with USDT and 200+ coins stays available to accounts that have paid $1,000 or more in total.
Billing
- Card and PayPal payments add credits only when the payment completes. A refund or chargeback removes the credits it paid for.
- Bank debit methods such as SEPA are no longer offered at checkout.
APIRouting
- Routing strategies:
reliability,balanced,latency,throughputandcache. Set one in theroutingbody field, thex-naga-routing-strategyheader or as a key default. Thex-naga-routing-strategyresponse header names the strategy NagaAI used. See Routing.
API
- NagaAI removes reasoning signatures issued by one provider before a request goes to another. Conversations with reasoning models no longer fail when the provider changes.
APIErrors
- Errors come in three kinds. A provider failure moves the request to another provider, and if all fail you get a generic
503or502. A provider’s content filter returns400withcode: "content_moderation". A provider’s refusal of a valid request returns400withUpstream returned an error:in front of its text. - NagaAI drops parameters a model does not list in
supported_parametersbefore the request reaches a provider. - A conversation with a tool call and no matching tool result fails with
400.
APIPricing
- An input the model cannot read, such as an image for a text-only model, fails with
400 unsupported_modalitybefore it reaches a provider. pricingin/v1/modelshas new units:per_input_audio_token,per_output_audio_token,per_input_audio_hour,per_output_audio_hour,per_output_text_token,per_input_text_characterandper_output_text_character.per_audio_tokenis gone.
Pricing
- NagaAI charges cached input tokens at
per_cached_input_tokenon every model that has the price. Before, some models charged them at zero.
API
- Every response from an API endpoint carries an
x-request-idheader. The same id identifies the request on the Logs page. - Response ids have the prefixes
chatcmpl-,resp_andmsg_, andmodelalways holds the catalog id. - A request body that stops arriving for 60 seconds, or takes longer than 15 minutes, fails with
408.
Models
dall-e-3anddall-e-3:freeleft the catalog after OpenAI retired them.
APILimits
- Request bodies are limited to 32 MiB and single inline files to 20 MiB. Larger requests fail with
413.
APIErrors
- Validation errors return
400 invalid_request_errorwith a textmessagesuch asbody.messages: .... - A model with no available provider returns
503withNo upstream available.
BillingLimits
- NagaAI does not charge a request that fails before its answer reaches you.
- A running paid request reserves 0.05 credits of the balance. A paid request with less than 0.05 credits left fails with
402. max_tokensin Chat Completions works as an alias ofmax_completion_tokens.
API
- Chat models that draw return images in all three chat formats:
message.imagesin Chat Completions,image_generation_callin Responses andimageblocks in Messages.
API
- Chat Completions and Responses accept audio input on models that support it.
API
reasoning_effortis moved to the nearest level a model supports instead of failing.
DashboardPrivacy
- Data logging (beta) on the Privacy page stores request and response bodies for 30 days and shows them in Logs.
API
/v1/modelsno longer hassupported_parameters_by_endpoint. Usesupported_parameters.