Skip to main content
POST
https://gptproto.com
/
v1
/
videos
sora-2 (Image To Video)
curl --request POST \
  --url https://gptproto.com/v1/videos

Authentication

  1. Sign up for a GPTProto account at https://gptproto.com
  2. Navigate to the API Keys section in your dashboard
  3. Generate a new API key (sk-xxxxx)
  4. Copy and securely store your API key For authentication details, please refer to the Authentication section.

Initiate Request

curl --location 'https://gptproto.com/v1/videos' \
--header 'Authorization: GPTPROTO_API_KEY' \
--form 'model="sora-2"' \
--form 'input_reference=@"/path/to/file"' \
--form 'prompt="Put a hat on the cat"'

Query result

How to obtain the id

After submitting your video generation request to /v1/videos, the response will contain the id you need for querying results.

Query Task Status

Retrieve detailed information about the video generation task, including status, progress, and video URL.
curl --location --request GET 'https://gptproto.com/v1/videos/{{id}}' \
--header 'Authorization: GPTPROTO_API_KEY'
Query Task Status Response:
{
    "id": "video_****",
    "object": "video",
    "status": "completed",
    "model": "sora-2",
    "progress": 100,
    "seconds": "4",
    "size": "720x1280",
    "soraVideoUrl": "https://oss.gptproto.com/ai/api6ebf99.mp4",
    "created_at": "1766556441",
    "completed_at": "1766556506",
    "expires_at": "1766560106"
}

Query Video Content

Directly output the video content for immediate use or download.
curl --location --request GET 'https://gptproto.com/v1/videos/{{id}}/content' \
--header 'Authorization: GPTPROTO_API_KEY'
Query Video Content Response:
{
  "id": "video_123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1712697600,
  "size": "1024x1792",
  "seconds": "8",
  "quality": "standard"
}

Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstring✅ Yes--Text prompt that describes the video to generate.
input_referencefile❌ No--Optional image reference that guides generation.
modelstring❌ Nosora-2sora-2
sora-2-pro
The video generation model to use. Defaults to sora-2.
secondsstring❌ No44
8
12
Clip duration in seconds. Defaults to 4 seconds.
sizestring❌ No720x1280720x1280
1280x720
1024x1792
1792x1024
Output resolution formatted as width x height. Defaults to 720x1280.Note: 1024x1792 and 1792x1024 are only supported by sora2-pro model.

Error Codes

Common Error Codes

Error CodeError NameDescription
401UnauthorizedAPI key is missing or invalid
403ForbiddenYour API key doesn’t have permission to access this resource, or insufficient balance for the requested operation
429Too Many RequestsYou’ve exceeded your rate limit
500Internal server errorAn internal server error occurred
503Content policy violationContent blocked due to safety concerns (actual status code is 400)