Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions development/comfy-router/models.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
- [Claude Sonnet 4.6](/development/comfy-router/models/anthropic/claude-sonnet-4-6/code): `anthropic/claude-sonnet-4-6`
- [Claude Sonnet 5](/development/comfy-router/models/anthropic/claude-sonnet-5/code): `anthropic/claude-sonnet-5`

## Beeble

Check warning on line 24 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L24

Did you really mean 'Beeble'?

- [SwitchX](/development/comfy-router/models/beeble/switchx/code): `beeble/switchx`

Expand All @@ -41,7 +41,7 @@
- [Video Edit V1](/development/comfy-router/models/black-forest-labs/video-edit-v1/code): `bfl/video-edit-v1`
- [VTO V1](/development/comfy-router/models/black-forest-labs/vto-v1/code): `bfl/vto-v1`

## Bria

Check warning on line 44 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L44

Did you really mean 'Bria'?

- [Fibo](/development/comfy-router/models/bria/fibo/code): `bria/fibo`
- [Image Edit Erase](/development/comfy-router/models/bria/image-edit-erase/code): `bria/image-edit-erase`
Expand Down Expand Up @@ -73,18 +73,18 @@
- [Seedream 5.0 260128](/development/comfy-router/models/byteplus/seedream-5-0-260128/code): `byteplus/seedream-5-0-260128`
- [Seedream 5.0 Pro 260628](/development/comfy-router/models/byteplus/seedream-5-0-pro-260628/code): `byteplus/seedream-5-0-pro-260628`

## Elevenlabs

Check warning on line 76 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L76

Did you really mean 'Elevenlabs'?

- [Eleven Sfx V2](/development/comfy-router/models/elevenlabs/eleven-sfx-v2/code): `elevenlabs/eleven_sfx_v2`
- [Eleven V3](/development/comfy-router/models/elevenlabs/eleven-v3/code): `elevenlabs/eleven_v3`

## fal

Check warning on line 81 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L81

Did you really mean 'fal'?

- [H3 Max Turbo](/development/comfy-router/models/fal/h3-max-turbo/code): `fal/h3-max-turbo`
- [H3 Max](/development/comfy-router/models/fal/h3-max/code): `fal/h3-max`
- [Patina](/development/comfy-router/models/fal/patina/code): `fal/patina`

## Freepik

Check warning on line 87 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L87

Did you really mean 'Freepik'?

- [AI Image Upscaler Precision V2](/development/comfy-router/models/freepik/ai-image-upscaler-precision-v2/code): `freepik/ai-image-upscaler-precision-v2`
- [AI Skin Enhancer Creative](/development/comfy-router/models/freepik/ai-skin-enhancer-creative/code): `freepik/ai-skin-enhancer-creative`
Expand Down Expand Up @@ -120,7 +120,7 @@
- [Ideogram 4.0](/development/comfy-router/models/ideogram/ideogram-v4/code): `ideogram/ideogram-v4`
- [P Image Ideogram](/development/comfy-router/models/ideogram/p-image-ideogram/code): `ideogram/p-image-ideogram`

## Kling

Check warning on line 123 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L123

Did you really mean 'Kling'?

- [Kling 3.0 Turbo](/development/comfy-router/models/kling/kling-3-0-turbo/code): `kling/kling-3.0-turbo`
- [Kling Image O1](/development/comfy-router/models/kling/kling-image-o1/code): `kling/kling-image-o1`
Expand All @@ -133,7 +133,7 @@
- [Videos Lip Sync](/development/comfy-router/models/kling/videos-lip-sync/code): `kling/videos-lip-sync`
- [Videos Video Extend](/development/comfy-router/models/kling/videos-video-extend/code): `kling/videos-video-extend`

## Krea

Check warning on line 136 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L136

Did you really mean 'Krea'?

- [Krea 2 Large](/development/comfy-router/models/krea/krea-2-large/code): `krea/krea-2-large`
- [Krea 2 Medium Turbo](/development/comfy-router/models/krea/krea-2-medium-turbo/code): `krea/krea-2-medium-turbo`
Expand All @@ -145,19 +145,19 @@
- [LTX 2.5 Fast](/development/comfy-router/models/ltx/ltx-2-5-fast/code): `ltx/ltx-2-5-fast`
- [LTX 2.5 Pro](/development/comfy-router/models/ltx/ltx-2-5-pro/code): `ltx/ltx-2-5-pro`

