Skip to content

MaaS_Sora-2 Text-to-Video

1. Create Video Task

Request Endpoint

POST https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos

Request Parameters

Parameter Name Type Mandatory Description
prompt String Yes Describe the shot in natural language. Include shot type, subject, action, scene, lighting, and any required camera movements to reduce ambiguity. For optimal consistency, keep it single-purpose.
size String No Video width × height. Optional values: 720×1280, 1280×720. Default: 720×1280
seconds String No 4 / 8 / 12. Default value: 4
input_reference File No A single reference image used as the visual anchor for the first frame. Accepted MIME types: image/jpeg, image/png, image/webp. Dimensions must match exactly.
remix_video_id (Not Supported Yet) String No ID of a previously completed video (e.g., video_...), used to reuse structure, motion, and framing. Same as Sora 2

Response Example

{
    "id": "video_68f892a69ee081908d83e200aa406fec",
    "object": "video",
    "created_at": 1761120934,
    "status": "queued",
    "completed_at": null,
    "error": null,
    "expires_at": null,
    "model": "sora-2",
    "progress": 0,
    "remixed_from_video_id": null,
    "seconds": "4",
    "size": "1280x720"
}

Call Example

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos' \
--header 'Authorization: Bearer {key}' \
--form 'prompt="An orange cat sunbathing"' \
--form 'size="1280x1792"' \
--form 'seconds="12"'

2. Query Video Task Status

Request Endpoint

GET https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos/{video_id}

Response Example

{
    "id": "video_68f872d114108190b620f73a4af85c5e",
    "object": "video",
    "created_at": 1761112785,
    "status": "completed",
    "completed_at": 1761112941,
    "error": null,
    "expires_at": 1761199185,
    "model": "sora-2",
    "progress": 100,
    "remixed_from_video_id": null,
    "seconds": "12",
    "size": "720x1280"
}

Call Example

curl --location --request GET 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos/{video_id}' \
--header 'Authorization: Bearer {key}'

3. Download Video

Request Endpoint

GET https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos/{video_id}/content

Call Example

curl --location --request GET 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/videos/{video_id}/content' \
--header 'Authorization: Bearer {key}'