Version: 2026-09-04
QVeris Model Gateway exposes an OpenAI-compatible model API. Use your QVeris API key for authentication and settle successful calls against your Credits.
| Usage | URL |
|---|---|
| Service endpoint | https://aigateway.qveris.ai |
| OpenAI-compatible model API prefix | https://aigateway.qveris.ai/v1 |
Model endpoints start with /v1, for example
https://aigateway.qveris.ai/v1/chat/completions.
sk-) in
Account → API Keys.export QVERIS_API_KEY='sk-your-key'
curl -sS https://aigateway.qveris.ai/v1/models \
-H "Authorization: Bearer $QVERIS_API_KEY"
The data[].id values returned by GET /v1/models are the public model IDs to
use in calls. Always trust the live model list instead of hard-coding upstream
provider model names.
curl -sS https://aigateway.qveris.ai/v1/chat/completions \
-H "Authorization: Bearer $QVERIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [
{"role": "user", "content": "Introduce yourself in one sentence."}
],
"max_tokens": 64
}'
The response follows the standard OpenAI Chat Completions structure and also
includes qveris_billing settlement information (see Billing).
For streaming, send "stream": true. After the request finishes, the gateway
appends an event: qveris.billing event immediately before data: [DONE].
| Endpoint | Purpose |
|---|---|
POST /v1/responses | OpenAI Responses API |
POST /v1/embeddings | Embeddings-capable models listed under GET /v1/models |
POST /v1/messages | Anthropic-compatible clients (point ANTHROPIC_BASE_URL at https://aigateway.qveris.ai) |
Only call an endpoint with a model whose capabilities in GET /v1/models
support it.
Every /v1/* request must include:
Authorization: Bearer <QVeris API key>
| Header | Required | Description |
|---|---|---|
Authorization | Yes | QVeris API key (sk- prefix) |
Content-Type | POST | Usually application/json |
X-Request-ID | No | Custom request ID, up to 128 characters |
X-Qveris-Source | No | Call source label such as playground or api |
Save the X-QVeris-Call-ID response header from every call. It is the
cross-reference ID for audit, billing, and support.
A successful non-streaming response includes qveris_billing:
{
"qveris_billing": {
"call_id": "d2ea8e43-dbb1-4846-ba1c-2acac1abadad",
"credits_charged": 0.025,
"cost_usd": 0.00005082,
"credits_per_usd": 500,
"usage_estimated": false,
"pricing": {
"mode": "expression",
"prompt_usd_per_million_tokens": 0.22,
"completion_usd_per_million_tokens": 0.66
}
}
}
Key points:
1 USD = 500 Credits.credits_charged is the actual Credits deducted and may differ slightly from
the theoretical value because of minimum precision.usage_estimated=true means the upstream usage was incomplete and the gateway
settled with a conservative estimate.Gateway errors use a uniform envelope:
{
"error": {
"message": "the requested model is not available",
"type": "gateway_error",
"code": "model_not_found"
}
}
| HTTP | error.code | Meaning | Charged |
|---|---|---|---|
| 400 | invalid_request | Invalid JSON | No |
| 401 | invalid_api_key | Missing, invalid, or revoked key | No |
| 402 | insufficient_credits | Not enough Credits | No |
| 404 | model_not_found | Model ID does not exist or is disabled | No |
| 413 | request_too_large | Request body exceeds limits | No |
| 422 | unsupported_model_capability | Model does not support the endpoint | No |
| 429 | rate_limit_exceeded | Rate limit reached; respect Retry-After | No |
| 503 | all_routes_unavailable | Model routes are temporarily unavailable | No |
id returned by GET /v1/models.Retry-After response header and lower
concurrency.X-QVeris-Call-ID response header and
share it with the support team.Was this page helpful?