Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

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

X-On-Behalf-Of
string

Optional external end-user identifier forwarded by the API gateway.

Body

application/json
input_file_id
string
required
endpoint
enum<string>
required
Available options:
/v1/chat/completions,
/v1/responses,
/v1/embeddings,
/v1/images/generations
completion_window
any
required
metadata
object | null
max_concurrency
integer

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.

Required range: 1 <= x <= 9007199254740991

Response

200 - application/json

OK

id
string
required
object
any
required
endpoint
string
required
input_file_id
string
required
completion_window
string
required
status
enum<string>
required
Available options:
validating,
failed,
in_progress,
finalizing,
completed,
expired,
cancelling,
cancelled
created_at
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
request_counts
object
required
max_concurrency
integer
required

How many of this batch's lines may be in flight at once. Each line is admitted against its model's rate limits first.

Required range: -9007199254740991 <= x <= 9007199254740991
errors
object | null
output_file_id
string | null
error_file_id
string | null
in_progress_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
expires_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
finalizing_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
completed_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
failed_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
expired_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
cancelling_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
cancelled_at
integer | null
Required range: -9007199254740991 <= x <= 9007199254740991
metadata
object | null