image_to_video
Input: An image URL and a descriptive prompt detailing the desired video scene.
Output: We will return the generated video URL to the user.
Functionality: This tool converts a static image into a dynamic video. The provided image serves as the base, while the accompanying prompt guides the AI on how to animate the image into a video that reflects the described scene. It leverages the Image-to-Video API to synthesize video content based on these inputs.
Steps:
We will get the user_id from the request context.
We will validate the user's generation tokens.
We will call the Image-to-Video API using the provided image URL and descriptive prompt.
The API processes the inputs and returns a JSON response containing the video URL.
We extract and return the video URL to the user.
INSTRUCTION FOR CLIENT MODEL:
Extract the required input parameters 'image_url' (type: string, URL) and 'prompt' (type: string, describing the desired video scene) from the user's prompt.
Ignore any extraneous information in the user's input.
Pass the extracted values to this tool as 'image_url' and 'prompt'.
Example: For user input "Animate this image https://example.com/image.jpg to show a sunrise over the mountains", extract 'image_url' as 'https://example.com/image.jpg' and 'prompt' as 'sunrise over the mountains'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| image_url | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |