Inference API
Handle errors
Interpret authentication, policy, capacity and backend failures without losing the request trace.
Retry deliberately
Correct request, authentication or permission errors before retrying. For a 429, honor Retry-After when the response includes it and limit retries. For transient 5xx failures, use exponential backoff with a maximum attempt count.
- 401: missing or invalid API key.
- 403: account policy or LLM Firewall decision.
- 404: unknown serving name or resource.
- 409: resource state does not allow the operation.
- 429: request or capacity limit.
Keep the request id
If the response includes a request identifier, record it with the time, endpoint and HTTP status for support. Avoid sharing keys and sensitive content.
Responses with persistence disabled
With persistence disabled, Responses rejects store: true and previous_response_id. For a stateless request, send store: false without previous_response_id and manage history in your application; you can also use Chat Completions.
API example
Include HTTP headers to inspect the status and Retry-After when returned.
Set QDIV0_API_KEY to an account tk_ key or personal uk_ key. A personal key uses its default account unless you select another with X-Account-ID.
1curl --fail-with-body \
2 --include \
3 "https://api.qdiv0.com/v1/models" \
4 -H "Authorization: Bearer $QDIV0_API_KEY"