Create a batch
Creates and executes a batch from an uploaded JSONL file of requests. Each line must have custom_id, method, url, and body fields. Text batches also require write:responses.
Authorizations
Gateway auth: send Authorization: Bearer <mka1-api-key>. For multi-user server-side integrations, you can also send X-On-Behalf-Of: <external-user-id>.
Headers
Optional external end-user identifier forwarded by the API gateway.
Body
/v1/chat/completions, /v1/responses, /v1/embeddings, /v1/images/generations How many lines may be in flight at once, up to the gateway's ceiling (BATCH_MAX_LINE_CONCURRENCY). Defaults to the gateway's BATCH_DEFAULT_LINE_CONCURRENCY. A model's rate limits are respected before this: a line waits for its model's window rather than exceeding it.
1 <= x <= 9007199254740991Response
OK
validating, failed, in_progress, finalizing, completed, expired, cancelling, cancelled -9007199254740991 <= x <= 9007199254740991How many of this batch's lines may be in flight at once. Each line is admitted against its model's rate limits first.
-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991-9007199254740991 <= x <= 9007199254740991