ModelsPricingEnterprise
500+ AI Model API, All In One API.Just In CometAPI
Models API
Developer
Quick StartDocumentationAPI Dashboard
Company
About usEnterprise
Resources
AI ModelsBlogChangelogSupport
Terms of ServicePrivacy Policy
© 2026 CometAPI · All rights reserved
Home/Models/OpenAI/Sora 2
O

Sora 2

Per Second:$0.1
Super powerful video generation model, with sound effects, supports chat format.
New
Commercial Use
Playground
Overview
Features
Pricing
API

Key features

  • Physical realism & continuity: improved simulation of object permanence, motion and physics for fewer visual artifacts.
  • Synchronized audio: generates dialogue and sound effects that line up with on-screen action.
  • Steerability & style range: finer control over camera framing, stylistic choices, and prompt conditioning for different aesthetics.
  • Creative controls: More consistent multi-shot sequences, improved physics and motion realism, and controls for style and timing compared with Sora 1.

Technical details

OpenAI describes Sora family models as leveraging latent video diffusion processes with transformer-based denoisers and multimodal conditioning to produce temporally coherent frames and aligned audio. Sora 2 focuses on improving motion physicality (obeying momentum, buoyancy), longer consistent shots, and explicit synchronization between generated visuals and generated speech/sound effects. The public materials emphasize model-level safety and content-moderation hooks (hard blocks for certain disallowed content, enhanced thresholds for minors, and consent flows for likeness).

Limitations & safety considerations

  • Imperfections remain: Sora 2 makes mistakes (temporal artifacts, imperfect physics in edge cases, voice/oral articulation errors) —Sora 2’s improved but not perfect. OpenAI explicitly notes the model still has failure modes.
  • Misuse risks: Non-consensual likeness generation, deepfakes, copyright concerns, and teen wellbeing/engagement risks. OpenAI is rolling out consent workflows, stricter cameo permissions, moderation thresholds for minors, and human moderation teams.
  • Content & legal limits: The app and model block explicit/violent content and limit public-figure likeness generation without consent; OpenAI has also been reported to use opt-out mechanisms for copyrighted sources. Practitioners should evaluate IP and privacy/legal risk before production use.
  • current deployments emphasize short clips (app features reference ~10-second creative clips), and heavy or unrestricted photorealistic uploads are curtailed during

Primary and practical use cases

  • Social creation & viral clips: rapid generation and remixing of short vertical clips for social feeds (Sora app use case).
  • Prototyping & previsualization: quick scene mockups, storyboarding, concept visuals with synchronized temp audio for creative teams.
  • Advertising & short-form content: proof-of-concept creative testing and small campaign assets where ethical/legal permissions are secured.
  • Research & toolchain augmentation: tool for media labs to study world-modeling and multi-modal alignment (subject to license and safety guardrails).

Pricing for Sora 2

Explore competitive pricing for Sora 2, designed to fit various budgets and usage needs. Our flexible plans ensure you only pay for what you use, making it easy to scale as your requirements grow. Discover how Sora 2 can enhance your projects while keeping costs manageable.
Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Per Second:$0.1
Per Second:$0.125
-20%

Sample code and API for Sora 2

Sora 2 is OpenAI’s flagship text-to-video and audio generation system designed to produce short cinematic clips with synchronized dialogue, sound effects, persistent scene state, and markedly improved physical realism. Sora 2 represents OpenAI’s step forward in producing short, controllable videos with synchronized audio (speech and sound effects), improved physical plausibility (motion, momentum, buoyancy), and stronger safety controls compared with earlier text-to-video systems.
Curl
Python
JavaScript
# Create a video with sora-2
# Step 1: Submit the video generation request
echo "Submitting video generation request..."
response=$(curl -s https://api.cometapi.com/v1/videos \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -F "model=sora-2" \
  -F "prompt=A calico cat playing a piano on stage")

echo "Response: $response"

