Video Generation
POST
https://api.oneinfer.ai/v1/ula/generate-videoGenerate videos from text prompts or uploaded media files. Supports both application/json and multipart/form-data (for file uploads). Powered by providers like novita and google.
Request headers
AuthorizationstringrequiredBearer token for authentication. Format:
Bearer <YOUR_TOKEN>. Exchange your API key for a token via the Authentication endpoint.Content-TypestringrequiredUse application/json for text-only requests, or multipart/form-data when including file uploads (e.g. image-to-video).
Request body
Required fields
promptstringrequiredText prompt describing the video to generate.
modelstringrequiredThe video model to use. Retrieve the full list from the GET Models endpoint and use the model name from the response.
resolutionstringrequiredVideo resolution. Options: "480P", "720P", "1080P".
aspect_ratiostringrequiredAspect ratio of the output video. Options: "16:9", "9:16", "1:1", "4:3", "3:4", "21:9".
durationintegerrequiredDuration of the video in seconds. Must be an integer between 4 and 12.
generate_audiobooleanrequiredWhether to generate audio alongside the video.
camera_fixedbooleanrequiredKeep the camera fixed during generation.
service_tierstringrequiredService tier for priority routing. Options: "default", "flex".
Optional fields
fpsintegerFrames per second. Default: 24.
seedintegerRandom seed for reproducibility. Omit or use -1 for random output.
File uploads
When using multipart/form-data, include file attachments under the files field (e.g. a reference image for image-to-video). All other fields are passed as form string values.
Example request: text-to-video generation
{
"model": "seedance-v1.5-pro-t2v",
"prompt": "a cat drinking milk in a cozy kitchen",
"resolution": "720P",
"aspect_ratio": "16:9",
"duration": 5,
"generate_audio": true,
"camera_fixed": false,
"service_tier": "default",
"fps": 24,
"seed": -1
}Response
Response fields
idstringUnique request identifier (UUID).
createdintegerUnix timestamp of when the job was created.
textstringConfirmation message echoing the prompt used.
finish_reasonstringReason generation stopped. Typically "stop".
providerstringThe provider that handled the request.
modelstringThe model used for generation.
usageobjectToken counts: prompt_tokens, completion_tokens, total_tokens.
latency_msnumberEnd-to-end processing latency in milliseconds.
videosarrayArray of generated video objects, each with a url and type (e.g. mp4).
resolutionstringResolution of the generated video (e.g. "1280*720").
imagesarrayImage outputs if applicable, otherwise an empty array.
audiosstring | nullAudio file path if generated, otherwise null.
application/json
200 OK
{
"api_details": {
"api_status": "success",
"api_message": "API has return response successfully."
},
"data": {
"id": "3a4dbc94-455f-47f4-ae42-4cb528ac5b3d",
"created": 1774529224,
"text": "Generated video for prompt: a cat drinking the milk",
"finish_reason": "stop",
"provider": "novita",
"model": "seedance-v1.5-pro-t2v",
"usage": {
"prompt_tokens": 11,
"completion_tokens": 0,
"total_tokens": 11
},
"latency_ms": 46795.58,
"images": [],
"videos": [
{ "url": "https://...", "type": "mp4" }
],
"resolution": "1280*720",
"audios": null
},
"error": {}
}Error status codes
| Code | Status | Description |
|---|---|---|
200 | OK | Video generated successfully. |
400 | Bad Request | Invalid request body or unsupported model. |
401 | Unauthorized | Missing or invalid Authorization header / Bearer token. |
403 | Forbidden | Insufficient credit balance. |
422 | Unprocessable Entity | Request body failed schema validation. |
500 | Internal Server Error | Unexpected error during video generation. |