VisionAnswer vision.answer@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
vision
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/vision/answer.v1.json

vision.answer@1: one saved answer on OpenVibe.Vision. It names the engine, model, provider and route that actually answered (never a model hint), the reason it was chosen, the cost OpenVibe.AI reported, the measured latency and the confidence. No image bytes are stored: only a sha256 and the declared media type.

Fields

FieldTypeRequiredDescriptionConstraints
idstringyes
  • pattern ^vis_[0-9A-HJKMNP-TV-Z]{26}$
taskenumyes
  • one of "ask", "describe", "identify", "count", "translate", "ocr", "compare"
questionstring | null
  • maxLength 2000
modeenumyes
  • one of "auto", "local", "ai"
sourceenumyes
  • one of "upload", "url", "data"
source_urlstring | null
  • format uri
image_sha256stringyes
  • pattern ^[0-9a-f]{64}$
image_mimestringyes
  • pattern ^image/[a-z0-9.+-]+$
image_bytesintegeryes
  • minimum 1
  • maximum 20971520
textstring | null
  • maxLength 20000
answerobjectyesEngine details, OCR words, provenance and any compare rows; never an image.
modelstring | null
providerstring | null
routestring | null
reasonstring | null
enginestring | null
confidencenumber | null
  • minimum 0
  • maximum 1
cost_usdnumberyes
  • minimum 0
latency_msintegeryes
  • minimum 0
created_atstringyes
  • format date-time

Examples

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

Valid: one
{
  "id": "vis_01J8Z3Q4R5S6T7V8W9X0Y1Z2A4",
  "task": "ask",
  "mode": "auto",
  "source": "upload",
  "image_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "image_mime": "image/png",
  "image_bytes": 1024,
  "text": "A desk with a keyboard and a mug.",
  "answer": {
    "engine": "local",
    "route": "local.ocr"
  },
  "model": "tesseract",
  "provider": "local",
  "route": "local.ocr",
  "reason": "the local OCR reader answered the read task; no model was called",
  "cost_usd": 0,
  "latency_ms": 42,
  "created_at": "2026-10-29T10:00:00.000Z"
}
Rejected: one
{
  "id": "vis_short",
  "task": "ask",
  "mode": "auto",
  "source": "upload",
  "cost_usd": 0,
  "latency_ms": 0,
  "created_at": "2026-10-29T10:00:00.000Z",
  "answer": {}
}

Validate

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