Image Gen
Generate AI images through the backend generation API. Submit-only: creates a generation job and returns a jobId.
After submission, use track_progress tool to check status or wait for completion.
Model Selection
| Model |
Strengths |
Max refs |
gpt-image-2 |
Best text rendering, strongest prompt adherence |
10 |
nano-banana |
Strongest reference-image fidelity |
14 |
gpt-image-2 is the default.
nano-banana is the reference-heavy choice. Use it when reference-image fidelity matters more than text rendering, or when the user needs more than 10 reference images.
IMPORTANT: Before generating, READ the model's reference document for params, limits, and prompt tips:
gpt-image-2 → references/gpt-image-2.md
nano-banana → references/nano-banana.md
Tool Params
| Param |
Values |
Default |
aspectRatio |
1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 4:5, 5:4, 21:9 |
16:9 |
imageSize |
1K, 2K, 4K |
1K |
quality |
low, medium, high, auto (gpt-image-2 only) |
high |
referenceAssetIds |
Array of project asset ids — backend resolves bytes server-side |
— |
name |
Short descriptive asset name shown in the library |
— |
count |
Number of images to generate (1–10, each becomes a separate job) |
1 |
Defaults
- Aspect ratio: 16:9. If the project composition is not 16:9, ASK the user which aspect ratio they want before generating.
- Size: 1K.
Ask Before Submit
- Never auto-upgrade size.
- Only pass
imageSize: "2K" or "4K" when the user explicitly asks. Warn that 2K/4K are EXPERIMENTAL and may be slower.
Reference Images
Use when the user provides source material to edit, blend, or use as visual guidance (e.g. "change the background", "combine these into a poster").
- Pass project asset ids via
referenceAssetIds. The backend fetches and encodes them server-side — never pull the asset bytes yourself.
- When the user @-references an image asset, pass its id directly in
referenceAssetIds.
- Formats accepted by backend: png, jpeg, webp, svg (auto-rasterized to png), heic, heif. Each ≤ 50MB.
Run
// Basic generation
submit_image({
model: "gpt-image-2",
prompt: "a cute orange cat",
name: "Cat",
});
// With quality (gpt-image-2 only)
submit_image({
model: "gpt-image-2",
prompt: "hero poster with bold title",
quality: "high",
name: "Hero Poster",
});
// With reference images — pass project asset ids; backend resolves bytes
submit_image({
model: "gpt-image-2",
prompt: "change background to beach",
referenceAssetIds: ["<assetId>"],
name: "Beach Edit",
});
// Reference-heavy with nano-banana
submit_image({
model: "nano-banana",
prompt: "composite poster",
referenceAssetIds: ["<id1>", "<id2>"],
name: "Composite",
});
// Multiple images
submit_image({
model: "gpt-image-2",
prompt: "product shots",
count: 3,
name: "Product",
});
After submission, call the track_progress tool: action=status jobIds=<jobId> to poll, action=wait jobIds=<jobId> to block until terminal.
Rules
- Always provide
name with a short descriptive asset name.
- Default to submit-only. If there is no follow-up task, stop after submit and tell the user the job was created.
- Generation costs credits. Before submitting, briefly tell the user what you're about to generate — especially when generating multiple images.
- Do not use this skill for job management. Use
track_progress tool for that.
1---2name: image-gen3description: AI image generation via gpt-image-2 and nano-banana. Use when the user wants to generate or create an image / picture / still through the backend image-generation jobs.4---5
6# Image Gen
7
8Generate AI images through the backend generation API. Submit-only: creates a generation job and returns a `jobId`.
9
10After submission, use `track_progress` tool to check status or wait for completion.
11
12## Model Selection
13
14| Model | Strengths | Max refs |
15| ------------- | ----------------------------------------------- | -------- |
16| `gpt-image-2` | Best text rendering, strongest prompt adherence | 10 |
17| `nano-banana` | Strongest reference-image fidelity | 14 |
18
19- `gpt-image-2` is the default.
20- `nano-banana` is the reference-heavy choice. Use it when reference-image fidelity matters more than text rendering, or when the user needs more than 10 reference images.
21
22**IMPORTANT:** Before generating, READ the model's reference document for params, limits, and prompt tips:
23
24- `gpt-image-2` → [references/gpt-image-2.md](references/gpt-image-2.md)
25- `nano-banana` → [references/nano-banana.md](references/nano-banana.md)
26
27## Tool Params
28
29| Param | Values | Default |
30| ------------------- | ----------------------------------------------------------------------- | ------- |
31| `aspectRatio` | `1:1`, `16:9`, `9:16`, `4:3`, `3:4`, `3:2`, `2:3`, `4:5`, `5:4`, `21:9` | `16:9` |
32| `imageSize` | `1K`, `2K`, `4K` | `1K` |
33| `quality` | `low`, `medium`, `high`, `auto` (gpt-image-2 only) | `high` |
34| `referenceAssetIds` | Array of project asset ids — backend resolves bytes server-side | — |
35| `name` | Short descriptive asset name shown in the library | — |
36| `count` | Number of images to generate (1–10, each becomes a separate job) | `1` |
37
38## Defaults
39
40- Aspect ratio: **16:9**. If the project composition is not 16:9, ASK the user which aspect ratio they want before generating.
41- Size: **1K**.
42
43## Ask Before Submit
44
45- Never auto-upgrade size.
46- Only pass `imageSize: "2K"` or `"4K"` when the user explicitly asks. Warn that 2K/4K are EXPERIMENTAL and may be slower.
47
48## Reference Images
49
50Use when the user provides source material to edit, blend, or use as visual guidance (e.g. "change the background", "combine these into a poster").
51
52- Pass project asset ids via `referenceAssetIds`. The backend fetches and encodes them server-side — never pull the asset bytes yourself.
53- When the user @-references an image asset, pass its id directly in `referenceAssetIds`.
54- Formats accepted by backend: png, jpeg, webp, svg (auto-rasterized to png), heic, heif. Each ≤ 50MB.
55
56## Run
57
58```ts
59// Basic generation
60submit_image({
61 model: "gpt-image-2",
62 prompt: "a cute orange cat",
63 name: "Cat",
64});
65
66// With quality (gpt-image-2 only)
67submit_image({
68 model: "gpt-image-2",
69 prompt: "hero poster with bold title",
70 quality: "high",
71 name: "Hero Poster",
72});
73
74// With reference images — pass project asset ids; backend resolves bytes
75submit_image({
76 model: "gpt-image-2",
77 prompt: "change background to beach",
78 referenceAssetIds: ["<assetId>"],
79 name: "Beach Edit",
80});
81
82// Reference-heavy with nano-banana
83submit_image({
84 model: "nano-banana",
85 prompt: "composite poster",
86 referenceAssetIds: ["<id1>", "<id2>"],
87 name: "Composite",
88});
89
90// Multiple images
91submit_image({
92 model: "gpt-image-2",
93 prompt: "product shots",
94 count: 3,
95 name: "Product",
96});
97```
98
99After submission, call the `track_progress` tool: `action=status jobIds=<jobId>` to poll, `action=wait jobIds=<jobId>` to block until terminal.
100
101## Rules
102
103- Always provide `name` with a short descriptive asset name.
104- Default to submit-only. If there is no follow-up task, stop after submit and tell the user the job was created.
105- Generation costs credits. Before submitting, briefly tell the user what you're about to generate — especially when generating multiple images.
106- Do not use this skill for job management. Use `track_progress` tool for that.