Developer Migration Guide · Discontinued Sora API (Sept 24, 2026)

Migrate from the Sora API in 5 minutes

OpenAI discontinued the Sora API on September 24, 2026. Swap your broken video call to POST https://api.legit2compute.com/jobs — text-to-video and image-to-video with synced sound at $0.07/sec, automatic failure refunds, and zero subscription.

Get an API keyPaste this into Claude Code, Cursor or any coding agentIt reads the agent quickstart, asks you for your key, and makes one test call.See pricingSora API overview
The short answer. Replace your video POST with POST https://api.legit2compute.com/jobs (pipeline: "video_t2v" or "video_i2v"), poll GET /jobs/<job_id> every 10–15 seconds until completed, and download the MP4 with sound from GET /jobs/<job_id>/download. Signing up with Discord, Google, GitHub or Twitch includes $1 of trial credit (enough for 2 five-second clips with sound).

Endpoint & field mapping

StepOld Sora APIlegit2compute API
Auth headerAuthorization: Bearer $OPENAI_API_KEYx-api-key: $L2C_API_KEY
Submit text-to-videoPOST /v1/videosPOST /jobs with "pipeline": "video_t2v"
Submit image-to-videoReference image inputPOST /jobs with "pipeline": "video_i2v" + "inputImage": "https://..."
Dimensions & lengthAspect / duration parameterswidth × height (1280×704, 704×1280, 960×960) & seconds (5, 10 or 15)
Poll & downloadPoll job status → fetch MP4GET /jobs/<job_id> → GET /jobs/<job_id>/download
Failed rendersError handling per providerCredits reserved on submit and refunded automatically on failure

Drop-in replacement snippets

Python (requests)

import os, time, requests

API = "https://api.legit2compute.com"
H = {"x-api-key": os.environ["L2C_API_KEY"]}

def generate_video(prompt, seconds=5, aspect="9:16", image_url=None, private=False):
    dims = {"16:9": (1280, 704), "9:16": (704, 1280), "1:1": (960, 960)}[aspect]
    body = {
        "pipeline": "video_i2v" if image_url else "video_t2v",
        "inputData": {"prompt": prompt, "width": dims[0], "height": dims[1], "seconds": seconds},
    }
    if image_url:
        body["inputImage"] = image_url
    if private:
        body["private"] = True
    job_id = requests.post(f"{API}/jobs", headers=H, json=body, timeout=30).json()["job"]["job_id"]
    while True:
        job = requests.get(f"{API}/jobs/{job_id}", headers=H, timeout=30).json()["job"]
        if job["status"] == "completed":
            return requests.get(f"{API}/jobs/{job_id}/download", headers=H, timeout=120).content
        if job["status"] in ("failed", "cancelled", "validation_failed"):
            raise RuntimeError(f"Job {job_id} ended with {job['status']} (credits refunded)")
        time.sleep(12)

Node.js 18+ (native fetch)

const API = "https://api.legit2compute.com";
const H = { "x-api-key": process.env.L2C_API_KEY, "content-type": "application/json" };

export async function generateVideo({ prompt, seconds = 5, width = 1280, height = 704, imageUrl }) {
  const sub = await fetch(`${API}/jobs`, {
    method: "POST", headers: H,
    body: JSON.stringify({
      pipeline: imageUrl ? "video_i2v" : "video_t2v",
      ...(imageUrl ? { inputImage: imageUrl } : {}),
      inputData: { prompt, width, height, seconds },
    }),
  }).then((r) => r.json());
  const id = sub.job.job_id;
  for (;;) {
    const { job } = await fetch(`${API}/jobs/${id}`, { headers: H }).then((r) => r.json());
    if (job.status === "completed") {
      return Buffer.from(await (await fetch(`${API}/jobs/${id}/download`, { headers: H })).arrayBuffer());
    }
    if (["failed", "cancelled", "validation_failed"].includes(job.status)) {
      throw new Error(`Job ${id}: ${job.status} (credits refunded)`);
    }
    await new Promise((r) => setTimeout(r, 12000));
  }
}

Need a no-code automation? Use the same key in our media API, agent skill, or MCP server. Looking for a browser UI instead? Try legit2cloud.

Migration questions

How long does it take to migrate a script from the discontinued Sora API?

Usually under 5 minutes. You swap one POST endpoint (/jobs), poll GET /jobs/, and fetch the MP4 from /jobs//download. Zero SDK lock-in — plain HTTP in Python, Node.js, Go, curl or n8n.

Do I need to rewrite my Sora prompts?

Usually only light tuning. Write one continuous shot in this order: what happens, motion, subject and setting, one camera move, lighting, and the exact audio cue (spoken lines in quotes + ambience).

What happens if a status poll hits a brief network error?

Treat a transient 5xx or timeout on GET /jobs/ as "still running" and retry polling — the render keeps running on our network and will not be billed twice.

Can I keep sensitive client videos off community provider machines?

Yes. Pass "private": true on the POST /jobs payload to run strictly on machines we own and operate (2× standard per-second rate).

Do you also have ready n8n workflows?

Yes — we ship tested n8n templates for text-to-video-with-sound, product-photo-to-video-ad, voiceovers, images and songs on the same API key.

More: Sora API alternative · Sora API pricing alternative · text-to-video API · image-to-video API · security & private tier.

Sora is a trademark of OpenAI. legit2compute is not affiliated with or endorsed by OpenAI.

Switch your script in 5 minutes.

Pay per finished second ($0.07/s), no subscription, failed renders refunded automatically.