Prompt
How do I use negative prompts in an image generation endpoint?
Latest observation
Oct 19, 2026
OpenAI APIWeb search: off
Negative prompts are usually used to describe what you don’t want in the generated image. In an image generation endpoint, you typically pass them as a separate field alongside the main prompt.
Basic idea
- Prompt: what you want
- Negative prompt: what to avoid
Example:
{
"prompt": "a photorealistic portrait of a woman in a red dress",
"negative_prompt": "blurry, low quality, extra fingers, distorted face"
}
Typical usage
Depending on the API, the parameter may be named:
negative_promptnegativePromptavoidexclude
Example request
response = client.images.generate(
model="your-model",
prompt="a futuristic city at sunset",
negative_prompt="dark, foggy, low detail, blurry"
)
Tips
- Keep the negative prompt specific and concise.
- Common exclusions:
blurrylow qualitybad anatomyextra limbswatermarktext
- Too many negatives can sometimes hurt image quality or make the result less creative.
If your endpoint doesn’t support negative prompts
Some image generation APIs don’t offer a dedicated negative prompt field. In that case, you may need to:
- incorporate exclusions into the main prompt, or
- use model-specific guidance parameters if available.
If you want, I can show you how to do this for a specific API or SDK.