← Back to docs

Errors and retries

Diagnose failures with errors and request IDs.

HTTP 429 can mean local admission pressure, a full queue or upstream throttling. Read the error and Retry-After; it does not imply unlimited RPM or TPM.

Honor Retry-After and use bounded exponential backoff with jitter. Cap attempts and total time. For video jobs that may already exist, look up the job ID before submitting again.

Retain x-api-request-id when present and the failure time for investigation. Exclude API keys and sensitive payloads from reports.

Error code

HTTPError typeReason
400invalid_request_errorWrong JSON or missing parameters
401authentication_errorMissing key, wrong key or revoked key
402insufficient_balance
api_key_monthly_limit
outstanding_undercharge
Inspect error.type: insufficient_balance means remaining Credits are insufficient; api_key_monthly_limit means the key reached its monthly cap; outstanding_undercharge requires reconciling a prior call. Check Dashboard → Keys for key limits; buying credits does not raise key caps.
403model_not_allowedThis API key is not allowed to use the selected model. Check its model permissions in Dashboard → Keys or select an allowed model.
413request_too_largeThe body exceeds 2047 MB or the input exceeds a model/provider-specific limit. Read the message and reduce context, images or files; a body below the gateway limit can still receive 413.
429rate_limit_errorHTTP 429 can mean local admission pressure, a full queue or upstream throttling. Read the error and Retry-After; it does not imply unlimited RPM or TPM.
502api_errorUnable to connect model from upstream provider
503service_unavailableThe system is under maintenance

Balance errors may include required_vnd and available_vnd; key-cap errors may include limit_vnd and spent_vnd. Save these fields with the request ID for investigation, without sharing the API key.

{
  "type": "error",
  "error": {
    "type": "insufficient_balance",
    "message": "Balance exhausted. Buy credits at https://svnapi.com/dashboard/nap-vi"
  }
}

Troubleshooting

View model status in Pricing

Retain x-api-request-id when present and the failure time for investigation. Exclude API keys and sensitive payloads from reports.

Honor Retry-After and use bounded exponential backoff with jitter. Cap attempts and total time. For video jobs that may already exist, look up the job ID before submitting again.

SymptomCommon causesHow to handle
404 or “Not Found”Wrong base URL — extra or missing /v1 suffix.Anthropic-style tools use https://svnapi.com; OpenAI-style tools use https://svnapi.com/v1.
401 authentication_errorWrong key, revoked key, or the app is still using a saved old key.Create a new key in the dashboard, remove the old key from the app, then restart the app.
402 insufficient_balanceCredit balance is empty.Mua thêm credit tại trang Thanh toán & Gói.
429 rate_limit_errorHTTP 429 can mean local admission pressure, a full queue or upstream throttling. Read the error and Retry-After; it does not imply unlimited RPM or TPM.Honor Retry-After and use bounded exponential backoff with jitter. Cap attempts and total time. For video jobs that may already exist, look up the job ID before submitting again.
Claude Code keeps asking you to sign inThe machine still has an old Anthropic account session.Run /logout in Claude Code, set ANTHROPIC_AUTH_TOKEN, then reopen the terminal.
App says the model does not existWrong model name, or the app adds a provider prefix on its own.Call GET /v1/models for the exact names, and drop prefixes like anthropic/ unless the app requires them.
Image requests failThe app sends images in a format the model rejects, or the image is too large.Chỉ dùng model có nhãn Vision, nén ảnh và giữ toàn bộ yêu cầu dưới 2047 MB.
Environment variables have no effectAn old terminal still has stale values, or the app reads config from its own file.Open a new terminal (Windows: sign out/in), and check whether the app has a config file that overrides environment variables.

Examples receive source review and local checks; this does not establish compatibility with every app version. Check settings, send a small request and confirm usage before production use.

SupportTelegram groupWhatsApp