---
title: POST /v1/jobs/batch
description: Submit a batch of jobs — Creates up to 100 jobs in one request and queues them for execution.
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…`), a signed-in session token (`Authorization: Bearer …`) or the session cookie (browser sessions). See [Authentication](/docs/api/authentication).

Creates up to 100 jobs in one request and queues them for execution. Each job type must be one of the supported batch types, and the whole batch is checked against your plan and credit balance before anything is created. The response lists a per-job result; a job that could not be created is reported as failed.

## Request

### Request body

- `jobs` (object[]) —

- `projectId` (string) —
Project to attach every job to. You need write access.

- `campaignId` (string) —
Campaign to attach every job to. You need write access to its project.

- `batchTag` (string) —
Free-form label stored with each job.

## Responses

### `200` OK

Batch accepted

Response shape:

- `submitted` (integer) —

- `failed` (integer) —

- `results` (object[]) —

- `batchId` (string) —

### `400` Bad Request

Invalid request

Response shape: `object`

### `401` Unauthorized

Authentication required

Response shape: `object`

### `402`

Insufficient credits for the whole batch

Response shape: `object`

### `403` Forbidden

A tool in the batch requires a higher plan, or the project or campaign is not writable with this credential

Response shape: `object`

### `404` Not Found

User profile not found

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

### `503` Service Unavailable

Batch dispatch is temporarily unavailable

Response shape: `object`

**curl**

```bash
curl -X POST 'https://ivybiosciences.com/api/v1/jobs/batch' \
  -H "Authorization: Bearer $IVY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "jobs": [
    {
      "jobType": "esmfold",
      "parameters": {}
    }
  ]
}'
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/jobs/batch', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
  "jobs": [
    {
      "jobType": "esmfold",
      "parameters": {}
    }
  ]
}),
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.post(
    "https://ivybiosciences.com/api/v1/jobs/batch",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
    json={
  "jobs": [
    {
      "jobType": "esmfold",
      "parameters": {}
    }
  ]
},
)
data = res.json()
```
