VisionFaceCastMatchRequest vision.face-cast-match-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/face-cast-match-request.v1.json

vision.face-cast-match-request@1: POST /api/v1/faces/cast/match, called by OpenVibe.Live with a service token scoped to one channel (vision.face.cast.match). It matches only that channel's opted-in adult roster; a person who has not enrolled for this channel cannot appear, and the answer does not say whether they exist.

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
channelstringyes
  • pattern ^[a-zA-Z0-9][a-zA-Z0-9:_-]{1,119}$
media_refstringyes
  • pattern ^[a-zA-Z0-9][a-zA-Z0-9:/_-]{1,159}$

Examples

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

Valid: one
{
  "channel": "live:one",
  "media_ref": "media:a",
  "image": "data:image/png;base64,iVBORw0KGgo="
}
Rejected: one
{
  "channel": "live:one",
  "media_ref": "media:a"
}

Validate

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