VisionCompareRequest vision.compare-request@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/compare-request.v1.json

vision.compare-request@1: the body of POST /api/v1/compare. One image runs through the local reader and up to three AI hints; the requested model is a hint only, and each row reports the provider and model OpenVibe.AI says answered.

Fields

FieldTypeRequiredDescriptionConstraints
imagestringThe image as a data URL (base64).
  • pattern ^data:image/
image_urlstringA public image URL, fetched through Vision's private-address guard.
  • pattern ^https?://
  • format uri
taskenum
  • one of "ask", "describe", "identify", "count", "translate", "ocr"
questionstring
  • maxLength 2000
modelsarray of string
  • maxItems 3
  • items: maxLength 120
langstring
  • maxLength 40

Examples

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

Valid: one
{
  "image": "data:image/png;base64,iVBORw0KGgo=",
  "task": "describe",
  "models": [
    "openai:gpt-4o-mini",
    "anthropic:claude-sonnet-4"
  ]
}
Rejected: one
{
  "image": "data:image/png;base64,iVBORw0KGgo=",
  "models": [
    "a",
    "b",
    "c",
    "d"
  ]
}

Validate

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