MemeRenderRequest meme.render@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- meme
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Schema
https://openvibe.network/contracts/meme/render.v1.json
meme.render@1: a request to render 1–4 caption lines over an approved template. PNG is the default; GIF and MP4 return short, looped exports. Editor positions and crop coordinates are percentages of the canvas.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
template_id | string | yes |
| |
lines | array of string | yes |
| |
format | enum |
| ||
editor | object |
| ||
editor.font_style | enum |
| ||
editor.font_size | integer |
| ||
editor.color | string |
| ||
editor.outline | string |
| ||
editor.outline_width | integer |
| ||
editor.crop_x | number |
| ||
editor.crop_y | number |
| ||
editor.boxes | array of object |
| ||
editor.boxes[].x | number | yes |
| |
editor.boxes[].y | number | yes |
| |
editor.boxes[].w | number | yes |
| |
editor.boxes[].h | number | yes |
| |
editor.stickers | array of object |
| ||
editor.stickers[].emoji | enum | yes |
| |
editor.stickers[].x | number | yes |
| |
editor.stickers[].y | number | yes |
|
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: editor-mp4
{
"template_id": "tpl_classic",
"lines": [
"Ship the fix",
"then celebrate"
],
"format": "mp4",
"editor": {
"font_style": "impact",
"font_size": 30,
"color": "#ffffff",
"outline": "#000000",
"outline_width": 3,
"crop_x": 50,
"crop_y": 50,
"boxes": [
{
"x": 5,
"y": 7,
"w": 90,
"h": 24
},
{
"x": 5,
"y": 68,
"w": 90,
"h": 24
}
],
"stickers": [
{
"emoji": "🔥",
"x": 52,
"y": 54
}
]
}
}Rejected: empty-lines
{
"template_id": "tpl_classic",
"lines": [],
"format": "png"
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('meme.render@1', value); // { valid, errors: [{ path, message }] }