Sora AI video generation service creates beautiful videos through prompts and starting images.
API home page: Ace Data Cloud - Sora Video Generation
This article will introduce the integration instructions for the Sora Videos Generation API, which can generate official Sora videos by inputting custom parameters.
To use the API, you need to first apply for the corresponding service on the Sora Videos Generation API page. After entering the page, click the "Acquire" button, as shown in the image:
If you are not logged in or registered, you will be automatically redirected to the login page inviting you to register and log in. After logging in or registering, you will be automatically returned to the current page.
Upon your first application, there will be a free quota available for you to use the API for free.
First, understand the basic usage method, which involves inputting the prompt prompt, an array of reference image links image_urls, and the model model to obtain the processed result. The specific content is as follows:
Here, we can see that we have set the Request Headers, including:
accept: the format of the response result you want to receive, filled in asapplication/json, which means JSON format.authorization: the key to call the API, which can be selected directly after application.
Additionally, the Request Body is set, including:
model: the model for generating the video, mainlysora-2andsora-2-pro. Currently,sora-2andsora-2-procan independently choose thesizeanddurationparameters for the video, wheresora-2-prosupports videos with adurationof 25 seconds, whilesora-2only supports videos of 10 or 15 seconds.size: the clarity of this video generation task, which can besmallorlarge.image_urls: the reference image links or Base64 encoded array that need to be uploaded.duration: the duration of this video generation task, which can be 10s, 15s, or 25s. Currently, onlysora-2-prosupports 25s.character_start/character_end: the starting and ending positions of the character in the frame (0-1), used to control the position of the subject.orientation: the aspect ratio direction, supportinglandscape,portrait, andsquare.prompt: the prompt.callback_url: the URL to which the result needs to be returned.
After selection, you can see that the corresponding code is generated on the right side, as shown in the image:
Click the "Try" button to test, as shown in the image above, and we get the following result:
{
"success": true,
"task_id": "6bf7fb83-5814-4e3e-a4ad-bfa0c26c0b33",
"trace_id": "96166698-4b66-478d-a26b-77a7269c9e01",
"data": [
{
"id": "sora-2:task_01k7770rgsevxsmtpbn7xnm5gh",
"video_url": "https://filesystem.site/gptimage/vg-assets/assets%2Ftask_01k7770rgsevxsmtpbn7xnm5gh%2Ftask_01k7770rgsevxsmtpbn7xnm5gh_genid_0bf958d3-cae7-4298-b7b6-99ae439a1ea6_25_10_10_14_06_975715%2Fvideos%2F00000%2Fsrc.mp4?st=2025-10-10T12%3A30%3A38Z&se=2025-10-16T13%3A30%3A38Z&sks=b&skt=2025-10-10T12%3A30%3A38Z&ske=2025-10-16T13%3A30%3A38Z&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skoid=8ebb0df1-a278-4e2e-9c20-f2d373479b3a&skv=2019-02-02&sv=2018-11-09&sr=b&sp=r&spr=https%2Chttp&sig=jigY6Z5qp8%2BTXYobaW0EAJ4%2Fbx6G7t6V1P0iyDeUq48%3D&az=oaivgprodscus",
"state": "succeeded"
}
]
}The returned result contains multiple fields, described as follows:
success: the status of the video generation task at this time.task_id: the ID of the video generation task at this time.trace_id: the tracking ID of the video generation at this time.data: the result list of the video generation task at this time.id: the video ID of the video generation task at this time.video_url: the video link of the video generation task at this time.state: the status of the video generation task at this time.
We can see that we have obtained satisfactory video information, and we only need to obtain the generated Sora video based on the video link address in the data result.
Additionally, if you want to generate the corresponding integration code, you can directly copy the generated code, such as the CURL code below:
curl -X POST 'https://api.acedata.cloud/sora/videos' \
-H 'accept: application/json' \
-H 'authorization: Bearer {token}' \
-H 'content-type: application/json' \
-d '{
"size": "large",
"duration": 15,
"orientation": "landscape",
"prompt": "cat running on the river",
"model": "sora-2"
}'If you want to create an image to video task, the parameter image_urls must first pass in the reference image links, which can specify the following content:
- image_urls: the array of reference image links used for this image to video task.
An example of filling in is as follows:
After filling in, the code is automatically generated as follows:
The corresponding code:
import requests
url = "https://api.acedata.cloud/sora/videos"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"size": "large",
"duration": 15,
"orientation": "landscape",
"prompt": "cat running on the river",
"model": "sora-2",
"image_urls": ["https://cdn.acedata.cloud/11wfp4.png"]
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Clicking run, you can find that you will immediately get a result, as follows:
{
"success": true,
"task_id": "dd392ff0-dcb7-4c7a-afd0-9bd4f65c803a",
"trace_id": "04fd151c-e942-4c1c-a6ab-9a1b1fe54172",
"data": [
{
"id": "sora-2:task_01k777af4hfmg9g7yfvwsc6zws",
"video_url": "https://filesystem.site/gptimage/vg-assets/assets%2Ftask_01k777af4hfmg9g7yfvwsc6zws%2Ftask_01k777af4hfmg9g7yfvwsc6zws_genid_92bae0c5-1703-4a5f-9d9f-c9ed2f9e7176_25_10_10_14_12_924695%2Fvideos%2F00000%2Fsrc.mp4?st=2025-10-10T12%3A37%3A32Z&se=2025-10-16T13%3A37%3A32Z&sks=b&skt=2025-10-10T12%3A37%3A32Z&ske=2025-10-16T13%3A37%3A32Z&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skoid=aa5ddad1-c91a-4f0a-9aca-e20682cc8969&skv=2019-02-02&sv=2018-11-09&sr=b&sp=r&spr=https%2Chttp&sig=5j4dibeaSsDmEka5c%2B9CKHZhRPdqfClQ0tIh03TWXsM%3D&az=oaivgprodscus",
"state": "succeeded"
}
]
}
It can be seen that the generated effect is a video created from an image, and the result is similar to the above text.
If you want to generate a character video task, the parameter character_url must first be passed in with the video link needed to create the character. Note that the video must not contain real people, otherwise it will fail. You can specify the following content:
- character_url: The video link needed to create the character. Note that the video must not contain real people, otherwise it will fail.
An example of how to fill it out is as follows:
After filling it out, the code is automatically generated as follows:
The corresponding code:
import requests
url = "https://api.acedata.cloud/sora/videos"
headers = {
"accept": "application/json",
"authorization": "Bearer {token}",
"content-type": "application/json"
}
payload = {
"size": "small",
"duration": 10,
"orientation": "landscape",
"prompt": "cat running on the river",
"character_url": "https://cdn.acedata.cloud/pdidf5.mp4",
"model": "sora-2",
"character_end": 3,
"character_start": 1
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Clicking run, you can find that you will immediately get a result, as follows:
{
"success": true,
"task_id": "d9bf5461-29b5-47fd-be90-1fe9197df259",
"trace_id": "b7992643-9207-40d6-956b-7577728acc67",
"data": [
{
"id": "sora-2:task_01k8ykrztefavaypw6xanw305b",
"video_url": "https://filesystem.site/cdn/20251101/bee4eeeb4c4660b46dac4548a1ffbc.mp4",
"state": "succeeded"
}
]
}
It can be seen that the generated effect is a character generation video, and the result is similar to the above text.
Since the Sora Videos Generation API takes a relatively long time to generate, approximately 1-2 minutes, if the API does not respond for a long time, the HTTP request will keep the connection open, leading to additional system resource consumption. Therefore, this API also provides support for asynchronous callbacks.
The overall process is: when the client initiates a request, an additional callback_url field is specified. After the client initiates the API request, the API will immediately return a result containing a task_id field information, representing the current task ID. When the task is completed, the generated video result will be sent to the client-specified callback_url in the form of a POST JSON, which also includes the task_id field, so that the task result can be associated by ID.
Let’s understand how to operate specifically through an example.
First, the Webhook callback is a service that can receive HTTP requests, and developers should replace it with the URL of their own HTTP server. For demonstration purposes, a public Webhook sample site https://webhook.site/ is used. Opening this site will give you a Webhook URL, as shown in the image:
Copy this URL, and it can be used as a Webhook. The sample here is https://webhook.site/eb238c4f-da3b-47a5-a922-a93aa5405daa.
Next, we can set the callback_url field to the above Webhook URL, while filling in the corresponding parameters, as shown in the image:
Clicking run, you can find that you will immediately get a result, as follows:
{
"task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea"
}
After a moment, we can observe the result of the generated song at https://webhook.site/eb238c4f-da3b-47a5-a922-a93aa5405daa, as shown in the image:
The content is as follows:
{
"success": true,
"task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"trace_id": "fb751e1e-4705-49ea-9fd4-5024b7865ea2",
"data": [
{
"id": "sora-2:task_01k777hjrbfrgs2060q5zvf2a5",
"video_url": "https://filesystem.site/gptimage/vg-assets/assets%2Ftask_01k777hjrbfrgs2060q5zvf2a5%2Ftask_01k777hjrbfrgs2060q5zvf2a5_genid_b8e2e5d1-a579-49ca-a21c-cb3869685cce_25_10_10_14_15_147334%2Fvideos%2F00000%2Fsrc.mp4?st=2025-10-10T12%3A38%3A49Z&se=2025-10-16T13%3A38%3A49Z&sks=b&skt=2025-10-10T12%3A38%3A49Z&ske=2025-10-16T13%3A38%3A49Z&sktid=a48cca56-e6da-484e-a814-9c849652bcb3&skoid=aa5ddad1-c91a-4f0a-9aca-e20682cc8969&skv=2019-02-02&sv=2018-11-09&sr=b&sp=r&spr=https%2Chttp&sig=p4aMqXqkP%2FI1IhOVGCB9JL8vUUvfNBBF12ESpKhKXOk%3D&az=oaivgprodscus",
"state": "succeeded"
}
]
}You can see that the result contains a task_id field, and other fields are similar to the above text. This field can be used to associate tasks.
For more info, please check below APIs and integration documents.
| API | Path | Integration Guidance |
|---|---|---|
| Sora Videos Generation API | /sora/videos |
Sora Videos Generation API Integration Guide |
| Sora Tasks API | /sora/tasks |
Sora Tasks API Integration Guide |
Base URL: https://api.acedata.cloud
If you meet any issue, check our from support info.









