Visual generation requests
Select a template schema, create an authorized visual, and verify finished media without repeating a paid job.
Compact reference for agents making REST requests. All endpoint paths below are relative to https://backend.blotato.com/v2. For task instructions, read the workflow guide.
Creating visuals
Template lookup is read-only. Do not submit a generation request to inspect a template's inputs or test authentication. Generate only when the user requests new media. For existing media, use the publishing workflow.
POST /videos/from-templates
For AI-filled inputs: use a nonempty "prompt" and set "inputs" to {}.
AI fills in the template inputs automatically from your prompt.
For manual control, populate inputs using the selected template's current schema.
Input names differ by template. Use the selected template's schema:
Image Slideshow with Text Overlays: inputs.slides (objects)
Instagram Carousel Slideshow: inputs.slidePrompts (strings)
AI Video with AI Voice: inputs.scenes (objects)
Do not rename fields when switching templates. Rebuild inputs from the new schema.
templateId: Copy the exact id returned by GET /videos/templates.
Keep full /base/v2/.../v1 paths unchanged. Some templates instead use a bare UUID.
CORRECT:
{
"templateId": "/base/v2/quote-card/77f65d2b-48cc-4adb-bfbb-5bc86f8c01bd/v1",
"inputs": {},
"prompt": "Create 5 motivational quotes about entrepreneurship",
"render": true
}
Optional fields:
title - string, human-readable title for the generated video
WRONG (text is not an input field for this quote-card template):
{
"templateId": "/base/v2/quote-card/77f65d2b-48cc-4adb-bfbb-5bc86f8c01bd/v1",
"inputs": { "text": "Slide 1: ..." },
"render": true
}
Response: { "item": { "id": "vid_123", "status": "queueing" } }
Save response.item.id. An accepted creation is not finished media.
Poll: GET /videos/creations/{id}
Status values: "queueing" | "generating-script" | "script-ready" |
"generating-media" | "media-ready" | "exporting" |
"done" | "creation-from-template-failed" | "insufficient-credits" | "draft"
Terminal states: "done" (success), "creation-from-template-failed" or "insufficient-credits" (failure).
Report "draft" as a draft rather than a completed render. Poll no more often than every 15 seconds.
Also stop polling when response.item.error is set. An error means generation
has stopped and the status will not change again, even if status is still
"script-ready". Report response.item.error to the user.
When done: inspect response.item.mediaUrl and response.item.imageUrls.
Use the output field required by the selected template and requested format.
If the required output is missing, report the mismatch instead of claiming a usable result.
Use bounded polling. When the wait budget ends, preserve the ID and pending state.
Resume lookup of the saved ID. Do not start another paid generation automatically.
For a visual-only request, return the finished media without publishing.
For separately authorized publication, use mediaUrl or imageUrls as mediaUrls.
Discover templates: GET /videos/templates?fields=id,name,description,inputsUse the template catalog for template-specific inputs and outputs.
Return to the agent reference index.
Last updated