> This page is for version v4 (default).
> For other versions, use one of these documentation indexes:
> - v4 (default): https://docs-beta.getzep.com/v4/llms.txt
> - v3: https://docs-beta.getzep.com/v3/llms.txt
> - v2: https://docs-beta.getzep.com/v2/llms.txt

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

# Create batch

POST https://api.getzep.com/api/v4/batches
Content-Type: application/json

Reference: https://docs-beta.getzep.com/sdk-reference/batch/create

## Authentication

- `Authorization` header (required) (prefixed with ` Api-Key  `) — Type "Api-Key" followed by a space and the project API key.

## Request

### Body (application/json)

This endpoint expects a v4.CreateBatchRequest.

- `ignore_roles` (list of string, optional) — Message roles to skip during graph extraction for thread message items in this batch.
- `metadata` (map from string to any, optional) — Metadata to store on the batch.
- `strict_ontology` (boolean, optional) — When true, prevents extraction of generic entity nodes that do not match the configured ontology for episodes in this batch.

## Response

### 201

Created

- `created_at` (string, optional) — The time the batch was created.
- `metadata` (map from string to any, optional) — Custom metadata associated with the batch, supplied when it was created.
- `progress` (map from string to any, optional) — The batch's processing progress, including its current stage and item counts. Present only once processing has started.
- `status` (string, optional) — The processing status of the batch: draft, invalid, queued, processing, succeeded, partial, failed, or canceled.
- `strict_ontology` (boolean, optional) — Whether ontology enforcement is applied when this batch is processed, rejecting entities that do not match the configured ontology.
- `uuid` (string, optional) — The unique identifier of the batch.

## Errors

### 400 Bad Request Error

Bad Request

- `error` (v4.ErrorBody, optional)

### 401 Unauthorized Error

Unauthorized

- `error` (v4.ErrorBody, optional)

### 404 Not Found Error

Not Found

- `error` (v4.ErrorBody, optional)

### 409 Conflict Error

Conflict

- `error` (v4.ErrorBody, optional)

## Types

### v4.ErrorBody

- `code` (string, optional)
- `details` (map from string to any, optional)
- `message` (string, optional)
- `param` (string, optional)
- `request_id` (string, optional)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "created_at": "string",
  "metadata": {},
  "progress": {},
  "status": "string",
  "strict_ontology": true,
  "uuid": "string"
}
```