قQabasAPI Docs
Usage and costs

Know what every request used.

Every successful chat response includes token counts. Public per-token prices are still being finalised.

Three numbers explain the request

From the API response
"usage": {
  "prompt_tokens": 42,
  "completion_tokens": 18,
  "total_tokens": 60
}
Input tokens

Your instructions and conversation history.

Output tokens

The new answer generated by the model.

Total tokens

Input plus output for that request.

Save usage beside your own request record

For production, store the token count with the customer, feature or job that caused the request. Do not store the secret key in your logs.

TypeScript
const response = await client.chat.completions.create({
  model: "qwen-2.5-7b",
  messages: [{ role: "user", content: "Summarise this note." }],
});

console.log({
  inputTokens: response.usage?.prompt_tokens,
  outputTokens: response.usage?.completion_tokens,
  totalTokens: response.usage?.total_tokens,
});

The Qabas gateway also records usage for metering. A customer-facing usage view is being prepared.

Not published yet

Qabas pricing is being finalised

We will not invent a price just to fill this page. Before paid plans launch, this section will show:

  • the exact price for one million input tokens;
  • the exact price for one million output tokens;
  • worked examples in AED and USD;
  • included credits, budgets and overage rules;
  • whether tax is included.

Future cost formula: input tokens × input rate + output tokens × output rate.