Create GIF or short video
create_gif_or_short_videoGenerates a short animation from a text prompt, with GIF, MP4 or WebM output. Costs 50 credits. Starts a background job; returns a project id for wait_for_image_project. Before choosing settings, read get_account_info and the current parameter constraints. A listed model, resolution, duration or count is not necessarily available together or on this account. Preserve explicit requirements and all supplied inputs; explain a genuine block instead of submitting an incompatible request. Account balance alone does not prove a request is affordable.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"style": "<style>"
},
"name": "create_gif_or_short_video"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional project name for identifying this output. Omit to use the API's default project name. | Ai Gif - dateTime |
| style | Yes | Text instructions for the animation's subject, appearance and motion. | |
| output_format | No | The output file format for the generated animation. | gif |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads. | |
| credits_charged | Yes | The amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund. |