Models batch create
post/models/v1/batches
Many completions, embeddings or speech requests of one kind, run in the background under the project's limits. The same idempotency key answers the batch it started, so a retry never starts a second one. models.batch.completed reaches the project's webhooks when it ends.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
models:write- Graphql
Mutation.modelsBatchCreate- Sdk
models.batch.create- Cli
models batch create- Events
models.batch.completed
Request bodyapplication/json, required
- kindstringrequiredOne of: chat, embeddings, speech.
- requestslist of objectrequired
- idstringrequiredYour id for the request; the result carries it At most 80 characters.
- bodyobjectrequired
- idstringrequired
- idempotencyKeystringrequiredThe same key answers the batch it started, so a retry never starts a second one At most 200 characters.
- purposestring or null
Responses
- 202application/jsonSuccess
- idstringrequired
- objectbatchrequired
- kindstringrequired
- statestringrequiredOne of: queued, running, completed, cancelled, failed.
- idempotencyKeystringrequired
- countsobjectrequired
- totalnumberrequired
- donenumberrequired
- failednumberrequired
- costUsdnumberrequired
- createdAtstringrequired
- startedAtstring or nullrequired
- endedAtstring or nullrequired
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring