Generate AI Image
Generate an image from a text prompt using Simplified, across many leading AI
providers, and return a viewable image URL (plus an asset id you can reuse).
What it can do
- Text-to-image (
capability: "prompt") — make an image from a description.
- Image editing / image-to-image (
capability: "reference_image") — transform
or edit using one reference image.
- Multi-reference composition (
capability: "multiple_images") — guide with
several reference images (supported on some models).
Good for: product shots, hero/banner images, social graphics, illustrations,
3D-style renders, icons/logo concepts, photoreal scenes, and text rendered inside
the image (posters, quote cards, ad headlines).
How to use it
- Discover — call
api_getModelFields(type: "image") to get the current list of
models, capabilities, and credit costs. Filter out models that cannot satisfy the
requested capability; don't choose on model name alone.
- Choose the model — use Model selection. For the selected
model, call
api_getModelFields(type: "image", model_id, capability) and use its
exact parameters schema. This is the source of truth; don't guess model ids,
capabilities, field names, or costs.
- Choose storage —
transient for a one-off, asset to reuse the image (e.g.
post it via the simplified-social skill).
- Explain the choice when it matters — before a costly or ambiguous request,
name the selected model, why it fits, and the discovered credit cost. If the user
explicitly chose a model, honor it when it supports the requested capability.
- Generate — call
api_generateImage with parameters matching the discovered
schema. This spends credits.
- Present the result — show the returned URL as a link, never embedded (see
Presenting the result).
For an ordinary prompt-only request, use the quality-first default below after
confirming it is still available. Always inspect live fields for reference-image,
multi-image, exact-size, quality, or resolution requests.
The request
The tools
api_getModelFields — discover available models and the per-(model, capability)
field schema. Read-only, spends no credits. Call it first.
api_generateImage — consumes paid AI credits.
Fields
Top-level fields for api_generateImage:
model — a model id from api_getModelFields (e.g. google.gemini-3.1-flash-image-preview).
capability — prompt | reference_image | multiple_images.
storage — see Storage (default transient).
parameters — a required nested object; never flatten its fields to the top
level, and put the prompt text in parameters.prompt (not in capability).
The exact keys inside parameters vary by model — get them from
api_getModelFields(type: "image", model_id, capability), don't assume. They differ
in real ways: most models take aspect_ratio, but OpenAI GPT Image uses size +
quality + count, Gemini adds image_size, Flux 2 uses resolution, and the
reference-image field is variously named input_image, image_prompt,
reference_images, source_image, or style_reference_images.
Resolving Simplified asset references
Treat a Simplified asset_id as the canonical reference, but follow the live model
schema at the generation boundary. When a model field is a URL or URL list (for
example Gemini reference_images):
- Call
api_getAsset with the permanent asset UUID.
- Require
status: 4 (DONE) and the expected asset_type before generating.
- Pass the current
file_url returned by api_getAsset into the model-specific
reference field. If the URL is signed, preserve its complete query string and use
it before expiry.
- Do not trust a cached URL copied from a brand-kit record when an
asset_id is
available. Brand records can contain stale or malformed derived URLs; resolve the
ID immediately before generation instead.
In short: IDs at rest, URLs at the model boundary, IDs downstream. Do not pass a
client-local path to the hosted connector.
Storage
storage |
Behavior |
transient |
Default. Temporary URL, not saved, expires. Best for one-off images. |
asset |
Persistent — no expiry, returns an asset_id. Use when you want to reuse the image, e.g. attach it to a post via the simplified-social skill (pass the asset_id in media). |
default |
Saved to your AiImageArt gallery. |
Examples
Text-to-image (default, transient):
{ "model": "google.gemini-3.1-flash-image-preview", "capability": "prompt", "storage": "transient",
"parameters": { "prompt": "A white ceramic coffee cup on a clean white background", "aspect_ratio": "1:1" } }
Keep it to reuse / post to social (asset):
{ "model": "google.gemini-3.1-flash-image-preview", "capability": "prompt", "storage": "asset",
"parameters": { "prompt": "product hero shot of sneakers", "aspect_ratio": "4:5" } }
Edit / reference-guided — the reference field name is model-specific; take it from
api_getModelFields (here input_image for a Flux Kontext model, not a guessed name):
{ "model": "flux.flux-kontext-pro", "capability": "reference_image", "storage": "asset",
"parameters": { "prompt": "put this logo on a t-shirt", "input_image": "<asset_uuid_or_https_url>" } }
Model selection
Choose for the requested outcome, not provider popularity. These routes are maintained
defaults, but model availability, capabilities, parameters, and credits can change;
api_getModelFields(type: "image") remains authoritative.
| User need |
Preferred model |
Why / tradeoff |
| Normal social image, product shot, illustration, character continuity, or general edit |
google.gemini-3.1-flash-image-preview |
Quality-first default. Strong all-around prompt following and reference fidelity. Do not interpret “Flash” as the cheapest option. |
| Complex professional design, dense typography/layout, menu, invitation, high-fidelity product mockup, factual visualization, or explicit 4K |
google.gemini-3-pro-image-preview |
Premium quality and instruction handling; slower and typically costs more. Use only when the request benefits from it. |
| Budget-sensitive generation or explicit GPT Image request |
openai.imgen-2 |
The catalog's credits_per_image is a baseline, not the final charge. Cost varies with size, quality, and count. Use the live API field quality: "auto" (the operational “effort auto” setting) unless the user requests a different quality. It uses size rather than aspect_ratio. |
| Short headline or typography-first poster/banner |
ideogram.ideogram-v3-turbo |
Specialized text rendering. Prefer Gemini Pro when the design also requires a dense or complex professional layout. |
| Targeted edit with a single source image |
google.gemini-3.1-flash-image-preview; flux.flux-kontext-pro when explicitly requested or better suited by live metadata |
Default to Gemini for fidelity. Flux Kontext is a specialized alternative; inspect its input_image contract first. |
| Many reference images or exact reference limits |
Best compatible model returned live |
Filter by multiple_images and the discovered reference limit. Never assume every model accepts the same number or field name. |
| User names Flux, Seedream, Qwen, Stable Diffusion, or another available model |
The requested model, if compatible |
Respect an explicit preference. Otherwise do not automatically route to an unvalidated specialist merely because it is available or cheaper. |
Routing rules
- Infer the hard constraints: capability, reference count, aspect ratio/size,
resolution, text/layout complexity, budget, and any explicit provider choice.
- Filter the live catalog by those constraints.
- Use Gemini 3.1 Flash when no stronger constraint applies. Upgrade to Gemini 3 Pro
only for the professional-design cases above. Consider GPT Image 2 when minimizing
credits is explicit or as the first fallback, but state that its live catalog rate
is only a baseline and the final charge varies with
size, quality, and count.
Default to size: "auto", quality: "auto", and count: 1 unless the request
requires different values.
- For a typography-first graphic, choose Ideogram Turbo; for dense layout or 4K,
choose Gemini Pro instead.
- Never silently change models after an error. Report the failure and proposed
fallback with its live credit cost, then regenerate only when the user's existing
intent clearly authorizes the additional spend.
When a request is ambiguous and the choice materially changes cost or output, offer
the most relevant two choices, leading with the recommended model. Do not dump the
entire catalog on the user.
Response
The response shape depends on storage:
transient (default) — result is a list of URL strings:
{ "status": "SUCCESS", "detail": { "result": ["https://replicate.delivery/…/out-0.webp"], "transient": true } }
Read detail.result[0] (a URL string). No asset_id — the URL is temporary.
asset — result is a list of objects with a reusable id:
{ "status": "SUCCESS", "detail": { "result": [{ "asset_id": "<uuid>", "url": "https://…/image.webp?Expires=…" }], "transient": false, "storage": "asset" } }
Read detail.result[0].url (the image; signed URL — expires) and
detail.result[0].asset_id (permanent — hand off to simplified-social's media).
Output format varies by model and provider. Inspect the returned asset or response
metadata instead of assuming WebP; for example, Gemini may return JPEG.
Presenting the result
Never embed the returned image URL with Markdown image syntax (), and
never do anything that makes the client fetch/render the image inline. Always present
the result as a plain URL or a Markdown link the user can click:
- ✅
Here's your image: https://…/out-0.webp
- ✅
[View generated image](https://…/out-0.webp)
- ❌

Reasons: these URLs are signed and expire, inline rendering fails or shows a
broken image, and clients like Codex otherwise try to display the asset instead of
handing the user a usable link — poor UX. When storage:"asset", also surface the
permanent asset_id (as text) so it can be reused with simplified-social.
Gotchas
- Discover before generating. Call
api_getModelFields to confirm the model id
and parameters schema — it eliminates 400 errors on invalid/missing keys and
prevents routing from stale model or credit assumptions.
- Resolve asset-backed references before generating. Use
api_getAsset, require
status: 4, and pass its current file_url when the live model field expects a
URL. Keep the source asset_id for future runs.
- Generation spends credits. If the request is ambiguous, restate what you'll
generate and confirm once. If it's explicit, proceed.
- Do not overstate GPT Image 2 pricing. Treat
credits_per_image as baseline
metadata. Final usage varies with size, quality, and count. The live API calls
the effort control quality; use quality: "auto" for the usual “effort auto”
behavior and never describe the baseline as the guaranteed charge.
429 = AI credits exhausted; tell the user plainly and don't retry.
- On error, report it; don't silently retry.
Example prompts to try
- "A minimalist product photo of a white ceramic coffee cup on a clean white background, soft studio lighting"
- "A vibrant 3D render of a friendly robot mascot, pastel colors, studio lighting, 1:1"
- "A cinematic 16:9 landscape of snowy mountains at golden hour"
- "A flat vector app icon of a paper plane, rounded corners, blue gradient"
- "A bold quote card that says 'Ship it' in modern type" (use
ideogram.ideogram-v3-turbo for crisp text)
1---2name: generate-image3description: Generate AI images with Simplified — text-to-image, image editing, and reference-guided generation across Flux, Google (Gemini/Imagen), OpenAI GPT Image, Ideogram, Stable Diffusion, Qwen and Seedream. Use when the user asks to create, generate, make, draw, or design an image, photo, picture, graphic, logo, poster, banner, icon, or illustration from a description.4---56# Generate AI Image78Generate an image from a text prompt using Simplified, across many leading AI9providers, and return a viewable image URL (plus an asset id you can reuse).1011## What it can do1213- **Text-to-image** (`capability: "prompt"`) — make an image from a description.14- **Image editing / image-to-image** (`capability: "reference_image"`) — transform15 or edit using one reference image.16- **Multi-reference composition** (`capability: "multiple_images"`) — guide with17 several reference images (supported on some models).1819Good for: product shots, hero/banner images, social graphics, illustrations,203D-style renders, icons/logo concepts, photoreal scenes, and **text rendered inside21the image** (posters, quote cards, ad headlines).2223## How to use it24251. **Discover** — call `api_getModelFields(type: "image")` to get the current list of26 models, capabilities, and credit costs. Filter out models that cannot satisfy the27 requested capability; don't choose on model name alone.282. **Choose the model** — use [Model selection](#model-selection). For the selected29 model, call `api_getModelFields(type: "image", model_id, capability)` and use its30 exact `parameters` schema. This is the source of truth; don't guess model ids,31 capabilities, field names, or costs.323. **Choose storage** — `transient` for a one-off, `asset` to reuse the image (e.g.33 post it via the `simplified-social` skill).344. **Explain the choice when it matters** — before a costly or ambiguous request,35 name the selected model, why it fits, and the discovered credit cost. If the user36 explicitly chose a model, honor it when it supports the requested capability.375. **Generate** — call `api_generateImage` with `parameters` matching the discovered38 schema. This spends credits.396. **Present the result** — show the returned URL as a link, never embedded (see40 [Presenting the result](#presenting-the-result)).4142For an ordinary prompt-only request, use the quality-first default below after43confirming it is still available. Always inspect live fields for reference-image,44multi-image, exact-size, quality, or resolution requests.4546## The request4748### The tools4950- **`api_getModelFields`** — discover available models and the per-(model, capability)51 field schema. Read-only, spends **no credits**. Call it first.52- **`api_generateImage`** — **consumes paid AI credits**.5354### Fields5556Top-level fields for `api_generateImage`:5758- `model` — a model id from `api_getModelFields` (e.g. `google.gemini-3.1-flash-image-preview`).59- `capability` — `prompt` | `reference_image` | `multiple_images`.60- `storage` — see [Storage](#storage) (default `transient`).61- `parameters` — a **required nested object**; never flatten its fields to the top62 level, and put the prompt text in `parameters.prompt` (not in `capability`).6364The **exact keys inside `parameters` vary by model** — get them from65`api_getModelFields(type: "image", model_id, capability)`, don't assume. They differ66in real ways: most models take `aspect_ratio`, but OpenAI GPT Image uses `size` +67`quality` + `count`, Gemini adds `image_size`, Flux 2 uses `resolution`, and the68reference-image field is variously named `input_image`, `image_prompt`,69`reference_images`, `source_image`, or `style_reference_images`.7071### Resolving Simplified asset references7273Treat a Simplified `asset_id` as the canonical reference, but follow the live model74schema at the generation boundary. When a model field is a URL or URL list (for75example Gemini `reference_images`):76771. Call `api_getAsset` with the permanent asset UUID.782. Require `status: 4` (`DONE`) and the expected `asset_type` before generating.793. Pass the current `file_url` returned by `api_getAsset` into the model-specific80 reference field. If the URL is signed, preserve its complete query string and use81 it before expiry.824. Do not trust a cached URL copied from a brand-kit record when an `asset_id` is83 available. Brand records can contain stale or malformed derived URLs; resolve the84 ID immediately before generation instead.8586In short: **IDs at rest, URLs at the model boundary, IDs downstream.** Do not pass a87client-local path to the hosted connector.8889### Storage9091| `storage` | Behavior |92|---|---|93| `transient` | **Default.** Temporary URL, not saved, expires. Best for one-off images. |94| `asset` | Persistent — no expiry, returns an `asset_id`. Use when you want to **reuse** the image, e.g. attach it to a post via the `simplified-social` skill (pass the `asset_id` in `media`). |95| `default` | Saved to your AiImageArt gallery. |9697### Examples9899**Text-to-image (default, transient):**100```json101{ "model": "google.gemini-3.1-flash-image-preview", "capability": "prompt", "storage": "transient",102 "parameters": { "prompt": "A white ceramic coffee cup on a clean white background", "aspect_ratio": "1:1" } }103```104105**Keep it to reuse / post to social (asset):**106```json107{ "model": "google.gemini-3.1-flash-image-preview", "capability": "prompt", "storage": "asset",108 "parameters": { "prompt": "product hero shot of sneakers", "aspect_ratio": "4:5" } }109```110111**Edit / reference-guided** — the reference field name is model-specific; take it from112`api_getModelFields` (here `input_image` for a Flux Kontext model, not a guessed name):113```json114{ "model": "flux.flux-kontext-pro", "capability": "reference_image", "storage": "asset",115 "parameters": { "prompt": "put this logo on a t-shirt", "input_image": "<asset_uuid_or_https_url>" } }116```117118## Model selection119120Choose for the requested outcome, not provider popularity. These routes are maintained121defaults, but model availability, capabilities, parameters, and credits can change;122`api_getModelFields(type: "image")` remains authoritative.123124| User need | Preferred model | Why / tradeoff |125|---|---|---|126| Normal social image, product shot, illustration, character continuity, or general edit | `google.gemini-3.1-flash-image-preview` | **Quality-first default.** Strong all-around prompt following and reference fidelity. Do not interpret “Flash” as the cheapest option. |127| Complex professional design, dense typography/layout, menu, invitation, high-fidelity product mockup, factual visualization, or explicit 4K | `google.gemini-3-pro-image-preview` | Premium quality and instruction handling; slower and typically costs more. Use only when the request benefits from it. |128| Budget-sensitive generation or explicit GPT Image request | `openai.imgen-2` | The catalog's `credits_per_image` is a **baseline**, not the final charge. Cost varies with `size`, `quality`, and `count`. Use the live API field `quality: "auto"` (the operational “effort auto” setting) unless the user requests a different quality. It uses `size` rather than `aspect_ratio`. |129| Short headline or typography-first poster/banner | `ideogram.ideogram-v3-turbo` | Specialized text rendering. Prefer Gemini Pro when the design also requires a dense or complex professional layout. |130| Targeted edit with a single source image | `google.gemini-3.1-flash-image-preview`; `flux.flux-kontext-pro` when explicitly requested or better suited by live metadata | Default to Gemini for fidelity. Flux Kontext is a specialized alternative; inspect its `input_image` contract first. |131| Many reference images or exact reference limits | Best compatible model returned live | Filter by `multiple_images` and the discovered reference limit. Never assume every model accepts the same number or field name. |132| User names Flux, Seedream, Qwen, Stable Diffusion, or another available model | The requested model, if compatible | Respect an explicit preference. Otherwise do not automatically route to an unvalidated specialist merely because it is available or cheaper. |133134### Routing rules1351361. Infer the hard constraints: capability, reference count, aspect ratio/size,137 resolution, text/layout complexity, budget, and any explicit provider choice.1382. Filter the live catalog by those constraints.1393. Use Gemini 3.1 Flash when no stronger constraint applies. Upgrade to Gemini 3 Pro140 only for the professional-design cases above. Consider GPT Image 2 when minimizing141 credits is explicit or as the first fallback, but state that its live catalog rate142 is only a baseline and the final charge varies with `size`, `quality`, and `count`.143 Default to `size: "auto"`, `quality: "auto"`, and `count: 1` unless the request144 requires different values.1454. For a typography-first graphic, choose Ideogram Turbo; for dense layout or 4K,146 choose Gemini Pro instead.1475. Never silently change models after an error. Report the failure and proposed148 fallback with its live credit cost, then regenerate only when the user's existing149 intent clearly authorizes the additional spend.150151When a request is ambiguous and the choice materially changes cost or output, offer152the most relevant two choices, leading with the recommended model. Do not dump the153entire catalog on the user.154155## Response156157The response shape depends on `storage`:158159- **`transient` (default)** — `result` is a list of **URL strings**:160 ```json161 { "status": "SUCCESS", "detail": { "result": ["https://replicate.delivery/…/out-0.webp"], "transient": true } }162 ```163 Read `detail.result[0]` (a URL string). No `asset_id` — the URL is temporary.164165- **`asset`** — `result` is a list of **objects** with a reusable id:166 ```json167 { "status": "SUCCESS", "detail": { "result": [{ "asset_id": "<uuid>", "url": "https://…/image.webp?Expires=…" }], "transient": false, "storage": "asset" } }168 ```169 Read `detail.result[0].url` (the image; **signed URL — expires**) and170 `detail.result[0].asset_id` (permanent — hand off to `simplified-social`'s `media`).171172Output format varies by model and provider. Inspect the returned asset or response173metadata instead of assuming WebP; for example, Gemini may return JPEG.174175## Presenting the result176177**Never embed the returned image URL with Markdown image syntax** (``), and178never do anything that makes the client fetch/render the image inline. Always present179the result as a **plain URL or a Markdown link** the user can click:180181- ✅ `Here's your image: https://…/out-0.webp`182- ✅ `[View generated image](https://…/out-0.webp)`183- ❌ ``184185Reasons: these URLs are signed and **expire**, inline rendering fails or shows a186broken image, and clients like Codex otherwise try to display the asset instead of187handing the user a usable link — poor UX. When `storage:"asset"`, also surface the188permanent `asset_id` (as text) so it can be reused with `simplified-social`.189190## Gotchas191192- **Discover before generating.** Call `api_getModelFields` to confirm the model id193 and `parameters` schema — it eliminates 400 errors on invalid/missing keys and194 prevents routing from stale model or credit assumptions.195- **Resolve asset-backed references before generating.** Use `api_getAsset`, require196 `status: 4`, and pass its current `file_url` when the live model field expects a197 URL. Keep the source `asset_id` for future runs.198- **Generation spends credits.** If the request is ambiguous, restate what you'll199 generate and confirm once. If it's explicit, proceed.200- **Do not overstate GPT Image 2 pricing.** Treat `credits_per_image` as baseline201 metadata. Final usage varies with `size`, `quality`, and `count`. The live API calls202 the effort control `quality`; use `quality: "auto"` for the usual “effort auto”203 behavior and never describe the baseline as the guaranteed charge.204- `429` = AI credits exhausted; tell the user plainly and don't retry.205- On error, report it; don't silently retry.206207## Example prompts to try208209- "A minimalist product photo of a white ceramic coffee cup on a clean white background, soft studio lighting"210- "A vibrant 3D render of a friendly robot mascot, pastel colors, studio lighting, 1:1"211- "A cinematic 16:9 landscape of snowy mountains at golden hour"212- "A flat vector app icon of a paper plane, rounded corners, blue gradient"213- "A bold quote card that says 'Ship it' in modern type" (use `ideogram.ideogram-v3-turbo` for crisp text)