---
title: "Generate an AI video from a text prompt"
method: POST
path: "/api/mcp/tools/generate_video"
tags: ["tools"]
---

# Generate an AI video from a text prompt

`POST /api/mcp/tools/generate_video`

## Request

- Base URL: `https://finestructure.ai`
- URL: `https://finestructure.ai/api/mcp/tools/generate_video`
- Auth: HTTP bearer

Generate an AI video from a text prompt. Submits the render and returns a job_id immediately - poll get_video_status until it completes. Spends the account's prepaid video-credit wallet (NOT platform credits); pass max_charge_usd to cap how much a single call may spend. Video generation may be invitation-gated.

## Request body

- object
  - `prompt` string, required: The shot to render. Up to 4000 chars.
  - `model` string: Model id from list_media_capabilities. Default 'seedance-2'.
  - `duration` integer: Seconds. Snapped to the model's allowed values.
  - `resolution` string: 480p, 720p, or 1080p (model dependent). Default 480p.
  - `aspect_ratio` string: auto, 16:9, 9:16, 1:1, 4:3, 3:4, or 21:9. Default auto.
  - `image_urls` string[]: Up to 9 public https reference images (Seedance models only).
  - `max_charge_usd` number: Refuse the render if it would charge more than this. Strongly recommended for autonomous agents.

## Response `200`

Tool executed successfully

- ToolResult
  - `ok` boolean, required
  - `tool` string, required
  - `result` object, required

## Other responses

- `400`: Invalid arguments for this tool
- `401`: Missing or invalid bearer token
- `402`: Not enough credits on the account
- `403`: Token scope does not permit this tool
- `404`: Unknown tool name
- `429`: Rate limit exceeded, retry after the indicated delay
- `500`: Internal error while executing the tool

---

[API](https://skmtc.dev/finestructure/apis/fine-structure-api.md) · [All operations](https://skmtc.dev/finestructure/apis/fine-structure-api/llms.txt) · [OpenAPI document](https://skmtc.dev/finestructure/apis/fine-structure-api/revisions/02c50ed5fd70?raw)
