VisionProductRequest vision.product-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/product-request.v1.json

vision.product-request@1: the body of POST /api/v1/product. The image is embedded locally with CLIP; `allow_rerank` lets one routed model reorder the candidate offers. Candidates come from OpenVibe.Deals and open.shoes; Vision never invents a price.

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
allow_rerankboolean

Examples

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

Valid: one
{
  "image_url": "https://example.com/shoe.png",
  "allow_rerank": true
}
Rejected: one
{}

Validate

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