VisionMomentsRequest vision.moments-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/moments-request.v1.json
vision.moments-request@1: the body of POST /api/v1/moments. Up to 30 timestamped frames are compared with CLIP prompt embeddings; a histogram jump marks a scene change. VOD and stream chapters come from this.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
frames | array of object | yes |
| |
frames[].timestamp_ms | integer | yes |
| |
frames[].image | string |
| ||
frames[].image_url | string |
| ||
prompts | array of string |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: one
{
"frames": [
{
"timestamp_ms": 0,
"image": "data:image/png;base64,iVBORw0KGgo="
},
{
"timestamp_ms": 5000,
"image_url": "https://example.com/f.jpg"
}
],
"prompts": [
"a goal"
]
}Rejected: one
{
"frames": [
{
"image": "data:image/png;base64,iVBORw0KGgo="
}
]
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('vision.moments-request@1', value); // { valid, errors: [{ path, message }] }