Video Models
Overview
With our API you can generate videos from your prompt and imagination.
We support multiple video models. You can find the complete list along with API reference links at the end of the page.
Example
The first code block (generation):
import requests
def main():
url = "https://api.aimlapi.com/v2/generate/video/minimax/generation"
payload = {
"model": "video-01",
"prompt": "Cheetah turns toward the camera.",
"first_frame_image": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Cheetah4.jpg/1200px-Cheetah4.jpg",
}
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
headers = {"Authorization": "Bearer <YOUR_AIMLAPI_KEY>", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print("Generation:", response.json())
if __name__ == "__main__":
main()
The second code block (retrieving the generated video file from the server):
import requests
def main():
url = "https://api.aimlapi.com/v2/generate/video/minimax/generation"
params = {
# Insert the generation_id (that was returned by the generation part above) in the quotation marks instead of <GENERATION_ID>:
"generation_id": "<GENERATION_ID>",
}
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
headers = {"Authorization": "Bearer <YOUR_AIMLAPI_KEY>", "Content-Type": "application/json"}
response = requests.get(url, params=params, headers=headers)
print("Generation:", response.json())
if __name__ == "__main__":
main()
All Available Video Models
Model ID
Developer
Context
Model Card
Last updated
Was this helpful?