Skip to Content
API CallVideo GenerationOpenAI/Sora2-T2V

OpenAI/Sora2-T2V

Text-to-Video Model

Asynchronous Task Submission

API

https://api.umodelverse.ai/v1/tasks/submit

Input

ParameterTypeRequiredDescription
modelstringYesModel name, in this case openai/sora-2/text-to-video
input.promptstringYesPrompt to guide the video generation
parameters.sizestringNoSize of the generated video.
Available resolutions:
- 720x1280
- 1280x720
Defaults to 720x1280
parameters.durationintNoDuration of the generated video (in seconds), options are 4, 8, 12, default is 4

Request Example

⚠️ If you are using a Windows system, it is recommended to use Postman or other API calling tools.

curl --location --globoff 'https://api.umodelverse.ai/v1/tasks/submit' \ --header 'Authorization: <YOUR_API_KEY>' \ --header 'Content-Type: application/json' \ --data '{ "model": "openai/sora-2/text-to-video", "input": { "prompt": "A beautiful girl is dancing" }, "parameters": { "size": "720x1280", "duration": 4 } }'

Output

ParameterTypeDescription
output.task_idstringUnique identifier for the asynchronous task
request_idstringUnique identifier for the request

Response Example

{ "output": { "task_id": "task_id" }, "request_id": "request_id" }

Query Task Status

API

https://api.umodelverse.ai/v1/tasks/status?task_id=<task_id>

Request Example

curl --location 'https://api.umodelverse.ai/v1/tasks/status?task_id=<task_id>' \ --header 'Authorization: <YOUR_API_KEY>'

Output

ParameterTypeDescription
output.task_idstringUnique identifier for the asynchronous task
output.task_statusstringTask status: Pending, Running, Success, Failure
output.urlsarrayList of URLs for the video result
output.submit_timeintegerTimestamp when the task was submitted
output.finish_timeintegerTimestamp when the task was completed
output.error_messagestringError message returned in case of failure
usage.durationintegerExecution duration of the task (in seconds)
request_idstringUnique identifier for the request

Response Example

{ "output": { "task_id": "task_id", "task_status": "Success", "urls": ["https://xxxxx/xxxx.mp4"], "submit_time": 1756959000, "finish_time": 1756959050 }, "usage": { "duration": 4 }, "request_id": "" }