Share via

Request for Assistance: Errors with "images/edits" Endpoint for Azure AI gpt-image-1.5/1.0

2026-03-31T09:36:21.9233333+00:00

Hi Team,

I am doing a poc on generating and editing the image using gpt-image-1.5 and gpt-image-1.0. Problem is that both the models working fine while generating an image but while editing (/images/edits) the 1.5 model responded back with a 404 error, and 1.0 model responded back with "Your request was rejected by the safety system". I just wanted to check is there any workaround here to make it work either via SDK or REST API.

Also, it seems like gpt-image-1.5 model working in azure ai foundry playgroud but why it is n't working through endpoint(/images/edits)
Also, please let me know if i can use different model to edit the image.

Azure OpenAI Service
Azure OpenAI Service

An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.


Answer accepted by question author
  1. Anshika Varshney 9,740 Reputation points Microsoft External Staff Moderator
    2026-04-05T18:30:44.1433333+00:00

    Hi Chennakesavulu, Venkata Rohith (Cognizant),

    Thanks for sharing the details.

    About the 404 error with gpt image 1.5 when calling images edits. A 404 usually means the endpoint you are calling is not available in the way it is being invoked. In your case, this can happen if the URL format or the api version does not match what Azure expects for image editing. Azure documentation shows that GPT image models support editing, including inpainting and variations, but you must use the correct Azure image generation API flow and supported api version. Please cross check your endpoint format and api version using the official Azure image generation guide for GPT image models.

    A good next step is to verify you are using the Azure documented image generation endpoint pattern for GPT image models and not mixing it with another base path. The official how to guide is here and includes the supported models and capabilities. Azure OpenAI image generation models

    Also note that the Azure AI Foundry playground can sometimes work even when your direct REST call fails, because the playground may route requests through an internal workflow. So, the playground working does not always guarantee that the same route is exposed the same way for your direct call. This difference is exactly what you are seeing.

    About gpt image 1.0 returning Your request was rejected by the safety system. This is a safety filter block. It means either the input image or the edit prompt is being flagged by the safety system. There is no supported bypass for this. The only practical way is to adjust the edit prompt to be more neutral and avoid sensitive or risky content, and also test with a different source image to see if the input itself is triggering the block.

    Here are simple troubleshooting steps you can try.

    Check endpoint and api version Make sure you are using the Azure documented image generation and editing flow for GPT image models and the api version shown in the Azure guide. A mismatch in api version or path is a common reason for 404. [stackoverflow.com]

    Validate the request format for edits For edits, ensure you are sending the image and optional mask in the required multipart form format, because edits are not sent the same way as a normal JSON text request. The Azure image generation documentation covers this at a high level and the model capabilities table confirms editing is supported for GPT image models.

    Handle safety rejection If the request is rejected by the safety system, simplify the prompt and avoid instructions that could be interpreted as unsafe. Also try a different input image to confirm whether the source image is the trigger. There is no supported override for safety blocks. [ai.azure.com]

    Alternative approach If your main goal is editing workflows, you can also consider using the Responses API image tool for multi-step flows. OpenAI documentation explains that image generation can be done via the image API or the Responses API, depending on the workflow. In Azure, the official guidance is still to follow the Azure image generation models documentation for supported usage. [developers...openai.com]

    Model catalog page for gpt image 1.5 and its capabilities gpt-image-1.5 model catalog

    I hope this helps. If you can share which exact endpoint URL format and api version you are using for images edits, it becomes much easier to spot why you are getting the 404.
    Thankyou!


1 additional answer

Sort by: Most helpful
  1. Q&A Assist
    2026-03-31T09:36:46.7066667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    For gpt-image models in Azure AI, image generation and image editing are handled by the same safety and platform controls, and the behavior seen matches the documented troubleshooting patterns.

    1. 404 when calling /images/edits with gpt-image-1.5
    • A 404 from the image endpoint indicates that the specific route or capability is not available as invoked.
    • The documentation only describes generic image generation behavior and troubleshooting (including content filtering, rate limits, auth, and timeouts) and does not list a separate, guaranteed-available /images/edits operation for all gpt-image model versions.
    • The fact that gpt-image-1.5 works in the Azure AI Foundry playground but returns 404 on /images/edits strongly indicates that the public REST/SDK surface for that specific edit route is not exposed or supported for that model/operation combination, even though the playground can provide editing via internal wiring.
    • There is no documented workaround in REST or SDK to force /images/edits to work with gpt-image-1.5 beyond using the supported image generation APIs.
    1. “Your request was rejected by the safety system” with gpt-image-1.0
    • The error text matches the documented content filter behavior:
      • When a prompt or image is flagged, the API returns an error with error.code = contentFilter and a message such as "Your task failed as a result of our safety system." or "Generated image was filtered as a result of our safety system.".
    • This means the request (prompt and/or source image) violates the safety policy for image operations.
    • The only documented mitigation is to change the request so it passes the safety system:
      • Adjust the prompt to remove or soften content that could be considered unsafe.
      • Use a different source image that does not trigger the filter.
    • There is no supported override or bypass of the safety system, either via SDK or REST.
    1. Using other models or approaches for editing
    • The documentation describes image generation models and their common troubleshooting behavior but does not list an alternative model or a different endpoint that guarantees support for /images/edits specifically.
    • It only states that:
      • Prompts/images are filtered and may return contentFilter errors.
      • 429, 401, and timeout behaviors apply as described.
    • Based on the available information, the supported path is to:
      • Use the documented image generation APIs for the gpt-image models that are available in the region.
      • Ensure prompts and images comply with the safety policy to avoid contentFilter errors.
      • There is no documented alternative model or endpoint in this context that explicitly enables image editing when /images/edits is returning 404.
    1. General troubleshooting steps that apply to all image operations
    • If additional errors occur beyond the 404 and safety rejection:
      • For 429: wait and retry or request a quota increase in the Azure portal.
      • For 401: verify the API key or, for managed identity, ensure the identity has the Cognitive Services OpenAI User role on the resource.
      • For timeouts: use streaming, simplify prompts, or use smaller image sizes.

    In summary, the behavior observed is consistent with the documented safety and endpoint behavior: 404 indicates the edit route is not available as used for gpt-image-1.5, and the safety error for gpt-image-1.0 is a content filter rejection that can only be addressed by changing the prompt/image, not by a workaround in SDK or REST.


    References:

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.