An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Hello Mahendra, Talari Surya (Cognizant),
Welcome to Microsoft Q&A and Thank you for the questions.
You’re currently seeing two separate behaviors:
-
gpt-image-1.5→ 404 error on/images/edits -
gpt-image-1.0→ Request blocked by safety system - Playground → Image edit works
- API → Fails
These are not caused by a single issue, but rather by model capability differences and safety enforcement behavior in Azure OpenAI APIs.
1. gpt-image-1.5 - 404 on /images/edits
The 404 error you are encountering when calling the /images/edits endpoint with gpt-image-1.5 is expected with the current service behavior.
At present:
-
gpt-image-1.5supports image generation (/images/generations) - It does not support image editing (
/images/edits) via API
When an unsupported operation is invoked for a model, the service returns:
404 Resource Not Found, since that route is not enabled for that model
Why it appears to work in Playground
The Azure AI Playground can sometimes give the impression that a feature is supported because:
- It may internally use a different model or fallback configuration
- It may route requests through internal pathways not exposed publicly via API
So while the Playground is useful for testing, it does not always reflect exact API-level capabilities
2. gpt-image-1.0 - Safety rejection on edit requests
For gpt-image-1.0, the /images/edits endpoint is supported. However, your requests are being rejected by the content safety system.
The error 'Your request was rejected by the safety system…'
indicates that either the prompt, The input image or the combination of both
is being flagged under Azure’s safety policies.
Why it works in Playground but fails in API
This is a common point of confusion. The difference is due to how requests are handled:
In Playground
Prompts may be pre-processed, Slightly modified or normalized
Some guardrails may be Adjusted for testing scenarios
In API
Requests are evaluated as-is
Safety filters are applied strictly and consistently
So even if the same prompt is used, the actual payload reaching the model may differ slightly, leading to different outcomes.
Common reasons for safety rejection in image edits
Even prompts that seem valid can be blocked if they involve:
Editing images of people or faces
Modifying appearance, identity, or body features
Content that could be interpreted as:
- Sensitive
- Medical
- Biometric-related
Additionally, The input image itself is also evaluated, not just the prompt
Recommendations
For gpt-image-1.5
- Use it only for image generation
- Avoid using
/images/editsas it is not supported currently
For gpt-image-1.0
To reduce safety rejections:
Keep prompts neutral and descriptive
Avoid References to specific individuals, Sensitive transformations (face, body, identity changes)
Start with Simple, non-sensitive images.
Please refer this
Call the Image Edit API (Python, REST, Java, PowerShell) https://learn.microsoft.com/azure/foundry/openai/how-to/dall-e?wt.mc_id=knowledgesearch_inproduct_azure-cxp-community-insider#call-the-image-edit-api
Understanding Image Content Filtering https://learn.microsoft.com/azure/ai-services/openai/concepts/content-filter?tabs=definitions%2Cuser-prompt%2Cpython-new#image-content
I Hope this helps. Do let me know if you have any further queries.
If this answers your query, please do click Accept Answer and Yes for was this answer helpful.
Thank you!