Skip to main content
These errors apply to requests sent to https://gateway.ngrok.ai with an access key. Every response carries the request’s ID in Ngrok-AIG-Request-Id, so quote that value when you contact support. See Response headers.

Request and routing errors

The gateway rejects these before it makes any upstream attempt, so the response carries no Ngrok-AIG-Attempts header and the request is not billed.

ERR_NGROK_27228

Message Invalid request: REASON HTTP Status 400 Bad Request Causes
  • The request body is not valid JSON
  • A required field is missing for the API surface you called
  • A field holds a value the surface does not accept
Solutions
  • Check the reason in the message for the offending field
  • Verify the body matches the API surface you posted to, whether Chat Completions, Responses, Messages, or the native Gemini surface

ERR_NGROK_27224

Message Unknown model “MODELID”.SUGGESTION HTTP Status 400 Bad Request Causes
  • The model ID is misspelled
  • The model is not in the model catalog and no custom provider defines it
Solutions
  • Check the suggestion in the message, which names the closest catalog match
  • Look the model up in the model catalog
  • Qualify the model with its provider, such as openai:gpt-4o. See Choose a model

ERR_NGROK_27225

Message Unknown provider “PROVIDERID”. HTTP Status 400 Bad Request Causes
  • The provider prefix is misspelled
  • The provider is a custom provider that does not exist on your account
Solutions

ERR_NGROK_27230

Message “MODEL” is not a known model, and “PROVIDER” is not a recognized provider. HTTP Status 400 Bad Request Causes
  • A provider-qualified model name whose prefix is neither a known provider nor part of a real model ID
Solutions
  • Use provider:model, with the provider exactly as the Providers API reports it
  • Drop the prefix to let the gateway resolve the model from the catalog

ERR_NGROK_27229

Message Invalid model address “ADDRESS”. HTTP Status 400 Bad Request Causes
  • The model field is empty, or holds more separators than provider:model allows
Solutions
  • Send either a bare model ID or a single provider:model pair

ERR_NGROK_27204

Message Unsupported API surface “PATH”. HTTP Status 400 Bad Request Causes
  • The request path is not one the gateway serves
Solutions
  • Post to /v1/chat/completions, /v1/responses, /v1/messages, /v1/decisions, /v1/systemone, /v1/files, the native Gemini path /v1beta/models/{model}:generateContent, or /v1beta/interactions
  • The gateway does not serve /v1/embeddings, /v1/completions, or image and audio endpoints
  • Point your SDK’s base URL at https://gateway.ngrok.ai/v1 rather than a full endpoint path

ERR_NGROK_27226

Message Provider “PROVIDERID” does not support API surface “SURFACE”. HTTP Status 400 Bad Request Causes
  • The provider has no equivalent of the surface you called, such as the Responses API on a provider that only serves Chat Completions
Solutions
  • Call the surface the provider supports. See the provider’s page under Getting Started With
  • Choose a different provider for that surface

ERR_NGROK_27205

Message API surface “SURFACE” is not implemented. HTTP Status 501 Not Implemented Causes
  • The gateway knows this endpoint but doesn’t support it yet
Solutions
  • Use a supported endpoint such as /v1/chat/completions. See ERR_NGROK_27204 for the full list

ERR_NGROK_27250

Message ngrok doesn’t store interactions yet, so “store” can’t be true. Omit it or set it to false to send a stateless request. HTTP Status 400 Bad Request Causes
  • An Interactions API request set store to true
Solutions

Access policy errors

ERR_NGROK_27231

Message Provider “PROVIDERID” is not allowed by the access policy. HTTP Status 403 Forbidden Causes
  • The access key’s configuration does not include the provider in its access scope
Solutions

ERR_NGROK_27232

Message Model “MODELID” is not allowed by the access policy. HTTP Status 403 Forbidden Causes
  • The configuration’s access scope excludes the model, even though the provider is allowed
Solutions

Credential and credit errors

ERR_NGROK_27201

Message Authentication failed: REASON HTTP Status 401 Unauthorized Causes
  • No access key in the request
  • The access key is malformed, revoked, or deleted
Solutions
  • Send your access key as Authorization: Bearer ng-xxxxx-g1-xxxxx, or as x-api-key on the Anthropic surface and X-Goog-Api-Key on the native Gemini surface
  • Confirm the key still exists with the Access Keys API

ERR_NGROK_27202

Message No keys available for provider “PROVIDERID”. HTTP Status 502 Bad Gateway Causes
  • The access key’s configuration has no routing credentials for the requested provider
  • Every provider key the configuration referenced was deleted
Solutions

ERR_NGROK_27206

Message Credit check failed: REASON HTTP Status 402 Payment Required Causes
  • The account’s credit balance is zero or below, or billing is not set up for the account yet
  • Every request needs credits, even with your own provider keys, because each one pays a small processing fee
Solutions

ERR_NGROK_27233

Message Model “MODELID” is not available with an ngrok-managed key for provider “PROVIDERID”: add your own provider key to use uncataloged models. HTTP Status 400 Bad Request Causes
  • The model isn’t in the ngrok.ai catalog, so ngrok.ai has no price for it
Solutions

ERR_NGROK_27239

