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

FieldTypeRequiredDescriptionConstraints
template_idstringyes
  • minLength 1
  • maxLength 80
linesarray of stringyes
  • minItems 1
  • maxItems 4
  • items: maxLength 120
formatenum
  • one of "png", "gif", "mp4"
  • default "png"
editorobject
  • no other fields
editor.font_styleenum
  • one of "impact", "modern", "soft"
editor.font_sizeinteger
  • minimum 10
  • maximum 64
editor.colorstring
  • pattern ^#[0-9a-fA-F]{6}$
editor.outlinestring
  • pattern ^#[0-9a-fA-F]{6}$
editor.outline_widthinteger
  • minimum 0
  • maximum 8
editor.crop_xnumber
  • minimum 0
  • maximum 100
editor.crop_ynumber
  • minimum 0
  • maximum 100
editor.boxesarray of object
  • minItems 1
  • maxItems 4
  • items: no other fields
editor.boxes[].xnumberyes
  • minimum 0
  • maximum 100
editor.boxes[].ynumberyes
  • minimum 0
  • maximum 100
editor.boxes[].wnumberyes
  • maximum 100
editor.boxes[].hnumberyes
  • maximum 100
editor.stickersarray of object
  • maxItems 8
  • items: no other fields
editor.stickers[].emojienumyes
  • one of "✨", "😂", "🔥", "💀", "👀", "❤️", "🙌"
editor.stickers[].xnumberyes
  • minimum 0
  • maximum 100
editor.stickers[].ynumberyes
  • minimum 0
  • maximum 100

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 }] }