Aller au contenu principal
Velqa

Velqa.dev API error codes and how to fix them

A rundown of the HTTP errors returned by the OpenAI-compatible API https://api.velqa.dev/v1, their most common cause and the fix to apply. Every error response contains a JSON error object with an explicit message.

Error table

CodeMeaningCommon causeFix
401UnauthorizedMissing, invalid or revoked key; malformed headerCheck the Authorization: Bearer sk-... header. Create a new key in API keys if it was revoked.
402Payment RequiredInsufficient balance / budget: the key's monthly budget is exhausted, or the Boost balance is zero (audio, image, TTS)Top up your balance or raise the key's budget. See Boost fallback and Rate limits.
403ForbiddenModel not allowed for your key or plan (e.g. kimi-k2.6 on Starter, or a Boost-only model with no balance)Check availability per plan in Models. Upgrade your plan or use Recharge Boost.
400Bad RequestInvalid parameters: malformed JSON, missing field, out-of-range n or size (images), unknown voice (TTS)Fix the request. For images: n ≤ 4, size1024x1024.
429Too Many RequestsThroughput exceeded (RPM/TPM) or context too large ("Too many tokens requested")Retry with backoff. If it's the context, lower the context window in your tool — see opencode. Details: Rate limits.
404Not FoundModel identifier does not exist or is misspelledUse an exact model_id from the Models catalog. IDs are stable (e.g. kimi-k2.6, not kimi-k2).

Best practices

  • Always read the error.message field: it states the exact cause (model, parameter, or limit involved).
  • Handle 429 with exponential backoff; handle 402 by monitoring your balance upfront.
  • A 429 "Too many tokens requested" is not a throughput problem but a context size one: cap your agent's context window.

See also