Skip to main content

Character Animation Integration

To enhance character animation capabilities, you can use the character_url and character_timestamps parameters to create character animations:

Sora2 - Characters

Learn how to create character animations and obtain character_id_list for integration

Query Task Status

After submitting a task, you can check task progress and retrieve generation results through the unified query endpoint:

Get Task Details

Learn how to query task status and retrieve generation results
In production environments, it’s recommended to use callback notifications to receive automatic notifications when generation completes, rather than polling the status endpoint.

API Reference

Request

POST https://api.ruxa.ai/api/v1/tasks/create

Request Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Request Body Parameters

ParameterTypeRequiredDescription
modelstringYesModel name: sora-2 or sora-2-hd
promptstringYesVideo description prompt
secondsstringNoVideo duration: 10, 15, 25 (pro only)
input_referencefileNoInput reference image
sizestringNoVideo size (see below)
watermarkbooleanNoWhether to add watermark, default no watermark
privatebooleanNoWhether to hide video, true means video won’t be published and can’t be remixed, default false
character_urlstringNoVideo URL for creating character (no real people allowed in video)
character_timestampsstringNoCharacter appearance time range in seconds, format {start},{end}, range 1~3 seconds
metadatastringNoMetadata
character_from_taskstringNoCompleted task ID, can create character from generated task
character_createbooleanNoAutomatically create character from generated video after completion
stylestringNoStyle: winter, comic, news

Size Options

ValueDescriptionNote
1024x1792HD Portraitsora-2-hd only
1792x1024HD Landscapesora-2-hd only
720x1280SD Portrait
1280x720SD Landscape
Width > Height = Landscape, Width < Height = Portrait

Request Example

{
  "model": "sora-2",
  "prompt": "A horse taking flight",
  "seconds": "10",
  "size": "1280x720",
  "watermark": false,
  "private": false
}

Request Example with Character Creation

{
  "model": "sora-2",
  "prompt": "Character running on grass",
  "seconds": "10",
  "size": "1280x720",
  "character_url": "https://example.com/character-video.mp4",
  "character_timestamps": "0,3",
  "character_create": true
}

Request Example with Style

{
  "model": "sora-2",
  "prompt": "City street scene",
  "seconds": "10",
  "size": "1280x720",
  "style": "comic"
}

Response Example

{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_sora-2_1765184045509"
  }
}

Response Status Codes

CodeDescription
200Success
401Unauthorized - Missing or invalid authentication credentials
402Insufficient credits
404Not found
422Validation error - Request parameters failed validation
429Rate limited
500Server error
501Generation failed