> For the complete documentation index, see [llms.txt](https://help.blotato.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.blotato.com/start-with-an-ai-agent/llm/visuals.md).

# 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](/agent-workflows/agent-workflows/visuals.md). For tool calls, use the [MCP reference](/start-with-an-ai-agent/mcp/tools.md).

## 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](/agent-workflows/agent-workflows/publish.md).

```
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,inputs
```

Use the [template catalog](/rest-api-reference/visuals.md) for template-specific inputs and outputs.

Return to the [agent reference index](/start-with-an-ai-agent/llm.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.blotato.com/start-with-an-ai-agent/llm/visuals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
