Create a chat completion
POST/v1/chat/completions
Runs an OpenAI chat completion request through the full proxium loop: authentication, memory, the response cache, the budget, routing, failover and cost. A cache hit costs no call slot. The answer is the provider's body without change. With stream: true, the answer is server-sent events. A cache hit is sent as events too.
Request
Responses
- 200
- 400
- 401
- 402
- 403
- 413
- 415
- 429
- 502
- 503
The provider's answer without change, or the cached answer.
The body is not a valid chat request (bad_json), a memory header has a bad value (invalid_memory_mode, invalid_memory_subject), or no model of the route is available to this key (no_route).
The bearer virtual key is missing (missing_key), or it is not valid or it is revoked (invalid_key).
The project may not send calls (subscription_required). proxium.tech is in open beta and does not return this answer.
A content rule of the project blocked the request (guardrail_blocked). The message names the class and the field. It never holds the matched value. proxium.tech has no content rule on for a project today.
The body is larger than the request body limit, 32 MiB on proxium.tech. The body of this answer is plain text.
The content-type is not application/json (unsupported_media_type).
The key or the source used its budget window (tenant_capped or source_capped, retry-after: 60), or the project reached a monthly cap (credits_exhausted, retry-after: 3600). No project on proxium.tech has a monthly cap during the open beta.
Response Headers
Seconds to wait before the next call.
Each attempt of the failover chain failed (upstream_failed). The message gives the reason of the last attempt, or client deadline exceeded when x-proxium-timeout-ms ran out.
The key store or the limits store is not available (keystore_unavailable, limits_unavailable). A deployment that refuses calls while its budget store is down answers budget_unavailable with retry-after: 5; proxium.tech lets the call through.
Response Headers
Seconds to wait before the next call.