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

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

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

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

ai.batch-read-result@1: the answers of ai.batches.read on OpenVibe.AI (the caller's own batches). GET /api/v1/batches → { batches } (newest first, the items not included); GET /api/v1/batches/:id → { batch } (with its items). Somebody else's batch is 404 batch.not\_found.

## Fields

This schema has no named fields.

## Examples

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

 Valid: one-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
  }
}
~~~~

Valid: the-batches

~~~~
{
  "batches": [
    {
      "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: both-ways

~~~~
{
  "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
  },
  "batches": [
    {
      "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: nothing

~~~~
{}
~~~~

## Validate

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