## Luma

Check warning on line 148 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L148

Did you really mean 'Luma'?

- [Photon 1](/development/comfy-router/models/luma/photon-1/code): `luma/photon-1`
- [Photon Flash 1](/development/comfy-router/models/luma/photon-flash-1/code): `luma/photon-flash-1`
- [Ray 2](/development/comfy-router/models/luma/ray-2/code): `luma/ray-2`
- [Ray Flash 2](/development/comfy-router/models/luma/ray-flash-2/code): `luma/ray-flash-2`

## Luma 2

Check warning on line 155 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L155

Did you really mean 'Luma'?

- [Uni 1 Max](/development/comfy-router/models/luma_2/uni-1-max/code): `luma_2/uni-1-max`
- [Uni 1](/development/comfy-router/models/luma_2/uni-1/code): `luma_2/uni-1`

## Meshy

Check warning on line 160 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L160

Did you really mean 'Meshy'?

- [Animations](/development/comfy-router/models/meshy/animations/code): `meshy/animations`
- [Meshy 5](/development/comfy-router/models/meshy/meshy-5/code): `meshy/meshy-5`
Expand All @@ -170,7 +170,7 @@

- [MiniMax H3](/development/comfy-router/models/minimax/minimax-h3/code): `minimax/minimax-h3`

## Moonvalley

Check warning on line 173 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L173

Did you really mean 'Moonvalley'?

- [Image To Video](/development/comfy-router/models/moonvalley/image-to-video/code): `moonvalley/image-to-video`
- [Text To Image](/development/comfy-router/models/moonvalley/text-to-image/code): `moonvalley/text-to-image`
Expand Down Expand Up @@ -203,16 +203,20 @@
- [o3](/development/comfy-router/models/openai/o3/code): `openai/o3`
- [o4-mini](/development/comfy-router/models/openai/o4-mini/code): `openai/o4-mini`

## Openrouter

Check warning on line 206 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L206

Did you really mean 'Openrouter'?

- [Chat Completions](/development/comfy-router/models/openrouter/chat-completions/code): `openrouter/chat-completions`

## Pruna

Check warning on line 210 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L210

Did you really mean 'Pruna'?

- [P Video 2](/development/comfy-router/models/pruna/p-video-2/code): `pruna/p-video-2`

## Qwen

Check warning on line 214 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L214

Did you really mean 'Qwen'?

- [Qwen Image 3.0 Pro](/development/comfy-router/models/qwen/qwen-image-3-0-pro/code): `qwen/qwen-image-3.0-pro`
- [Qwen Image 3.0](/development/comfy-router/models/qwen/qwen-image-3-0/code): `qwen/qwen-image-3.0`

## Recraft

Check warning on line 219 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L219

Did you really mean 'Recraft'?

- [Recraft V2](/development/comfy-router/models/recraft/recraftv2/code): `recraft/recraftv2`
- [Recraft V3](/development/comfy-router/models/recraft/recraftv3/code): `recraft/recraftv3`
Expand All @@ -237,14 +241,14 @@
- [Gen 4 Image](/development/comfy-router/models/runway/gen4-image/code): `runway/gen4_image`
- [Gen 4 Turbo](/development/comfy-router/models/runway/gen4-turbo/code): `runway/gen4_turbo`

## Tencent

Check warning on line 244 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L244

Did you really mean 'Tencent'?

- [Hunyuan 3D Part](/development/comfy-router/models/tencent/hunyuan-3d-part/code): `tencent/hunyuan-3d-part`
- [Hunyuan 3D Smart Topology](/development/comfy-router/models/tencent/hunyuan-3d-smart-topology/code): `tencent/hunyuan-3d-smart-topology`
- [Hunyuan 3D Texture Edit](/development/comfy-router/models/tencent/hunyuan-3d-texture-edit/code): `tencent/hunyuan-3d-texture-edit`
- [Hunyuan 3D Uv](/development/comfy-router/models/tencent/hunyuan-3d-uv/code): `tencent/hunyuan-3d-uv`

## Veo

Check warning on line 251 in development/comfy-router/models.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models.mdx#L251

Did you really mean 'Veo'?

