For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocsAPI ReferenceSDKs
DocsAPI ReferenceSDKs
  • Overview
    • API reference
  • Mesh API
      • POSTCreate Batch
      • GETList Batches
      • GETGet Batch
      • POSTCancel Batch
LogoLogo
Mesh APIBatches

Create Batch

||View as Markdown|
POST
https://api.meshapi.ai/v1/batches
POST
/v1/batches
$curl -X POST https://api.meshapi.ai/v1/batches \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "requests": [
> {
> "custom_id": "batch-item-001",
> "body": {
> "model": "gpt-4o-mini",
> "messages": [
> {
> "role": "user",
> "content": "Summarize the latest quarterly earnings report."
> }
> ],
> "temperature": 0.7,
> "max_tokens": 500
> }
> }
> ],
> "completion_window": "24h",
> "metadata": {
> "project": "Q2 Earnings Analysis",
> "requested_by": "finance_team"
> }
>}'
1{}
Create a batch job. Accepts requests inline — no separate file upload step required. Model and provider are resolved from `body.model` across all requests; all requests must target the same model. Returns 429 (batch_limit_exceeded) if the owner already has 10 or more batches in a non-terminal state. Returns 501 (not_implemented) if the resolved provider doesn't support batch.
Was this page helpful?
Previous

Vector Search

Next

List Batches

Built with

Create a batch job.

Accepts requests inline — no separate file upload step required. Model and provider are resolved from body.model across all requests; all requests must target the same model.

Returns 429 (batch_limit_exceeded) if the owner already has 10 or more batches in a non-terminal state. Returns 501 (not_implemented) if the resolved provider doesn’t support batch.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
requestslist of objectsRequired
completion_windowstringOptionalDefaults to 24h
metadatamap from strings to any or nullOptional

Response

Successful Response

Errors

422
Unprocessable Entity Error