Share via

Can't use sora2 via APIM

Bbik Admin 0 Reputation points
2026-03-02T07:09:51.13+00:00

I am trying to access Sora-2 on Azure AI Foundry through Azure API Management (APIM), but I am encountering a 404 Resource not found error. I am unsure if the backend provider configuration is incorrect or if APIM does not yet support this specific endpoint.

Based on our testing, we can successfully request the Sora-2 model to generate videos directly via the Azure AI Foundry project endpoint. Below is the working curl command and the successful response for reference
curl -X POST "https://project-ai-passport-non-resource.openai.azure.com/openai/v1/videos" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer [key]" \ -d '{ "prompt" : "A video of a cat", "size" : "720x1280","seconds" : "4", "model": "sora-2-2"}'

{ "id": "video_69a52a41a8ac8190854ac0124f1cebd9", "object": "video", "created_at": 1772431937, "status": "queued", "model": "sora-2-2", "prompt": "A video of a cat", "seconds": "4", "size": "720x1280" }

Azure API Management
Azure API Management

An Azure service that provides a hybrid, multi-cloud management platform for APIs.

{count} votes

1 answer

Sort by: Most helpful
  1. Siddhesh Desai 4,030 Reputation points Microsoft External Staff Moderator
    2026-03-02T07:33:57.0233333+00:00

    Hi @Bbik Admin

    Thank you for reaching out to Microsoft Q&A.

    The behavior you are seeing is expected with the current Azure API Management (APIM) and Azure AI Foundry integration. Although the Sora‑2 model can be successfully invoked directly through the Azure AI Foundry project endpoint using the OpenAI v1-style /openai/v1/videos API, this endpoint is not yet supported by APIM’s built‑in Azure OpenAI / Foundry provider or its standard OpenAPI definitions. APIM resolves incoming requests based on defined operations; since /openai/v1/videos is not part of the currently supported Azure OpenAI operations in APIM, the request never reaches the backend service and APIM returns a 404 Resource not found. This is not caused by authentication, network configuration, or an incorrect backend URL, but by a functional gap where APIM does not yet recognize or expose the Sora‑2 video generation endpoint.

    Refer below points to resolve this issue or this is the workaround

    Use Azure AI Foundry project endpoint directly for Sora‑2

    At present, the only fully supported and recommended approach is to bypass APIM and call the Azure AI Foundry project endpoint directly for Sora‑2 video generation. This ensures compatibility with the /openai/v1/videos API and avoids the 404 error returned by APIM. This is the same approach you are already using successfully with your curl request.

    Keep APIM for other Azure OpenAI workloads

    You can continue to use APIM for models and operations that rely on the traditional Azure OpenAI deployment‑based APIs (for example, chat completions, embeddings, or image generation). Sora‑2 can be handled separately until APIM adds first‑class support for the video endpoint.

    (Optional) Create a custom pass‑through API in APIM

    As an unsupported workaround, you may manually create a Blank API in APIM with a custom operation that maps to /openai/v1/videos and forwards requests to the Azure AI Foundry project endpoint. This approach requires maintaining the API definition yourself and is not officially supported, but it can be used if APIM policies (logging, throttling, subscription keys) are mandatory for your architecture.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.