Notice: Kling 4.0 is here: text-to-video and image-to-video are 20% off for a limited time. Try it now
HiAPI
Tutorials
On this page

Common errors

Errors any agent tool may hit when connecting to HiAPI, and how to fix them.

Each tool guide only lists errors specific to that tool. These can happen with any tool. Check the status code or keyword in the error first, then look it up in the table below:

ErrorCauseFix
401 / invalid api keyThe key is incomplete, has spaces before or after, or you copied the masked display valueGo to API Keys, click the copy icon, and copy the full HiAPI API key again
The error mentions balance, quota, or a spending limitThe account balance is too low, or this key’s spending limit is used upTop up at Account balance, or raise this key’s spending limit on the API Keys page
403This key has no permission for the modelCheck the key’s group and permissions, see Authentication
404 / model not availableThe base URL has an extra or missing /v1, or the model name is misspelledCheck the URL against Base URL & protocols; copy the model name from the text model list
400 does not support this endpointThe tool’s selected protocol is not supported by this modelTry another protocol (for example, use Anthropic Messages for Claude), or switch to another model
400 stream must be true / spinning foreverThe model is streaming-only and the tool sent a non-streaming requestTurn on streaming in the tool. If the tool’s “Check” or “Test connection” button returns this error, ignore it and go by an actual chat
429Too many requests or too much concurrencyWait and retry, and run fewer tasks at once; if the error mentions a quota, follow the “balance, quota” row above
500 / 502 / 503The model service failed temporarilyWait a minute or two and retry; if it keeps happening, try another model first, then contact us
Timeout / interrupted responseThe network or a proxy blocked the long-lived connectionCheck network and proxy rules for api.hiapi.ai, then retry

Check the request log before retrying

An agent task may already have finished on the server, with only the tool’s connection dropped. Before retrying, check Request logs to see whether this request succeeded and how much it cost, so you don’t pay twice for the same work.

Still stuck

Submit a ticket at Contact us with the information below; it helps us locate the issue faster:

  • The time of the error (to the minute)
  • The tool and version you used, for example Claude Code 2.1.284
  • The model name and base URL
  • The original error text or a screenshot

Mask the API key before taking a screenshot, and never send the key to anyone, including support.