> This page is for Developer Documentation.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.benchling.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.benchling.com/_mcp/server.

# Batch create PredictionBatch

POST https://{tenant_name}.benchling.com/api/v3/prediction-batch:batch-create
Content-Type: application/json

Batch create PredictionBatch synchronously in one transaction. Maximum 25 items per request.

Reference: https://docs.benchling.com/docs/api/benchling-api/prediction-batch/batchcreate

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Headers

- `EARLY-ACCESS` (string, optional) — Set to true to access beta operations via /api/v3.

### Body (application/json)

This endpoint expects an object.

- `items` (list of PredictionBatchInput, required)

## Response

### 201

Created

- `items` (list of PredictionBatch, required)

## Errors

### 400 Prediction Batch Batch Create Request Bad Request Error

Bad Request

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 403 Prediction Batch Batch Create Request Forbidden Error

Forbidden

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 404 Prediction Batch Batch Create Request Not Found Error

Not Found

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 409 Prediction Batch Batch Create Request Conflict Error

Conflict

- `detail` (GeneralErrorDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)

### 429 Prediction Batch Batch Create Request Too Many Requests Error

Too Many Requests

- `detail` (TooManyRequestsErrorBodyDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `invalidId` (string, optional)
- `violated-policies` (list of enum, optional) — The budget policies that rejected the request, in canonical order: `user`, `integration`, then `tenant`.
  - Allowed values: `user`, `integration`, `tenant`

### 500 Prediction Batch Batch Create Request Internal Server Error

Internal Server Error

- `detail` (InternalServerErrorBodyDetail, required, nullable)
- `instance` (string, required)
- `status` (integer, required)
- `title` (string, required, nullable)
- `type` (string, required)
- `errorId` (string, optional)

## Types

### PredictionBatchInput

- `configSchemaVersion` (integer, required)
- `folderId` (string, required)
- `jobConfigs` (list of PredictionBatchJobConfigInput, required)
- `model` (string, required)
- `name` (string, required)
- `modelImplementationVersion` (string, optional, nullable)

### PredictionBatch

Represents an execution of a Model Hub model against multiple data inputs (resulting in multiple Predictions). A PredictionBatch tracks the input configuration, execution status, and results. Each batch is associated with a specific model and version, enabling version tracking. Common use cases include protein structure prediction, property prediction, and sequence generation.

- `__typename` (string, optional)
- `archiveReason` (string, optional, nullable)
- `archived` (boolean, optional)
- `createdAt` (string, optional)
- `creator` (PrincipalRef, optional)
- `folder` (FolderRef, optional)
- `id` (string, optional)
- `jobConfigs` (list of map from string to any, optional)
- `model` (string, optional)
- `modelImplementationVersion` (string, optional)
- `modelVersion` (string, optional, nullable)
- `modifiedAt` (string, optional)
- `predictionJobs` (string, optional)
- `status` (enum, optional)
  - Allowed values: `AI_PROPOSED`, `BLOCKED`, `FAILED`, `HALTED`, `RUNNING`, `SUCCEEDED`, `WAITING`

### GeneralErrorDetail

### TooManyRequestsErrorBodyDetail

### InternalServerErrorBodyDetail

### PredictionBatchJobConfigInput

- `config` (map from string to any, required)
- `name` (string, optional, nullable)

### PrincipalRef

- `__typename` (string, optional)
- `id` (string, optional)

### FolderRef

- `__typename` (string, optional)
- `id` (string, optional)

## Examples

**Request**

```json
{
  "items": [
    {
      "configSchemaVersion": 1,
      "folderId": "folderId",
      "jobConfigs": [
        {
          "config": {
            "key": "value"
          }
        }
      ],
      "model": "model",
      "name": "name"
    }
  ]
}
```

**Response**

```json
{
  "items": [
    {
      "__typename": "__typename",
      "archiveReason": "archiveReason",
      "archived": true,
      "createdAt": "createdAt",
      "id": "id",
      "jobConfigs": [
        {
          "key": "value"
        }
      ],
      "model": "model",
      "modelImplementationVersion": "modelImplementationVersion",
      "modelVersion": "modelVersion",
      "modifiedAt": "modifiedAt",
      "predictionJobs": "predictionJobs",
      "status": "AI_PROPOSED"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://{tenant_name}.benchling.com/api/v3/prediction-batch:batch-create"

payload = { "items": [
        {
            "configSchemaVersion": 1,
            "folderId": "folderId",
            "jobConfigs": [{ "config": { "key": "value" } }],
            "model": "model",
            "name": "name"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://{tenant_name}.benchling.com/api/v3/prediction-batch:batch-create';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"items":[{"configSchemaVersion":1,"folderId":"folderId","jobConfigs":[{"config":{"key":"value"}}],"model":"model","name":"name"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```