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

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

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

# AiBatchCreateResult `ai.batch-create-result@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-result.v1.json`](/docs/contracts/ai.batch-create-result.json)

ai.batch-create-result@1: the answers of ai.batches.create on OpenVibe.AI. POST /api/v1/batches → 201 { batch }; POST /api/v1/batches/:id/cancel → { batch }. Cancelling only touches the prompts that never had a run: they are cancelled and are not charged for. A prompt that already has a run (the provider is working on it) goes on and settles on its own path: it keeps its status, the answer says so, and nobody is told it was not charged. The batch itself is cancelled only when nothing is left in flight.

## Fields

| Field | Type | Required | Description | Constraints |
| --- | --- | --- | --- | --- |
| `batch` | [ai.batch](/docs/contracts/ai.batch) | yes |  |  |

## Examples

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

 Valid: the-batch

~~~~
{
  "batch": {
    "id": "bat_0123456789abcdef01234567",
    "status": "succeeded",
    "owner_type": "user",
    "owner_id": "usr_01K6R3A1B2C3D4E5F6G7H8J9KF",
    "project_id": null,
    "item_count": 1,
    "items": [
      {
        "idx": 0,
        "status": "succeeded",
        "model": "gpt-4o-mini",
        "run_id": "run_01K6R3A1B2C3D4E5F6G7H8J9KF",
        "answer": "A digest of the week.",
        "error_code": null,
        "error_detail": null,
        "reason": null,
        "capacity": "regular",
        "route_provider": "openai",
        "route_model": "gpt-4o-mini",
        "cost_nano_usd": "1200",
        "absorbed_nano_usd": "0",
        "charged_nano_usd": "600",
        "deadline_at": "2026-11-08T22:58:00.000Z",
        "created_at": "2026-11-07T22:58:00.000Z",
        "updated_at": "2026-11-08T00:10:00.000Z"
      }
    ],
    "discount": "500000",
    "deadline_at": "2026-11-08T22:58:00.000Z",
    "created_at": "2026-11-07T22:58:00.000Z",
    "updated_at": "2026-11-08T00:10:00.000Z",
    "finished_at": "2026-11-08T00:10:00.000Z",
    "absorbed_nano_usd": "0",
    "ran_on_regular_capacity": false
  }
}
~~~~

Rejected: no-batch

~~~~
{
  "batch_id": "bat_0123456789abcdef01234567"
}
~~~~

## Validate

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