AiRunCreateResult ai.run-create-result@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
ai
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/ai/run-create-result.v1.json

ai.run-create-result@1: answers of ai.run.create on OpenVibe.AI. POST /api/v1/runs and the direct operations → { run, replayed? } (201 when it finished or was served from cache within the wait, 202 with Location while queued or running, 200 with replayed true for an idempotent repeat); POST …/cancel → { run }; POST …/retry → { run } (a new run with retry_of); POST …/citations → 201 { citations }. A quota refusal or a full queue is 429 with Retry-After.

Fields

This schema has no named fields.

Examples

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

Valid: run
{
  "run": {
    "id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
    "status": "succeeded",
    "workflow": {
      "key": "news.summarize_story",
      "version": 2
    },
    "template": {
      "key": "news.summarize_story",
      "version": 3
    },
    "route": {
      "key": "default.text",
      "version": 1
    },
    "requester": {
      "type": "service",
      "id": "news"
    },
    "on_behalf_of": null,
    "attribution": null,
    "source_service": "news",
    "target": {
      "service": "news",
      "type": "story",
      "id": "sty_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "input": {
      "topic": "Transit strike",
      "sources": [
        {
          "source_type": "news.item",
          "source_id": "itm_42"
        }
      ]
    },
    "output": {
      "headline": "Transit strike begins",
      "summary": "Workers walked out.",
      "citations": [
        0
      ],
      "gaps": []
    },
    "error": null,
    "synthetic": false,
    "provenance": {
      "origin": "ai",
      "workflow": "news.summarize_story",
      "workflow_version": 2,
      "template_version": 3,
      "route": "default.text",
      "route_version": 1,
      "provider": "anthropic",
      "model": "claude-sonnet",
      "fallback_used": true,
      "run_id": "run_01JAB2C3D4E5F6G7H8J9K0MNPQ",
      "cached_from": null,
      "synthetic": false
    },
    "usage": {
      "tokens_in": 1200,
      "tokens_out": 300,
      "cost_usd": 0.0081,
      "attempts": 2
    },
    "citations_count": 1,
    "retry_of": null,
    "idempotency_key": null,
    "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
    "created_at": "2026-09-23T10:00:00.000Z",
    "started_at": "2026-09-23T10:00:00.050Z",
    "finished_at": "2026-09-23T10:00:04.200Z"
  }
}
Rejected: no-run
{
  "replayed": true
}

Validate

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