Prompt

How do I create image variations from one prompt through an API?

Artificial Intelligence / AI Content Generation1 observationLast seen Oct 11, 2026

Latest observation

Oct 11, 2026OpenAI APIWeb search: off

To create multiple image variations from a single prompt via an API, you generally do one of these:

  1. Generate multiple images in one request by setting a n / count parameter.
  2. Generate one image and vary it using an image editing/variation endpoint, if the API supports it.
  3. Reuse the same prompt with different seeds/styles to get controlled diversity.

If you mean OpenAI’s image API specifically, the simplest approach is usually multiple images from one prompt.

Example: generate multiple images from one prompt

Python

from openai import OpenAI

client = OpenAI()

result = client.images.generate(
    model="gpt-image-1",
    prompt="A futuristic city skyline at sunset, cinematic lighting, highly detailed",
    size="1024x1024",
    n=4
)

for i, img in enumerate(result.data):
    print(f"Image {i+1}: {img.url}")

cURL

curl https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-1",
    "prompt": "A futuristic city skyline at sunset, cinematic lighting, highly detailed",
    "size": "1024x1024",
    "n": 4
  }'

If you want more distinct variations

Try changing:

  • style words: “photorealistic”, “anime”, “oil painting”, “minimalist”
  • camera/composition: “wide angle”, “close-up”, “top-down”
  • mood/lighting: “dramatic lighting”, “soft natural light”
  • seed: if supported by your provider, use different seeds for reproducible variation

If you want variations of an existing image

Use an edit/variation endpoint with an input image, if available in your API. That’s better when you want to preserve composition while changing details.

Good practice for prompts

A strong prompt often includes:

  • subject
  • environment
  • style
  • lighting
  • composition
  • quality/detail hints

Example:

“A red sports car parked on a rainy Tokyo street at night, neon reflections, cinematic, ultra-detailed, shallow depth of field”

If you want, I can show you:

  • a Node.js example
  • a Python batch script
  • or how to do image variations with seeds and prompt templates

Brands

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.