Docs

OpenAI Sora 2 API developer guide

OpenAI Sora 2 is currently "Not yet available". This guide provides model IDs, price snapshots, and copyable examples for integration. OpenAI Sora 2 model page

Overview

  • Vendor: OpenAI
  • Type: Video
  • Number of tiers: 1
  • Endpoint tags: video-task

Available tiers and pricing

The model in requests must use the model IDs in the table below, case-sensitive.

Tier Model ID Input Output Context
OpenAI Sora 2 sora-2 $0.093225 / 秒 总价 = 输出时长(秒) × 对应档位单价

Prices are build-time snapshots; refer to the pricing page and console for the latest prices.

Base URL and authentication

Base URL is https://api.rokoapi.com/v1. All requests must include Authorization: Bearer $OPENAI_API_KEY.

Console

Quickstart

curl https://api.rokoapi.com/v1/videos/tasks \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "sora-2",
  "prompt": "A cinematic product shot with natural camera movement",
  "generation_type": "text",
  "duration": 4,
  "size": "1280x720"
}'

Common parameters

ParameterDescription
modelUse the public model IDs from the table above.
prompt / messagesInput prompt, conversation messages, or generation instructions; format depends on the endpoint.
quality / duration / image_urlsGeneration models can accept size, quality, duration, aspect ratio, or reference asset URLs based on model capabilities.

After a successful async generation task submission, a task ID is returned. Poll GET /v1/tasks/{task_id} until the status becomes completed or failed.

Notes

  • Use only the model IDs listed on this page; unprovisioned or retired names will return a model unavailable error.
  • If you encounter a 403 error, check your account balance, key group, and model access permissions.
  • Multimodal, tool calling, caching, and streaming capabilities depend on the upstream model and channel configuration; refer to actual responses.