We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Troubleshooting

Account

Troubleshooting

Fixes for common api14 problems: authentication failures, empty balance, model access, rate limits, timeouts, streaming issues, CORS and base URL mistakes.

Most problems show up as an HTTP status and a code in the error body. Find the code below; Errors has the full list. Failed requests (any 4xx or 5xx) are never charged.

{ "error": { "message": "...", "type": "authentication_error", "code": "invalid_api_key" } }

401 invalid_api_key

The key is missing, malformed or revoked.

  • Send it as Authorization: Bearer sk-api14-.... The OpenAI SDKs do this from apiKey / api_key; with curl, check that $API14_API_KEY is actually set in the shell you run it from (echo ${API14_API_KEY:0:9} should print sk-api14-).
  • Watch for stray quotes or newlines when the key comes from a .env file.
  • An OPENAI_API_KEY left in the environment can override the key you meant to use. Pass the key explicitly to rule this out.
  • A revoked key fails immediately. Keys are shown only once, so if you lost one, create a new key in API keys and revoke the old one.

See Authentication.

402 insufficient_balance

Your USD balance is $0, or (for video) below the estimated cost of the job. Requests stay blocked until you add funds, retrying does not help.

  • Check the balance with GET /credits or in Billing. See Balance & key info.
  • Add funds or enable auto top-up. Plans add included usage to the same balance every month. See Pricing & billing.
  • In long-running jobs, treat this code as fatal and stop, instead of letting the SDK's retries spin.

403 model_not_allowed or plan_required

  • model_not_allowed: the key has a model allowlist that does not include this model id. Edit the key's allowlist in API keys, or use a key without one. Variant suffixes count: check that the exact id you send is allowed.
  • plan_required: your plan does not include this model category. Standard plans cover every category; check your plan on the pricing page.

404 model_not_found or not_found

  • model_not_found: the model id is unknown, disabled or removed. Ids include the provider prefix: openai/gpt-5-mini, not gpt-5-mini. Look up the exact id with GET /models or GET /models/{id} (no key needed). See Model ids & variants.
  • not_found: the path does not exist, or the video job or generation id is not yours. This usually means a wrong base URL (see below). A Generation lookup right after a request can also return 404 for a few seconds until the record appears.

Wrong base URL

The base URL is exactly:

https://api14.com/api/v1

Common mistakes:

You setResult
https://api14.com/v1 or https://api14.comRequests hit the website, not the API: HTML responses, 404s, or CORS errors in the browser.
https://api14.com/api/v1/chat/completions as the baseThe SDK appends the path again. Set only the base.
https://api.openai.com/v1 (the default)Your api14 key is rejected by OpenAI. Set the base URL in code or with OPENAI_BASE_URL.

Library quirks: ruby-openai adds v1 itself, so its uri_base is https://api14.com/api (Ruby); openai-go expects a trailing slash, https://api14.com/api/v1/ (Go).

429 rate_limited

You exceeded the requests-per-minute limit of your key or plan (Free 5, Pro 100, Team 3,000, Enterprise 3,000+). The response includes Retry-After: 60.

  • Wait for Retry-After and retry with exponential backoff and jitter. The official OpenAI SDKs already do this (two retries by default; raise maxRetries / max_retries).
  • For bulk work, pace requests instead of firing them all at once, and put several items in one request. See Guide: batch processing.
  • A 429 can also come from the upstream provider, especially on :free variants. Use model fallbacks or provider routing to spread the load.

429 daily_limit_reached

The key hit its daily USD spend limit. Retrying does not help until the next UTC day. Raise or remove the limit in API keys if the traffic is expected. Make sure your retry logic distinguishes this code from rate_limited, otherwise jobs keep retrying for nothing. See Rate limits.

Timeouts

Large models, reasoning models and long outputs can take minutes.

  • Check your client timeout. The Node and Python SDKs default to 10 minutes; other HTTP clients often use shorter defaults.
  • Stream long generations. Tokens start arriving within seconds, and idle-connection timeouts in proxies and load balancers stop being a problem. See Streaming.
  • Set max_tokens and, for reasoning models, a lower reasoning effort.
  • If you relay requests through your own server, its proxy timeouts (for example nginx proxy_read_timeout, which defaults to 60 seconds) apply too.
  • A timeout on your side does not cancel the upstream generation, which may still be billed. Use Generation lookup with the request id to check.

Streaming disconnects or stops early

  • Check finish_reason on the last chunk. "length" means max_tokens was reached; "error" means the provider failed mid-stream, and the chunk carries an error object. Retry, or add fallbacks.
  • Proxies and serverless platforms sometimes buffer or cut SSE responses. Disable buffering (X-Accel-Buffering: no on nginx) and check the platform's maximum response duration.
  • If you parse the stream yourself, ignore comment lines starting with : (keep-alives) and stop at data: [DONE].
  • Closing the connection early does not cancel the bill: the provider may finish the generation anyway.

CORS errors and browser apps

Never put an API key in browser or mobile code. Anyone can read it from the page and spend your balance. Call api14 from your own backend and expose only your own endpoint to the browser:

// server.js (Node / Express)
app.post("/api/chat", async (req, res) => {
  const stream = await client.chat.completions.create({
    model: "openai/gpt-5-mini",
    messages: req.body.messages, // validate and limit this input
    stream: true,
  });
  for await (const chunk of stream) res.write(chunk.choices[0]?.delta?.content ?? "");
  res.end();
});

A CORS error in the browser during development is usually a wrong base URL (the request reached the website instead of the API) or a custom request header that the API's preflight does not allow; moving the call to your server solves both.

SDK version issues

  • Python openai below 1.0 uses openai.ChatCompletion.create and openai.api_base. Upgrade with pip install -U openai and use the OpenAI(base_url=..., api_key=...) client.
  • chat.completions.parse missing: older 1.x/4.x releases only have client.beta.chat.completions.parse. Upgrade the package.
  • Unknown parameter errors from the SDK for gateway fields (provider, models, reasoning, plugins): pass them with extra_body in Python, or the equivalent extra-body option in other SDKs. See OpenAI SDK compatibility.
  • Upstream 400 with a provider message: the parameter is not supported by that model or provider. Check the model's supported_parameters in Models, or add provider: { "require_parameters": true }.