Direct answer
You can’t run a new demo against OpenAI’s Sora API: OpenAI says it discontinued the API on September 24, 2026. OpenAI lists April 26, 2026, as the discontinuation date for its Sora web and app experiences. An older code sample or API tutorial does not show that the discontinued service still works. (OpenAI Help Center.)
Azure is a separate route, not the discontinued direct OpenAI API. Microsoft Learn still publishes a Sora 2 video-generation overview marked preview and describes an Azure workflow. But that documentation does not establish whether a new deployment is currently available for your specific subscription and region. Treat Azure as a documented possibility—not a confirmed, runnable alternative—until you verify deployment availability in your Azure account. (Microsoft Learn.)
What Microsoft documents about the Azure route
Microsoft describes video generation as an asynchronous job: submit a request, check the job’s status, and retrieve the completed video through a download URL. Its documentation lists an Azure subscription, a resource in a supported region, and deployment of the Sora 2 model as prerequisites. It specifies Python 3.8 or later, recommending Python 3.10 or later. These are documentation requirements; they do not confirm that a deployment is currently available to you.
The same documentation describes text-to-video, image-to-video, video remix, and audio in generated videos. It also states that Sora 2 blocks IP and photorealistic content and that Azure applies safety protections. These are claims about the documented Azure preview route, not guarantees that a particular deployment is active or that every request will succeed.
This article does not give a copy-and-run Azure code sample. The material available here does not establish current deployment availability for a reader’s subscription and region or confirm the currently deployable model version. Without those facts—and a current, route-specific request and result flow—a code sample would risk presenting a documented preview as a working demo.
Before attempting the Azure route, check in Microsoft Foundry whether Sora 2 can be deployed for your subscription and region. If it can, follow Microsoft’s current quickstart for the deployment, credentials, request fields, job completion, and video retrieval. The overview describes the asynchronous lifecycle, but this article does not independently establish a tested end-to-end implementation.
Don’t mistake an old Replicate snippet for a current OpenAI demo
A third-party article edited in October 2025 showed Python code using replicate.run("openai/sora-2", ...). That is a Replicate-provider example, not a direct OpenAI API call. The captured snippet shows a prompt, a 10-second duration, and a landscape aspect ratio, but does not establish that the code was tested or remains usable. It also omits setup, authentication, job handling, and documented video retrieval. (eesel AI’s article.)
Using the Sora app or website was not API integration, and OpenAI says those experiences were discontinued on April 26, 2026.
What a demo can—and can’t—establish
A successful Azure preview run could show that a particular deployment completed a generation and returned a video. It would not establish that the route will remain available, that it is suitable for production, or that results will be consistent. For direct OpenAI API access, the current answer is clear: OpenAI says the Sora API was discontinued on September 24, 2026.
Sources
What to know about the Sora discontinuation — OpenAI Help Center
Sora 2 video generation overview (preview) — Microsoft Learn
Sora 2 in the API: A developer's guide to features, access, and pricing