- [Veo 2.0 Generate 001](/development/comfy-router/models/veo/veo-2-0-generate-001/code): `veo/veo-2.0-generate-001`
- [Veo 3.0 Fast Generate 001](/development/comfy-router/models/veo/veo-3-0-fast-generate-001/code): `veo/veo-3.0-fast-generate-001`
Expand Down
61 changes: 34 additions & 27 deletions development/comfy-router/models/openai/gpt-image-1-5/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
result = client.models.run(
"openai/gpt-image-1.5",
{
"n": 1,
"prompt": "a red circle",
"image": ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024",
},
Expand All @@ -46,8 +46,8 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
const { data } = await comfy.models.run("openai/gpt-image-1.5", {
n: 1,
prompt: "a red circle",
image: ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
prompt: "give the rocketship rainbow coloring",
quality: "low",
size: "1024x1024",
});
Expand All @@ -60,7 +60,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"n\": 1, \"prompt\": \"a red circle\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
-d "{\"image\": [\"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png\"], \"prompt\": \"give the rocketship rainbow coloring\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
```
</CodeGroup>
</Tab>
Expand All @@ -69,7 +69,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 72 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L72

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -77,8 +77,8 @@
handle = client.models.submit(
"openai/gpt-image-1.5",
{
"n": 1,
"prompt": "a red circle",
"image": ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024",
},
Expand All @@ -102,8 +102,8 @@
// Reads COMFY_API_KEY from the environment.
// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
const handle = await comfy.models.submit("openai/gpt-image-1.5", {
n: 1,
prompt: "a red circle",
image: ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
prompt: "give the rocketship rainbow coloring",
quality: "low",
size: "1024x1024",
});
Expand All @@ -126,7 +126,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"n\": 1, \"prompt\": \"a red circle\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
-d "{\"image\": [\"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png\"], \"prompt\": \"give the rocketship rainbow coloring\", \"quality\": \"low\", \"size\": \"1024x1024\"}"

# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.
REQUEST_ID="<request_id from the 201 body>"
Expand All @@ -151,8 +151,21 @@
Possible values: `transparent`, `opaque`
</ParamField>

<ParamField body="image" type="string | string[]">
The source image(s) to edit. PRESENCE OF THIS FIELD SELECTS THE EDIT OPERATION -- omit it entirely for text-to-image generation.
Accepts one image or an array of them; gpt-image-1 and later take up to 16, which Router enforces from this schema before dispatching.
</ParamField>

<ParamField body="mask" type="string">
One image, as either an https URL Router fetches on the caller's behalf or a `data:image/<format>;base64,<payload>` URI carrying the bytes inline. Accepted image types are png, webp and jpeg, and that set is ENFORCED at resolve time rather than left to the provider -- an svg, gif, avif or tiff is refused here, naming the image you sent, instead of becoming a partner error two hops from the cause.

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L160

Did you really mean 'webp'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L160

Did you really mean 'jpeg'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L160

Did you really mean 'gif'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L160

Did you really mean 'avif'?
Prefer the URL form. A base64 payload inflates roughly 4/3 and the whole request body is capped at 10 MiB, so the inline form caps out near a 7.5 MB source image; a URL sidesteps that entirely.
THE URL MUST RESOLVE WITHOUT YOUR CREDENTIALS. Router fetches it server-side and sends no caller credential with the request, so a Comfy-signed asset URL -- one whose signature is in the query string -- is the supported form. An authenticated endpoint such as `/api/assets/{id}/content` answers Router 401 rather than the image; request that URL yourself and pass the signed URL it redirects to. The fetch is confined to Comfy's own asset buckets rather than the open internet, on every redirect hop as well as the URL you send, so a third-party or redirecting URL is refused.

Check warning on line 162 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L162

Did you really mean 'Comfy's'?
The example below shows the shape only: a real value also carries the signing query parameters, which are deliberately omitted here because a published example lives in the spec forever and a real signature is both a leaked credential and a link that stops working.
Each image is capped at 25 MiB and one request's images at 64 MiB in total.
</ParamField>

<ParamField body="model" type="string">
The model to use for image generation (e.g., gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburst)
The gpt-image model to run. Router splices the addressed model id in, so a caller addressing /v2/models/openai/gpt-image-2 does not send this.
</ParamField>

<ParamField body="moderation" type="string">
Expand All @@ -163,10 +176,14 @@

<ParamField body="n" type="integer">
The number of images to generate (1-10).

Range: `1` to `10`
</ParamField>

<ParamField body="output_compression" type="integer">
Compression level for JPEG or WebP (0-100)

Range: `0` to `100`
</ParamField>

<ParamField body="output_format" type="string">
Expand All @@ -176,31 +193,19 @@
</ParamField>

<ParamField body="prompt" type="string" required>
A text description of the desired image
A text description of the image to generate, or of the edit to make to `image`.
</ParamField>

<ParamField body="quality" type="string">
The quality of the generated image
The quality of the generated or edited image

Possible values: `low`, `medium`, `high`, `standard`, `hd`
</ParamField>

<ParamField body="response_format" type="string">
Response format of image data

Possible values: `url`, `b64_json`
</ParamField>

<ParamField body="size" type="string">
Size of the image (e.g., 1024x1024, 1536x1024, auto)
</ParamField>

<ParamField body="style" type="string">
Style of the image. Unused by the gpt-image models this operation admits; it was a dall-e-3-only parameter and those ids were retired when OpenAI shut them down on 2026-05-12.

Possible values: `vivid`, `natural`
</ParamField>

<ParamField body="user" type="string">
A unique identifier for end-user monitoring
</ParamField>
Expand Down Expand Up @@ -270,7 +275,7 @@
</ResponseField>

<ResponseField name="created" type="integer">
Unix timestamp, in seconds, of when the generation completed. Declared `int64` because a present-day epoch value is close enough to 2^31 that an unformatted `integer` generates a 32-bit field in many SDK generators.

Check warning on line 278 in development/comfy-router/models/openai/gpt-image-1-5/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1-5/code.mdx#L278

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand All @@ -293,8 +298,10 @@

```json
{
"n": 1,
"prompt": "a red circle",
"image": [
"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"
],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024"
}
Expand Down
61 changes: 34 additions & 27 deletions development/comfy-router/models/openai/gpt-image-1/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
result = client.models.run(
"openai/gpt-image-1",
{
"n": 1,
"prompt": "a red circle",
"image": ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024",
},
Expand All @@ -46,8 +46,8 @@
// Reads COMFY_API_KEY from the environment.
// The SDK automatically creates an idempotency key and reuses it for automatic retries.
const { data } = await comfy.models.run("openai/gpt-image-1", {
n: 1,
prompt: "a red circle",
image: ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
prompt: "give the rocketship rainbow coloring",
quality: "low",
size: "1024x1024",
});
Expand All @@ -60,7 +60,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"n\": 1, \"prompt\": \"a red circle\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
-d "{\"image\": [\"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png\"], \"prompt\": \"give the rocketship rainbow coloring\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
```
</CodeGroup>
</Tab>
Expand All @@ -69,7 +69,7 @@

<CodeGroup>
```python Python
from comfy_sdk import Comfy

Check warning on line 72 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L72

Did you really mean 'comfy_sdk'?

# Reads COMFY_API_KEY from the environment.
# Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
Expand All @@ -77,8 +77,8 @@
handle = client.models.submit(
"openai/gpt-image-1",
{
"n": 1,
"prompt": "a red circle",
"image": ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024",
},
Expand All @@ -102,8 +102,8 @@
// Reads COMFY_API_KEY from the environment.
// Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
const handle = await comfy.models.submit("openai/gpt-image-1", {
n: 1,
prompt: "a red circle",
image: ["https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"],
prompt: "give the rocketship rainbow coloring",
quality: "low",
size: "1024x1024",
});
Expand All @@ -126,7 +126,7 @@
-H "X-API-Key: $COMFY_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{\"n\": 1, \"prompt\": \"a red circle\", \"quality\": \"low\", \"size\": \"1024x1024\"}"
-d "{\"image\": [\"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png\"], \"prompt\": \"give the rocketship rainbow coloring\", \"quality\": \"low\", \"size\": \"1024x1024\"}"

# 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.
REQUEST_ID="<request_id from the 201 body>"
Expand All @@ -151,8 +151,21 @@
Possible values: `transparent`, `opaque`
</ParamField>

<ParamField body="image" type="string | string[]">
The source image(s) to edit. PRESENCE OF THIS FIELD SELECTS THE EDIT OPERATION -- omit it entirely for text-to-image generation.
Accepts one image or an array of them; gpt-image-1 and later take up to 16, which Router enforces from this schema before dispatching.
</ParamField>

<ParamField body="mask" type="string">
One image, as either an https URL Router fetches on the caller's behalf or a `data:image/<format>;base64,<payload>` URI carrying the bytes inline. Accepted image types are png, webp and jpeg, and that set is ENFORCED at resolve time rather than left to the provider -- an svg, gif, avif or tiff is refused here, naming the image you sent, instead of becoming a partner error two hops from the cause.

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L160

Did you really mean 'webp'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L160

Did you really mean 'jpeg'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L160

Did you really mean 'gif'?

Check warning on line 160 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L160

Did you really mean 'avif'?
Prefer the URL form. A base64 payload inflates roughly 4/3 and the whole request body is capped at 10 MiB, so the inline form caps out near a 7.5 MB source image; a URL sidesteps that entirely.
THE URL MUST RESOLVE WITHOUT YOUR CREDENTIALS. Router fetches it server-side and sends no caller credential with the request, so a Comfy-signed asset URL -- one whose signature is in the query string -- is the supported form. An authenticated endpoint such as `/api/assets/{id}/content` answers Router 401 rather than the image; request that URL yourself and pass the signed URL it redirects to. The fetch is confined to Comfy's own asset buckets rather than the open internet, on every redirect hop as well as the URL you send, so a third-party or redirecting URL is refused.

Check warning on line 162 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L162

Did you really mean 'Comfy's'?
The example below shows the shape only: a real value also carries the signing query parameters, which are deliberately omitted here because a published example lives in the spec forever and a real signature is both a leaked credential and a link that stops working.
Each image is capped at 25 MiB and one request's images at 64 MiB in total.
</ParamField>

<ParamField body="model" type="string">
The model to use for image generation (e.g., gpt-image-1, gpt-image-1.5, gpt-image-2, gpt-image-2.5-flare, gpt-image-2.5-sunburst)
The gpt-image model to run. Router splices the addressed model id in, so a caller addressing /v2/models/openai/gpt-image-2 does not send this.
</ParamField>

<ParamField body="moderation" type="string">
Expand All @@ -163,10 +176,14 @@

<ParamField body="n" type="integer">
The number of images to generate (1-10).

Range: `1` to `10`
</ParamField>

<ParamField body="output_compression" type="integer">
Compression level for JPEG or WebP (0-100)

Range: `0` to `100`
</ParamField>

<ParamField body="output_format" type="string">
Expand All @@ -176,31 +193,19 @@
</ParamField>

<ParamField body="prompt" type="string" required>
A text description of the desired image
A text description of the image to generate, or of the edit to make to `image`.
</ParamField>

<ParamField body="quality" type="string">
The quality of the generated image
The quality of the generated or edited image

Possible values: `low`, `medium`, `high`, `standard`, `hd`
</ParamField>

<ParamField body="response_format" type="string">
Response format of image data

Possible values: `url`, `b64_json`
</ParamField>

<ParamField body="size" type="string">
Size of the image (e.g., 1024x1024, 1536x1024, auto)
</ParamField>

<ParamField body="style" type="string">
Style of the image. Unused by the gpt-image models this operation admits; it was a dall-e-3-only parameter and those ids were retired when OpenAI shut them down on 2026-05-12.

Possible values: `vivid`, `natural`
</ParamField>

<ParamField body="user" type="string">
A unique identifier for end-user monitoring
</ParamField>
Expand Down Expand Up @@ -270,7 +275,7 @@
</ResponseField>

<ResponseField name="created" type="integer">
Unix timestamp, in seconds, of when the generation completed. Declared `int64` because a present-day epoch value is close enough to 2^31 that an unformatted `integer` generates a 32-bit field in many SDK generators.

Check warning on line 278 in development/comfy-router/models/openai/gpt-image-1/code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (dripart) - vale-spellcheck

development/comfy-router/models/openai/gpt-image-1/code.mdx#L278

Did you really mean 'unformatted'?

Format: `int64`
</ResponseField>
Expand All @@ -293,8 +298,10 @@

```json
{
"n": 1,
"prompt": "a red circle",
"image": [
"https://storage.googleapis.com/comfy-cloud-assets/0199b3f4-1d2e-7a3b-8c4d-5e6f70819234.png"
],
"prompt": "give the rocketship rainbow coloring",
"quality": "low",
"size": "1024x1024"
}
Expand Down
Loading
Loading