قQabasAPI Docs
Errors and rate limits

What failed, and what to do next.

Start with the status number. It tells you whether to fix the request, check the key or try again later.

Plain-English error guide

StatusWhat it usually meansWhat to do
400The request is missing a field or uses the wrong format.Read the message and fix the request. Do not retry unchanged.
401The key is missing, malformed, expired or invalid.Check the Bearer header and use the key checker.
403The key is valid but does not have access.Check the model and the permissions attached to the key.
404The address or model name was not found.Check the base URL, endpoint and model spelling.
429The key has reached a limit or budget.Wait, reduce request volume, or review the key's limits.
500 / 502 / 503The service had a temporary problem.Retry a small number of times with a growing delay.
Check a secret key without code

Retry only temporary errors

Retry 429 and most 5xx responses. Do not repeatedly retry a broken request or bad key.

TypeScript
async function callQabas(body, attempts = 3) {
  for (let attempt = 1; attempt <= attempts; attempt++) {
    const response = await fetch("https://api.qabas.ae/v1/chat/completions", {
      method: "POST",
      headers: {
        "Authorization": "Bearer " + process.env.QABAS_API_KEY,
        "Content-Type": "application/json",
      },
      body: JSON.stringify(body),
    });

    if (response.ok) return response.json();
    if (![429, 500, 502, 503].includes(response.status) || attempt === attempts) {
      throw new Error(await response.text());
    }

    await new Promise(resolve => setTimeout(resolve, 500 * 2 ** (attempt - 1)));
  }
}

Rate limits are not published yet

Qabas is still measuring the safe request and token capacity of the first shared model. We will publish exact limits before selling a plan that depends on them.

  • Limits may be attached to a key, team or future plan.
  • A 429 response means the current limit or budget has been reached.
  • Final docs will show requests per minute, tokens per minute and burst behaviour.