ドキュメント

Troubleshooting

Common errors, causes, and fixes during integration and API calls.

Authentication errors

Error messageHTTP statusCauseSolution
invalid api key401API key is invalid, expired, revoked, or disabledOpen Console → Token Management and confirm the token is active; recreate and copy the full sk-… key if expired
invalid_api_key401Missing Authorization header or incorrect Bearer token formatUse Authorization: Bearer `API_KEY` with a single space after Bearer
forbidden403Token is not allowed to access this model or endpointCheck model permissions and group on the token; confirm the model is enabled for that token

Routing and model errors

Error messageHTTP statusCauseSolution
no model config found for: {model}404Requested model ID does not exist or is not configured on the gatewayVerify the model name in the model list; call GET /v1/models for available models
model field is required400Request body is missing the model fieldAdd "model": "gpt-4o" (or another valid model ID) to the JSON body
invalid or empty requested model400model is empty or malformedUse a non-empty string that exactly matches the console model ID (case-sensitive)
unknown api path404Wrong API path or Base URLOpenAI-compatible Base URL should be ; chat path is /chat/completions

Request parameter errors

Error messageHTTP statusCauseSolution
invalid_request_error400Invalid JSON or wrong field typesSet Content-Type: application/json; compare fields with the API reference
messages field is required400Chat Completions request is missing the messages arrayAdd messages: [{"role": "user", "content": "..."}]
max_tokens not supported400Some newer models do not support max_tokensUse max_completion_tokens instead, or check the model docs for supported fields
prompt is required400Video/image request is missing prompt or other required fieldsFill model, prompt, and other required fields per the video/image API reference

Quota and rate-limit errors

Error messageHTTP statusCauseSolution
rate_limit_exceeded429Request rate exceeds token or account limitsLower concurrency and QPS; use exponential backoff; adjust token rate limits in the console if needed
quota exceeded429Daily or monthly token quota is exhaustedCheck remaining quota on the token; ask an admin to raise limits or wait for reset
too many requests429Upstream channel or gateway is temporarily overloadedRetry after a few seconds; avoid burst traffic; use async queues where possible

Billing and balance errors

Error messageHTTP statusCauseSolution
insufficient balance402Account balance is too low to charge the requestTop up in Console → Wallet; pay-as-you-go models need enough balance for the estimated cost
insufficient_quota402Wallet quota is insufficientReview usage records and wallet balance; per-call models need remaining call credits
billing hard limit reached403Account or token hit a spending hard capRaise the spending cap in the console or ask an admin to increase limits

Server errors

Error messageHTTP statusCauseSolution
server_error500Internal gateway or upstream failureRetry later; if it persists, note request time and model, then contact us
upstream error502Upstream model service is down or timed outSwitch model or channel; for async jobs, poll task status later
service unavailable503Maintenance or channel temporarily offlineCheck site announcements; retry later or use another model
timeout504Request timed out (common for long video/large image jobs)Use async video APIs and poll status; reduce prompt complexity or resolution

Common scenarios

Base URL mistakes

❌ https://token.easyapi.com/chat/completions
✅ /chat/completions          # OpenAI-compatible chat
✅ /v1/messages               # Claude native (Anthropic-compatible)

max_tokens not supported

❌ {"model": "gpt-4o", "max_tokens": 100}
✅ {"model": "gpt-4o", "max_completion_tokens": 100}  # required on some newer models

API key format

❌ Authorization: sk-xxxxxxxx
✅ Authorization: Bearer sk-xxxxxxxxxxxxxxxx   # Bearer prefix and space required

Use async flow for video

❌ Waiting on POST /v1/chat/completions for video (likely timeout)
✅ POST /videos → poll GET /v1/videos/ → download content or video_url

Still stuck?

Submit a ticket via Contact us with request time, model ID, and the error response (never share your full API key). See also Error codes and Usage records for billing and rate-limit issues.