Sora 2
sora-2Sora 2 for video generation jobs and long-running creative workflows.
API Docs
Sora 2 for video generation jobs and long-running creative workflows.
Text-to-video, image-to-video, first/last frame control, reference images, extend, and remix jobs. Endpoint: https://mail.omixa.cloud/api/v1/videos/jobs
Sora 2 for video generation jobs and long-running creative workflows.
Use Omixa's unified endpoint and your workspace API key. Provider routing, billing, failover, and usage records are handled by Omixa.
https://mail.omixa.cloud/api/v1/videos/jobs
Only send options supported by this model. Required fields and accepted values are listed below.
| Field | Тип | Required | Accepted values | Описание |
|---|---|---|---|---|
model |
string | Yes | sora-2 | Use `sora-2`. Omixa resolves the active provider route and failover key automatically. |
prompt |
string | Yes | Any valid value | Video instruction. Keep it concrete: subject, scene, action, camera, lighting, and style. |
video_operation|task |
string | No | text_to_video, image_to_video, extend, remix | Video workflow. |
duration_seconds|seconds |
number | No | 1-30 | Generated duration in seconds. Omixa validates provider-safe ranges. |
aspect_ratio |
string | No | 16:9, 9:16, 1:1 | Video aspect ratio for Veo-style routes. |
resolution|size |
string | No | 720p, 1080p, 1280x720, 720x1280, 1920x1080 | Output resolution or Sora size. |
sample_count|n_variants |
integer | No | 1-4 | Number of variants where supported. Sora 2 routes may not accept `n_variants`; Omixa omits it for those models. |
negative_prompt |
string | No | Any valid value | What to avoid in Veo-style generations. |
person_generation |
string | No | Any valid value | Person generation safety setting for Veo-style providers. |
generate_audio |
boolean | No | Any valid value | Ask compatible video models to generate audio. |
enhance_prompt |
boolean | No | Any valid value | Provider prompt enhancement. |
seed |
integer | No | Any valid value | Deterministic seed where supported. |
start_frame|first_frame|image|input_reference |
inline image | No | Any valid value | Starting image for image-to-video. Use an inline image object/data URL. |
last_frame|end_frame |
inline image | No | Any valid value | Ending image for first/last-frame generation. |
reference_images |
array | No | Any valid value | Reference images for reference-to-video. Veo supports multiple inline images through Omixa. |
source_video|source_video_id|video_id |
string|inline video | No | Any valid value | Source video or operation ID for extend/remix workflows. |
wait_seconds |
integer | No | Any valid value | How long Omixa waits before the first status poll. |
poll_interval_seconds |
integer | No | Any valid value | Polling interval for long-running video jobs. |
Start with this model-safe payload and expect the normalized Omixa response shape shown beside it.
{
"model": "sora-2",
"prompt": "A cinematic product reveal of an AI API gateway on a clean white desk.",
"video_operation": "text_to_video",
"seconds": 8,
"size": "1280x720",
"wait_seconds": 3,
"poll_interval_seconds": 2
}
{
"provider": "azure-foundry",
"model": "sora-2",
"status": "running|succeeded",
"operation": "provider-operation-name",
"poll_after_seconds": 5,
"data": [
{
"url": "https://...",
"content_type": "video/mp4"
}
]
}
Replace the example API key with a workspace key and keep model-specific fields unchanged unless the table above marks them optional.
curl -X POST https://mail.omixa.cloud/api/v1/videos/jobs \
-H "Authorization: Bearer omx_live_xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "sora-2",
"prompt": "A cinematic product reveal of an AI API gateway on a clean white desk.",
"video_operation": "text_to_video",
"seconds": 8,
"size": "1280x720",
"wait_seconds": 3,
"poll_interval_seconds": 2
}'
const response = await fetch('https://mail.omixa.cloud/api/v1/videos/jobs', {
method: 'POST',
headers: {
'Authorization': 'Bearer omx_live_xxx',
'Content-Type': 'application/json'
},
body: "{\n \"model\": \"sora-2\",\n \"prompt\": \"A cinematic product reveal of an AI API gateway on a clean white desk.\",\n \"video_operation\": \"text_to_video\",\n \"seconds\": 8,\n \"size\": \"1280x720\",\n \"wait_seconds\": 3,\n \"poll_interval_seconds\": 2\n}"
});
const data = await response.json();
import requests
response = requests.post(
'https://mail.omixa.cloud/api/v1/videos/jobs',
headers={'Authorization': 'Bearer omx_live_xxx', 'Content-Type': 'application/json'},
json={
"model": "sora-2",
"prompt": "A cinematic product reveal of an AI API gateway on a clean white desk.",
"video_operation": "text_to_video",
"seconds": 8,
"size": "1280x720",
"wait_seconds": 3,
"poll_interval_seconds": 2
}
)
print(response.json())
$ch = curl_init('https://mail.omixa.cloud/api/v1/videos/jobs');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer omx_live_xxx', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{
"model": "sora-2",
"prompt": "A cinematic product reveal of an AI API gateway on a clean white desk.",
"video_operation": "text_to_video",
"seconds": 8,
"size": "1280x720",
"wait_seconds": 3,
"poll_interval_seconds": 2
}',
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", "omx_live_xxx");
var json = @"{
""model"": ""sora-2"",
""prompt"": ""A cinematic product reveal of an AI API gateway on a clean white desk."",
""video_operation"": ""text_to_video"",
""seconds"": 8,
""size"": ""1280x720"",
""wait_seconds"": 3,
""poll_interval_seconds"": 2
}";
var response = await client.PostAsync("https://mail.omixa.cloud/api/v1/videos/jobs", new StringContent(json, System.Text.Encoding.UTF8, "application/json"));
var body = await response.Content.ReadAsStringAsync();
payload := []byte(`{
"model": "sora-2",
"prompt": "A cinematic product reveal of an AI API gateway on a clean white desk.",
"video_operation": "text_to_video",
"seconds": 8,
"size": "1280x720",
"wait_seconds": 3,
"poll_interval_seconds": 2
}`)
req, _ := http.NewRequest("POST", "https://mail.omixa.cloud/api/v1/videos/jobs", bytes.NewReader(payload))
req.Header.Set("Authorization", "Bearer omx_live_xxx")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)