generate_video
Turn a text prompt, an image, or reference images into a video. Quote the credit cost first, then render and retrieve the finished clip by ID.
Instructions
Generate a video from a prompt, from an image, or from a set of reference images. THIS SPENDS THE ACCOUNT'S CREDITS — call quote_video first and confirm the cost with the person you are working for before calling this. Returns immediately with an id; rendering takes about a minute. Use check_video to collect the result. Retrying is safe: an identical call repeated within two minutes returns the generation the first call started rather than starting a second one, so to deliberately make a second take either change the request or pass a new requestId.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio | No | ||
| prompt | Yes | What the video should show. | |
| quality | No | ||
| imageUrl | No | https URL of an image to animate. Supplying one makes this image-to-video: the picture is the first frame and the prompt describes what happens to it. JPEG, PNG or WebP, up to 10 MB. Prefer this over describing a logo, a product or a face in words — a model asked to draw a specific logo will draw something close to it and no closer. | |
| modelSlug | No | ||
| requestId | No | Your own id for this attempt. Send the same one when retrying and you get the same generation back instead of a second charge. Send a new one to deliberately start another. | |
| resolution | No | ||
| aspectRatio | No | ||
| endImageUrl | No | https URL of the frame to finish on. Needs imageUrl. Only some models publish a field for one; list_models with mode image_to_video shows which. | |
| durationSeconds | No | ||
| referenceImageUrls | No | https URLs of reference images, in the order the prompt addresses them as @Image1, @Image2 and so on. This is reference-to-video and is not combined with imageUrl. Order is preserved exactly as sent. |