Skip to content

Text-to-Video

Sora text-to-video API for generating short videos from text prompts.


Overview

  • Method: POST
  • Path: /v1/videos
  • Content-Type: application/json
  • Category: Video Models (Video) / Sora Video

Authentication

  • Header: Authorization: Bearer <token>

Request Parameters

FieldTypeRequiredDescription
promptstringYesText prompt for generating the video
modelstringNoModel name, supports sora-2, sora-2-pro; default is sora-2
secondsstringNoVideo duration as a string, supports 4, 8, 12; default is 4
sizestringNoVideo size, supports 720x1280, 1280x720, 1024x1792, 1792x1024; 1792 sizes only supported by sora-2-pro

Request Example

curl Example

bash
curl -X POST "https://api.gpt.ge/v1/videos" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_TOKEN" \
  -d '{
    "prompt": "A fierce tiger bursts into a farmhouse yard, the village dog runs away in fear, and a cat jumps out to defeat the tiger.",
    "model": "sora-2",
    "seconds": "8",
    "size": "1280x720"
  }'

JavaScript (fetch) Example

javascript
fetch('https://api.gpt.ge/v1/videos', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_TOKEN'
  },
  body: JSON.stringify({
    prompt: 'A fierce tiger bursts into a farmhouse yard, the village dog runs away in fear, and a cat jumps out to defeat the tiger.',
    model: 'sora-2',
    seconds: '8',
    size: '1280x720'
  })
})
  .then(res => res.json())
  .then(console.log)

Python Example (requests)

python
import requests

resp = requests.post(
    'https://api.gpt.ge/v1/videos',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
    },
    json={
        'prompt': 'A fierce tiger bursts into a farmhouse yard, the village dog runs away in fear, and a cat jumps out to defeat the tiger.',
        'model': 'sora-2',
        'seconds': '8',
        'size': '1280x720'
    }
)
print(resp.json())

Response Fields

FieldTypeDescription
idstringVideo task ID
objectstringReturned object type, usually video
created_atintegerCreation timestamp
statusstringTask status
completed_atnullCompletion time, null if not finished
errornullError information, null on success
expires_atnullExpiration time, currently null
modelstringModel used
progressintegerTask progress
remixed_from_video_idnullRemix source video ID, currently null if unused
secondsstringVideo duration
sizestringVideo size

Success Response Example (200)

json
{
  "id": "video_68f082321ed08193a4eaf01376fa10bc0284bd663de64dc5",
  "object": "video",
  "created_at": 1760592434,
  "status": "queued",
  "completed_at": null,
  "error": null,
  "expires_at": null,
  "model": "sora-2",
  "progress": 0,
  "remixed_from_video_id": null,
  "seconds": "8",
  "size": "1280x720"
}