Skip to main content
POST
/
v1
/
models
/
{owner}
/
{slug}
/
batches
Create and dispatch a batch
curl --request POST \
  --url https://api.runflow.io/v1/models/{owner}/{slug}/batches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": [
    {}
  ],
  "metadata": {},
  "callback_url": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "target_type": "<string>",
  "target_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status_code": "<string>",
  "items_total": 123,
  "items_succeeded": 123,
  "items_failed": 123,
  "items_cancelled": 123,
  "items": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "sequence_index": 123,
      "run_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "status_code": "<string>",
      "client_ref": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z",
  "output": {},
  "cost": "<string>",
  "metadata": {},
  "callback_url": "<string>",
  "started_at": "2023-11-07T05:31:56Z",
  "completed_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.runflow.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

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

Headers

X-Organization-Id
string | null

Path Parameters

owner
string
required
slug
string
required

Body

application/json

POST body for creating a batch.

input is an array of per-item objects. Each item is validated independently against the target model's ModelInput declarations. Each item may carry an optional client_ref (≤255 chars, stripped before model validation); the model's own input shape fills the rest.

input
Input · object[]
required
Required array length: 1 - 100 elements
metadata
Metadata · object
callback_url
string | null
Maximum string length: 2048

Response

Successful Response

POST /batches response — batch fields + items handle list.

Shape matches the customer contract (docs/api/contracts/ batch-endpoint-api-surface.md "Response shape" section). Distinct from Batch.FullValidator which exposes additional internal fields for admin callers.

id
string<uuid>
required
target_type
string
required
target_id
string<uuid>
required
status_code
string
required
items_total
integer
required
items_succeeded
integer
required
items_failed
integer
required
items_cancelled
integer
required
items
BatchItemHandle · object[]
required
created_at
string<date-time>
required
output
Output · object
cost
string | null
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
metadata
Metadata · object
callback_url
string | null
started_at
string<date-time> | null
completed_at
string<date-time> | null