Message ngrok can’t serve “MODELID” on provider “PROVIDERID” with an ngrok-managed key right now. Add your own provider key to use it. HTTP Status 503 Service Unavailable Causes
  • You can’t pay for this model with credits on that provider right now
Solutions

ERR_NGROK_27236

Message Model “MODELID” is not priced for managed billing yet for provider “PROVIDERID”; add your own provider key to use it. HTTP Status 400 Bad Request Causes
  • You can’t pay for this model with credits on that provider yet, because ngrok.ai doesn’t have a price for it
Solutions

ERR_NGROK_27238

Message An ngrok-managed key can’t serve this request, because ngrok can’t bill FEATURE for “MODELID” on provider “PROVIDERID”. Add your own provider key to use it. HTTP Status 400 Bad Request Causes
  • The request uses a feature, such as a hosted tool, that you can’t pay for with credits on that model
Solutions

ERR_NGROK_27249

Message ngrok doesn’t offer “MODELID” on provider “PROVIDERID” with an ngrok-managed key. Add your own provider key to use it. HTTP Status 400 Bad Request Causes
  • The model exists in the catalog, but you can’t pay for it with credits on that provider
Solutions

ERR_NGROK_27240

Message Your account has no FILES for provider “PROVIDERID”. An ngrok-managed key can only use files your account uploaded. Upload the file first, or add your own provider key. HTTP Status 404 Not Found Causes
  • The request uses a file that wasn’t uploaded from your account, so you can’t pay for it with credits
Solutions

Upstream failures

These arrive after the gateway tries at least one provider, so Ngrok-AIG-Attempts tells you how many tries the gateway made. See Handle gateway errors for the order it tries them in. When every model fails, or the request hits the 10-attempt cap, the gateway returns the last model’s error.

ERR_NGROK_27211

Message Upstream provider rejected the API key. HTTP Status 401 Unauthorized Causes
  • The provider key stored in ngrok is invalid, revoked, or rotated at the provider
Solutions

ERR_NGROK_27217

Message Upstream provider rate limit exceeded. HTTP Status 429 Too Many Requests Causes
  • Every credential and candidate the gateway tried was rate limited
Solutions
  • Attach more provider keys so the gateway has another credential to try
  • Add candidates from other providers. See Multi-provider failover
  • Slow your request rate, or raise your quota with the provider

ERR_NGROK_27207

Message Upstream request timed out. HTTP Status 504 Gateway Timeout Causes
  • A single upstream attempt exceeded the per-request timeout
Solutions
  • Raise the per-request timeout in Account Settings
  • Shorten the prompt, or choose a faster model

ERR_NGROK_3810

Message Request timed out after TIMEOUT. Try a shorter prompt or increase your timeout. HTTP Status 504 Gateway Timeout Causes
  • Every attempt together exceeded the total timeout
  • Too many slow candidates in the failover list
Solutions
  • Raise the total timeout in Account Settings
  • Lower the per-request timeout so a slow provider fails sooner and leaves budget for the next candidate
  • Reduce the number of failover candidates

ERR_NGROK_27227

Message No backend available: REASON HTTP Status 502 Bad Gateway Causes
  • None of the models in the request could be used, for example because the access key can’t reach them
  • With ngrok/auto, none of the models the key can reach are available for automatic selection. See Automatic model selection
Solutions
  • Confirm the configuration’s routing rules cover the provider you requested
  • See Handle gateway errors for the order the gateway tries models in

ERR_NGROK_27237

Message Request rejected: a routing loop was detected. Double check your custom provider URLs do not cause an infinite proxy loop. HTTP Status 502 Bad Gateway Causes
  • A custom provider’s base URL points back at the AI Gateway
Solutions

Limit errors

ERR_NGROK_3811

Message Input too large: INPUTTOKENS tokens (max MAXALLOWED). Shorten your prompt. HTTP Status 413 Payload Too Large Causes
  • The prompt and context exceed the account’s max input tokens
  • Very long conversation history, or large embedded content in messages
Solutions
  • Reduce the prompt length or conversation history
  • Raise or clear maxInputTokens in Account Settings
  • Count tokens client-side before sending

ERR_NGROK_AI_GATEWAY_REQUEST_BODY_TOO_LONG

Message Request body is too long. Max 32 MiB. HTTP Status 413 Payload Too Large Causes
  • The request body is larger than 32 MiB
Solutions
  • Upload large documents and images with the Files API instead of sending them inline
  • Reduce the conversation history or embedded content

Retired setup

ERR_NGROK_3820

Message
HTTP Status 403 Forbidden Causes
  • A Traffic Policy still contains the retired ai-gateway action
Solutions
  • Remove the ai-gateway action from the endpoint’s Traffic Policy
  • Send LLM traffic to https://gateway.ngrok.ai with an access key instead, and manage the gateway at app.ngrok.ai
  • Credits from the retired setup were migrated automatically. Email support@ngrok.com if your balance looks wrong

Other codes

The gateway returns one code per upstream status class, beyond the ones above. Each has a page under ngrok error codes:

SDK error handling

Handle ngrok errors in your SDK:

Next steps

Debug failed requests

Diagnose a failure from the response

Handle gateway errors

Which failures the gateway retries, and in what order