# Extract video_id from response (handle JSON with spaces like "id": "xxx")
video_id=$(echo "$response" | tr -d '
' | sed 's/.*"id"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
echo "Video ID: $video_id"

# Step 2: Poll for progress until 100%
echo ""
echo "Checking video generation progress..."
while true; do
  status_response=$(curl -s "https://api.cometapi.com/v1/videos/$video_id" \
    -H "Authorization: Bearer $COMETAPI_KEY")

  # Parse progress from "progress": "0%" format
  progress=$(echo "$status_response" | grep -o '"progress":"[^"]*"' | head -1 | sed 's/"progress":"//;s/"$//')
  # Parse status from the outer level
  status=$(echo "$status_response" | grep -o '"status":"[^"]*"' | head -1 | sed 's/"status":"//;s/"$//')

  echo "Progress: $progress, Status: $status"

  if [ "$progress" = "100%" ]; then
    echo "Video generation completed!"
    break
  fi

  if [ "$status" = "FAILURE" ] || [ "$status" = "failed" ]; then
    echo "Video generation failed!"
    echo "$status_response"
    exit 1
  fi

  sleep 10
done

# Step 3: Download the video to output directory
echo ""
echo "Downloading video to ./output/$video_id.mp4..."
mkdir -p ./output
curl -s "https://api.cometapi.com/v1/videos/$video_id/content" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -o "./output/$video_id.mp4"

if [ -f "./output/$video_id.mp4" ]; then
  echo "Video saved to ./output/$video_id.mp4"
  ls -la "./output/$video_id.mp4"
else
  echo "Failed to download video"
  exit 1
fi

Curl Code Example

# Create a video with sora-2
# Step 1: Submit the video generation request
echo "Submitting video generation request..."
response=$(curl -s https://api.cometapi.com/v1/videos \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -F "model=sora-2" \
  -F "prompt=A calico cat playing a piano on stage")

echo "Response: $response"

# Extract video_id from response (handle JSON with spaces like "id": "xxx")
video_id=$(echo "$response" | tr -d '\n' | sed 's/.*"id"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
echo "Video ID: $video_id"

# Step 2: Poll for progress until 100%
echo ""
echo "Checking video generation progress..."
while true; do
  status_response=$(curl -s "https://api.cometapi.com/v1/videos/$video_id" \
    -H "Authorization: Bearer $COMETAPI_KEY")
  
  # Parse progress from "progress": "0%" format
  progress=$(echo "$status_response" | grep -o '"progress":"[^"]*"' | head -1 | sed 's/"progress":"//;s/"$//')
  # Parse status from the outer level
  status=$(echo "$status_response" | grep -o '"status":"[^"]*"' | head -1 | sed 's/"status":"//;s/"$//')
  
  echo "Progress: $progress, Status: $status"
  
  if [ "$progress" = "100%" ]; then
    echo "Video generation completed!"
    break
  fi
  
  if [ "$status" = "FAILURE" ] || [ "$status" = "failed" ]; then
    echo "Video generation failed!"
    echo "$status_response"
    exit 1
  fi
  
  sleep 10
done

# Step 3: Download the video to output directory
echo ""
echo "Downloading video to ./output/$video_id.mp4..."
mkdir -p ./output
curl -s "https://api.cometapi.com/v1/videos/$video_id/content" \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -o "./output/$video_id.mp4"

if [ -f "./output/$video_id.mp4" ]; then
  echo "Video saved to ./output/$video_id.mp4"
  ls -la "./output/$video_id.mp4"
else
  echo "Failed to download video"
  exit 1
fi

Python Code Example

# Create a video with sora-2 using raw HTTP requests
import os
import time
import requests

api_key = os.environ.get("COMETAPI_KEY")
base_url = "https://api.cometapi.com/v1"

headers = {"Authorization": f"Bearer {api_key}"}

# Step 1: Submit the video generation request
print("Submitting video generation request...")
response = requests.post(
    f"{base_url}/videos",
    headers=headers,
    files={
        "model": (None, "sora-2"),
        "prompt": (None, "A calico cat playing a piano on stage"),
    },
)

result = response.json()
print(f"Response: {result}")

video_id = result.get("id")
print(f"Video ID: {video_id}")

# Step 2: Poll for progress until 100%
print("\nChecking video generation progress...")
while True:
    try:
        status_response = requests.get(f"{base_url}/videos/{video_id}", headers=headers)
        status_result = status_response.json()

        # Parse progress and status from response
        data = status_result.get("data", {})
        if data is None:
            data = {}
        progress = data.get("progress", "0%")
        status = data.get("status", "unknown")

        print(f"Progress: {progress}, Status: {status}")

        if status in ["FAILURE", "failed"]:
            print("Video generation failed!")
            print(status_result)
            exit(1)

        if progress == "100%":
            print("Video generation completed!")
            break
    except Exception as e:
        print(f"Temporary error: {e}, retrying...")

    time.sleep(10)

# Step 3: Download the video to output directory
print(f"\nDownloading video to ./output/{video_id}.mp4...")
os.makedirs("./output", exist_ok=True)

video_response = requests.get(f"{base_url}/videos/{video_id}/content", headers=headers)

output_path = f"./output/{video_id}.mp4"
with open(output_path, "wb") as f:
    f.write(video_response.content)

if os.path.exists(output_path):
    file_size = os.path.getsize(output_path)
    print(f"Video saved to {output_path}")
    print(f"File size: {file_size} bytes")
else:
    print("Failed to download video")
    exit(1)

JavaScript Code Example

// Create a video with sora-2 using raw HTTP requests
import fs from "fs";
import path from "path";

const apiKey = process.env.COMETAPI_KEY;
const baseUrl = "https://api.cometapi.com/v1";

async function sleep(ms) {
  return new Promise((resolve) => setTimeout(resolve, ms));
}

async function main() {
  // Step 1: Submit the video generation request
  console.log("Submitting video generation request...");

  const formData = new FormData();
  formData.append("model", "sora-2");
  formData.append("prompt", "A calico cat playing a piano on stage");

  const submitResponse = await fetch(`${baseUrl}/videos`, {
    method: "POST",
    headers: {
      Authorization: `Bearer ${apiKey}`,
    },
    body: formData,
  });

  const result = await submitResponse.json();
  console.log("Response:", JSON.stringify(result, null, 2));

  const videoId = result.id;
  console.log("Video ID:", videoId);

  // Step 2: Poll for progress until 100%
  console.log("\nChecking video generation progress...");

  while (true) {
    try {
      const statusResponse = await fetch(`${baseUrl}/videos/${videoId}`, {
        headers: {
          Authorization: `Bearer ${apiKey}`,
        },
      });

      const text = await statusResponse.text();
      if (text.startsWith("<")) {
        console.log("Temporary server error, retrying...");
        await sleep(10000);
        continue;
      }

      const statusResult = JSON.parse(text);

      // Parse progress and status from response
      const data = statusResult.data || {};
      const progress = data.progress || "0%";
      const status = data.status || "unknown";

      console.log(`Progress: ${progress}, Status: ${status}`);

      if (status === "FAILURE" || status === "failed") {
        console.log("Video generation failed!");
        console.log(JSON.stringify(statusResult, null, 2));
        process.exit(1);
      }

      if (progress === "100%") {
        console.log("Video generation completed!");
        break;
      }
    } catch (e) {
      console.log(`Temporary error: ${e.message}, retrying...`);
    }

    await sleep(10000);
  }

  // Step 3: Download the video to output directory
  console.log(`\nDownloading video to ./output/${videoId}.mp4...`);

  const outputDir = "./output";
  if (!fs.existsSync(outputDir)) {
    fs.mkdirSync(outputDir, { recursive: true });
  }

  const videoResponse = await fetch(`${baseUrl}/videos/${videoId}/content`, {
    headers: {
      Authorization: `Bearer ${apiKey}`,
    },
  });

  const outputPath = path.join(outputDir, `${videoId}.mp4`);
  const videoBuffer = Buffer.from(await videoResponse.arrayBuffer());
  fs.writeFileSync(outputPath, videoBuffer);

  if (fs.existsSync(outputPath)) {
    const stats = fs.statSync(outputPath);
    console.log(`Video saved to ${outputPath}`);
    console.log(`File size: ${stats.size} bytes`);
  } else {
    console.log("Failed to download video");
    process.exit(1);
  }
}

main().catch(console.error);