Text to Video

Request
Make aPOST
request to below endpoint and pass the required parameters in the request body.
curl
Body
json
Body
application/json
Response
Video generation response
The response is of type object
.
curl --request POST \
--url https://modelslab.com/api/v6/video/text2video \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"model_id": "cogvideox",
"prompt": "<string>",
"negative_prompt": "<string>",
"seed": 123,
"height": 512,
"width": 512,
"num_frames": 25,
"num_inference_steps": 20,
"guidance_scale": 7,
"clip_skip": 1,
"upscale_height": 640,
"upscale_width": 1024,
"upscale_strength": 0.6,
"upscale_guidance_scale": 12,
"upscale_num_inference_steps": 20,
"use_improved_sampling": false,
"improved_sampling_seed": 123,
"fps": 15,
"output_type": "gif",
"instant_response": false,
"temp": false,
"webhook": "<string>",
"track_id": "<string>"
}'
{
"status": "success",
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"future_links": [
"<string>"
],
"meta": {},
"eta": 123,
"message": "<string>",
"tip": "<string>",
"fetch_result": "<string>"
}
Generate videos from text descriptions using the Text to Video API.
curl --request POST \
--url https://modelslab.com/api/v6/video/text2video \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"model_id": "cogvideox",
"prompt": "<string>",
"negative_prompt": "<string>",
"seed": 123,
"height": 512,
"width": 512,
"num_frames": 25,
"num_inference_steps": 20,
"guidance_scale": 7,
"clip_skip": 1,
"upscale_height": 640,
"upscale_width": 1024,
"upscale_strength": 0.6,
"upscale_guidance_scale": 12,
"upscale_num_inference_steps": 20,
"use_improved_sampling": false,
"improved_sampling_seed": 123,
"fps": 15,
"output_type": "gif",
"instant_response": false,
"temp": false,
"webhook": "<string>",
"track_id": "<string>"
}'
{
"status": "success",
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"future_links": [
"<string>"
],
"meta": {},
"eta": 123,
"message": "<string>",
"tip": "<string>",
"fetch_result": "<string>"
}
POST
request to below endpoint and pass the required parameters in the request body.
--request POST 'https://modelslab.com/api/v6/video/text2video' \
{
"key": "your_api_key",
"model_id": "cogvideox",
"prompt": "Space Station in space",
"negative_prompt": "low quality",
"height": 512,
"width": 512,
"num_frames": 25,
"num_inference_steps": 20,
"guidance_scale": 7,
"upscale_height": 640,
"upscale_width": 1024,
"upscale_strength": 0.6,
"upscale_guidance_scale": 12,
"upscale_num_inference_steps": 20,
"output_type": "gif",
"webhook": null,
"track_id": null
}
Video generation response
The response is of type object
.
Was this page helpful?