BlockRun

Sora 2 API

azure
Video

OpenAI Sora 2 via Azure AI Foundry — text-to-video AND image-to-video at 720p with synchronized audio. 4s default; 4, 8, or 12s. Portrait or landscape. Image-to-video takes a non-human reference image (human faces are rejected upstream — use Seedance + RealFace for real people). $0.10/sec.

Pricing
$0.1/sec
Default 4s · max 12s
Model ID
azure/sora-2
Endpoint
POST /api/v1/videos/generations
Image input:✓ supported
Payment:USDC on Base via x402
Code Examples
from blockrun_llm import LLMClient

client = LLMClient()  # uses BLOCKRUN_WALLET_KEY (never sent to server)
job = client.video_generate(
    model="azure/sora-2",
    prompt="a red apple slowly spinning on a wooden table",
    duration_seconds=4,
    image_url="https://example.com/seed.jpg",  # optional
)
print(job["data"][0]["url"])  # MP4 URL
import { LLMClient } from "@blockrun/llm";

const client = new LLMClient({ privateKey: process.env.BASE_CHAIN_WALLET_KEY! });
const job = await client.videoGenerate({
  model: "azure/sora-2",
  prompt: "a red apple slowly spinning on a wooden table",
  durationSeconds: 4,
  imageUrl: "https://example.com/seed.jpg", // optional
});
console.log(job.data[0].url); // MP4 URL
# 1. Submit (returns 402 first, sign EIP-3009 USDC TransferWithAuthorization)
curl -X POST https://blockrun.ai/api/v1/videos/generations \
  -H "Content-Type: application/json" \
  -H "x-payment: <signed-x402>" \
  -d '{
    "model": "azure/sora-2",
    "prompt": "a red apple slowly spinning on a wooden table",
    "duration_seconds": 4
  }'

# 2. The returned id is opaque — poll the response's poll_url until completed:
curl -H "x-payment: <signed-x402>" \
  "https://blockrun.ai/api/v1/videos/generations/<id>?model=azure/sora-2&duration=4"

Try It — Video Generation

Type a prompt below and click Generate.

Output: downloadable MP4. Payment in USDC via x402 — no API key.

~$0.4200 USDC

Connect your wallet to generate. Pay-per-call in USDC on Base via x402 — no API key needed.

About OpenAI Sora 2

Sora 2 is a video model from OpenAI that generates a clip from a text prompt or a reference image. A default job is 4 seconds and the longest it will render is 12 seconds; it is billed by the second of generated video. It is served through BlockRun's video generation API, so it can be called without an account, an API key, or a subscription.

Use Sora 2 for

  • Short ads, product demos and social clips generated from a prompt
  • Animating a still image or a product shot into motion
  • Storyboards and previsualisation before a shoot

What it costs

Sora 2 is billed by the length of the clip it produces. A default 4-second generation costs $0.421, settlement fee included, and the maximum supported length is 12 seconds. The exact price is quoted in the 402 before you pay. Generation is asynchronous: the API returns a job you poll, and the finished MP4 is mirrored to BlockRun storage so the URL does not expire.

Specifications

Default duration
4 seconds
Maximum duration
12 seconds
Input modes
Text-to-video and image-to-video
Payment
Pay-per-call USDC via x402
Output hosting
Permanent MP4 hosting on BlockRun

Calling it from your code

Pass azure/sora-2 as the model field to the video generation endpoint. The response contains a job id; poll it until the clip is ready.

The first request returns a 402 carrying the exact price; a signed retry runs it, and client libraries fold the two into one call — how the payment works. See the documentation for request and response shapes, the AI Video Generator page for every model on this endpoint, or browse the full catalog of 90 chat models to compare alternatives.

Sora 2 or another video model

The closest alternatives by price that do the same kind of work. Each is called on the same endpoint with the same request, so comparing two is a one-line change.

ModelPriceLength
OpenAI Sora 2 (this page)$0.421 per 4s clipup to 12s
xAI Grok Imagine Video$0.402 per 8s clipup to 15s
ByteDance Seedance 2.0 Mini$0.400 per 5s clipup to 15s
ByteDance Seedance 1.5 Pro$0.355 per 5s clipup to 12s

Sora 2 API questions

How much does the Sora 2 API cost?

A default 4-second clip costs $0.421, settlement fee included; longer clips cost more. The exact price is quoted in the 402 response before the job starts.

How long can a Sora 2 video be?

Up to 12 seconds per generation. A job runs asynchronously: the request returns a job id, and you poll it until the clip is ready.

Can Sora 2 turn an image into a video?

Yes. Send a reference image with the prompt and Sora 2 animates it; text-only prompts work too.

Do I need an API key to use Sora 2?

No. Each request carries its own payment, so an agent or script can call Sora 2 with no account and no key. Teams that prefer one can use an API key with card or invoice billing instead.

Other video models

Every model on BlockRun is reached through the same endpoint and the same payment flow, so switching is a one-line change to the model field. These are the closest alternatives to Sora 2:

Two ways to run this

Get an API key

Sign in, get a key, and call the same endpoints with usage billed to your account. For teams that want one invoice instead of one wallet.

Get an API key 

Or let your agent pay per call, in USDC

No account, no API key. Three steps, and the last one is the request this page is about.

  1. 01
    Point your agent at BlockRun

    Install ClawRouter, or add the BlockRun MCP server to Claude Code, Cursor, Codex or OpenClaw. Any OpenAI-compatible client works too — change the base URL, nothing else.

    curl -fsSL https://blockrun.ai/ClawRouter-update | bash
  2. 02
    Fund a wallet with USDC

    Send USDC to a wallet on Base, Solana or Arc. There is no account to create and no API key to issue: the wallet is the account, and it pays per call.

  3. 03
    Call Sora 2

    The first call returns HTTP 402 with the exact price, your agent signs it, and the answer comes back. Payment settles on-chain; nothing is charged if the call fails.

    curl -X POST https://blockrun.ai/api/v1/videos/generations \
      -H "Content-Type: application/json" \
      -d '{"model": "azure/sora-2", "prompt": "a cat on a skateboard"}'