VisionOcrRequest vision.ocr-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/ocr-request.v1.json

vision.ocr-request@1: the body of POST /api/v1/ocr. The local Tesseract 5 reader runs on Vision's host and costs nothing; `fallback` asks OpenVibe.AI only when the local pass found no usable text, which needs a signed-in person or a service token holding vision.ocr.

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
langstring
  • maxLength 40
fallbackboolean
modelstring
  • maxLength 120

Examples

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

Valid: one
{
  "image_url": "https://example.com/sign.png",
  "lang": "eng",
  "fallback": true
}
Rejected: one
{
  "lang": "eng"
}

Validate

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