---
title: "ai.batch-create-request@1 · OpenVibe.Services"
canonical: "https://openvibe.services/docs/contracts/ai.batch-create-request"
updated: null
---

# ai.batch-create-request@1 · OpenVibe.Services

HTML: [ai.batch-create-request@1 · OpenVibe.Services](https://openvibe.services/docs/contracts/ai.batch-create-request)

# AiBatchCreateRequest `ai.batch-create-request@1`

Generated at 2026-11-13 06:25:48 UTC from [`openvibe-contracts v0.419.0`](https://github.com/OpenVibers/OpenVibe.Contracts/tree/v0.419.0) and [`openvibe-sdk v0.161.0`](https://github.com/OpenVibers/OpenVibe.SDK/tree/v0.161.0).

- Version: 1.0.0
- Owner: ai
- Visibility: first-party
- Status: active
- Compatibility: backward
- Schema: [`https://openvibe.network/contracts/ai/batch-create-request.v1.json`](/docs/contracts/ai.batch-create-request.json)

ai.batch-create-request@1: the body of POST /api/v1/batches on OpenVibe.AI (capability ai.batches.create). One batch of many prompts: the answers come later, and the batch is billed at half the retail price. Errors are problem+json: 422 input.invalid (no items, an empty prompt, a prompt over 20000 characters, a deadline outside 1 to 72 hours), 422 batch.too\_large (more prompts than the service's cap), 403 batch.no\_payer (the token names no account to pay), 403 batch.no\_grant (a service without the ai.batches.create grant).

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `items` | array of one of | yes | The prompts of the batch, in order. Each item is a prompt, or an object with a prompt and the model it wants. | - `minItems 1` |
| `model` | string |  | The model the whole batch asks for, when no item names one. |  |
| `deadline_hours` | integer |  | How long the batch may take, in hours (1 to 72). Omitted: the service's own default (24 hours). A prompt that reaches the deadline without cheap capacity expires and is never charged. | - `minimum 1`<br>- `maximum 72` |

## Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

 Valid: prompts

~~~~
{
  "items": [
    "one prompt",
    {
      "prompt": "another prompt",
      "model": "gpt-4o-mini"
    }
  ]
}
~~~~

Valid: with-a-deadline

~~~~
{
  "items": [
    "one prompt"
  ],
  "model": "gpt-4o-mini",
  "deadline_hours": 24
}
~~~~

Rejected: a-deadline-out-of-range

~~~~
{
  "items": [
    "one prompt"
  ],
  "deadline_hours": 100
}
~~~~

Rejected: empty-prompt

~~~~
{
  "items": [
    ""
  ]
}
~~~~

Rejected: no-items

~~~~
{
  "items": []
}
~~~~

## Validate

~~~~
const contracts = require('openvibe-contracts');
contracts.validate('ai.batch-create-request@1', value);   // { valid, errors: [{ path, message }] }
~~~~
