Create a batch
POST/v1/batches
Sends a batch of chat completion requests to the batch API of the vendor that model names: OpenRouter, OpenAI or Anthropic. The vendor answers within 24 hours at its batch price. The batch uses the project's own key for the vendor when the project has one, else the platform key. The caps of the project count the batch at its estimate before proxium sends it.
Request
Responses
- 202
- 400
- 401
- 403
- 413
- 429
- 502
- 503
The batch: id, status, request_counts.
The endpoint is not /v1/chat/completions, the model is not provider/model, a line has no custom_id or no body, or a custom_id is used twice (bad_batch); the batch holds more than 50,000 lines (too_many_requests); or the provider is not an endpoint of the project or has no batch API (batch_not_available).
The bearer virtual key is missing (missing_key), or it is not valid or it is revoked (invalid_key).
The project has no platform pool grant and no own key for the vendor (platform_not_granted), or the key may not call the model (model_not_allowed).
The body is larger than the request body limit. The body of this answer is plain text.
The estimate of the batch is more than a cap of the project (project_capped).
Response Headers
Seconds to wait before the next call.
The vendor refused the call or did not answer (upstream_failed).
The batch store is not configured (batch_store_unavailable), or the project's own key for the vendor could not be read (own_key_unreadable).