LogoRuxa.ai
Sora 2 Video Generation API Guide
2025/12/28
3 min read

Sora 2 Video Generation API Guide

Complete guide to generating videos with OpenAI Sora 2 API through Ruxa AI - text-to-video, image-to-video, and character animation.

Sora 2 Overview

Sora 2 is OpenAI's video generation model available through Ruxa AI. It supports text-to-video, image-to-video, and character animation features.

Available Models

Model Resolution Duration
sora-2 1280x720, 720x1280 10s, 15s
sora-2-hd 1792x1024, 1024x1792, 1280x720, 720x1280 10s, 15s, 25s

Basic Text-to-Video

Generate a video from a text prompt:

curl --request POST \
  --url https://api.ruxa.ai/api/v1/tasks/create \
  --header 'Authorization: Bearer sk-xxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "input": {
      "prompt": "A golden retriever running through a sunlit meadow, slow motion, cinematic quality",
      "seconds": "10",
      "size": "1280x720"
    }
  }'

Image-to-Video

Animate a reference image:

curl --request POST \
  --url https://api.ruxa.ai/api/v1/tasks/create \
  --header 'Authorization: Bearer sk-xxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "input": {
      "prompt": "The person in the image starts walking forward",
      "input_reference": "https://example.com/your-image.jpg",
      "seconds": "10",
      "size": "1280x720"
    }
  }'

Character Animation

Create reusable characters for consistent video generation:

curl --request POST \
  --url https://api.ruxa.ai/api/v1/tasks/create \
  --header 'Authorization: Bearer sk-xxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "sora-2",
    "input": {
      "prompt": "The character waves hello",
      "character_url": "https://example.com/character-video.mp4",
      "character_timestamps": "1,3",
      "character_create": true,
      "seconds": "10"
    }
  }'

Note: Character videos cannot contain real people.

Style Options

Apply visual styles to your videos:

Style Description
winter Winter/snow aesthetic
comic Comic book style
news News broadcast style
{
  "model": "sora-2",
  "input": {
    "prompt": "A cat playing with yarn",
    "style": "comic",
    "seconds": "10"
  }
}

Parameters Reference

Parameter Type Required Description
prompt string Yes Video description
seconds string No Duration: "10", "15", "25" (HD only)
size string No Resolution (see table above)
input_reference file/url No Reference image for image-to-video
watermark boolean No Add watermark (default: false)
private boolean No Hide video from public (default: false)
style string No Visual style
character_url string No Video URL for character creation
character_timestamps string No Character appearance range "start,end" (1-3s)
character_create boolean No Auto-create character from result
character_from_task string No Use character from existing task

Query Task Status

curl --request GET \
  --url 'https://api.ruxa.ai/api/v1/tasks/query/{taskId}' \
  --header 'Authorization: Bearer sk-xxxxxx'

Prompt Tips

For best results:

  1. Be specific - Describe camera movements, lighting, and mood
  2. Use cinematic terms - "dolly shot", "tracking shot", "close-up"
  3. Match complexity to duration - Longer videos can handle more complex scenes
  4. Include style descriptors - "cinematic", "slow motion", "professional"

Example prompt:

"A cinematic shot of ocean waves crashing against rocky cliffs at sunset, golden hour lighting, slow motion, aerial drone perspective, professional film quality"

Response Codes

Code Description
200 Success
401 Unauthorized
402 Insufficient credits
422 Validation error
429 Rate limited
500 Server error
501 Generation failed

Learn More

Author

avatar for Ruxa AI
Ruxa AI

Categories

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates