Skip to content

Can I request ten images at once with n=10?

The current image API supports n=1 only. To create several approved images, manage separate single-image tasks in your backend with individual quotes, identifiers and results. Respect shared concurrency and daily controls. A batch plan must account for each accepted generation rather than assuming one request can return an arbitrary number of images at the same price.

GENERATE AND INSPECT API IMAGESAISwapLab team · Editorial methodPublished 2 min read
Open API documentationExplore 67 Image SkillsPrivate keys · Explicit credit approval
Article workflow: Define the batch budget; Create durable child tasks; Dispatch conservatively.
Workflow diagram: Define the batch budget → Create durable child tasks → Dispatch conservatively. Read the article for evidence and limits.

One task should have one auditable result

Separate tasks let you associate each prompt, size, charge and output with the user's brief. They also make partial failure visible: nine completed images and one uncertain job are different from an all-or-nothing success. The account wallet remains shared, and several API keys do not automatically increase throughput.

What to do next

  1. 01

    Define the batch budget

    Write how many concepts the user actually approves and the maximum total allocation. Quote the intended model and settings before dispatching any work.

  2. 02

    Create durable child tasks

    Assign one unique idempotency identifier to each intended image. Store the parent batch relationship and immutable payload so worker retries recover the same child rather than creating extras.

  3. 03

    Dispatch conservatively

    Use a bounded queue and observe shared limits. Track completed, failed and unknown children independently, and retry only a justified new creative attempt with explicit approval.

A concrete example

Illustrative batch: a creator approves three distinct poster concepts. The app creates three n=1 records and processes them within capacity; a timeout on the second child does not automatically generate a fourth concept.

Before you call it ready

  • Each child has its own approved task identity.
  • Total budget includes all accepted attempts.
  • Partial outcomes remain visible.

When to stop or choose another method

If your product promises instant unlimited batch generation, revise that promise to match the current single-image and shared-capacity contract before launch.

Sources

One task. A recoverable workflow.

Check the contract, approve the quote and retain the job.

Open API documentation