Skip to content

Commit fee985d

Browse files
authored
Use canonical OpenAI image model spelling (#397)
1 parent 2c6e3ec commit fee985d

6 files changed

Lines changed: 21 additions & 15 deletions

File tree

packages/node/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
236236
| Flag | Type | Required | Example | Description |
237237
| --- | --- | --- | --- | --- |
238238
| `--prompt` | `string` | yes | `"A red bicycle in a studio"` | The prompt describing the desired image content. |
239-
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include gpt-image-2 and Google Nano Banana variants. |
239+
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include openai/gpt-image-2 and Google Nano Banana variants. |
240240
| `--format` | `string` | no | `jpg` | Format of the generated image. |
241241
| `--seed` | `number` | no || Seed for the random number generator. |
242242
| `--aspect-ratio` | `string` | no || Aspect ratio of the generated image. |
@@ -251,7 +251,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
251251
# Generate an image from text
252252
transloadit image generate --prompt "A red bicycle in a studio" --output output.png
253253
# Generate with OpenAI gpt-image-2
254-
transloadit image generate --model gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
254+
transloadit image generate --model openai/gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
255255
# Guide generation with one input image
256256
transloadit image generate --input subject.jpg --prompt "Place subject.jpg on a magazine cover" --output output.png
257257
# Guide generation with multiple input images
@@ -1863,3 +1863,4 @@ See [CONTRIBUTING](./CONTRIBUTING.md).
18631863

18641864

18651865

1866+

packages/node/docs/intent-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
104104
| Flag | Type | Required | Example | Description |
105105
| --- | --- | --- | --- | --- |
106106
| `--prompt` | `string` | yes | `"A red bicycle in a studio"` | The prompt describing the desired image content. |
107-
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include gpt-image-2 and Google Nano Banana variants. |
107+
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include openai/gpt-image-2 and Google Nano Banana variants. |
108108
| `--format` | `string` | no | `jpg` | Format of the generated image. |
109109
| `--seed` | `number` | no || Seed for the random number generator. |
110110
| `--aspect-ratio` | `string` | no || Aspect ratio of the generated image. |
@@ -119,7 +119,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
119119
# Generate an image from text
120120
transloadit image generate --prompt "A red bicycle in a studio" --output output.png
121121
# Generate with OpenAI gpt-image-2
122-
transloadit image generate --model gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
122+
transloadit image generate --model openai/gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
123123
# Guide generation with one input image
124124
transloadit image generate --input subject.jpg --prompt "Place subject.jpg on a magazine cover" --output output.png
125125
# Guide generation with multiple input images

packages/node/src/alphalib/types/robots/image-generate.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Best practice:
8585
.string()
8686
.optional()
8787
.describe(
88-
'The AI model to use. Defaults to google/nano-banana. Supported models include flux-1.1-pro-ultra, flux-schnell, recraft-v3, google/nano-banana, google/nano-banana-2, google/nano-banana-pro, gpt-image-2, and stability-ai/stable-diffusion-inpainting.',
88+
'The AI model to use. Defaults to google/nano-banana. Supported models include flux-1.1-pro-ultra, flux-schnell, recraft-v3, google/nano-banana, google/nano-banana-2, google/nano-banana-pro, openai/gpt-image-2, and stability-ai/stable-diffusion-inpainting. The legacy alias gpt-image-2 is also accepted for backwards compatibility.',
8989
),
9090
prompt: z
9191
.string()
@@ -96,7 +96,7 @@ Best practice:
9696
.enum(['jpeg', 'jpg', 'png', 'gif', 'webp', 'svg'])
9797
.optional()
9898
.describe(
99-
'Output format. Defaults depend on model: png for Google models and gpt-image-2, svg for recraft-v3, jpeg for others. Google models currently return PNG only.',
99+
'Output format. Defaults depend on model: png for Google models and openai/gpt-image-2, svg for recraft-v3, jpeg for others. Google models currently return PNG only.',
100100
),
101101
seed: z.number().optional().describe('Seed for the random number generator.'),
102102
aspect_ratio: z
@@ -108,11 +108,15 @@ Best practice:
108108
height: z
109109
.number()
110110
.optional()
111-
.describe('Requested output height in pixels (mainly used by Google image models and gpt-image-2).'),
111+
.describe(
112+
'Requested output height in pixels (mainly used by Google image models and openai/gpt-image-2).',
113+
),
112114
width: z
113115
.number()
114116
.optional()
115-
.describe('Requested output width in pixels (mainly used by Google image models and gpt-image-2).'),
117+
.describe(
118+
'Requested output width in pixels (mainly used by Google image models and openai/gpt-image-2).',
119+
),
116120
style: z.string().optional().describe('Style of the generated image.'),
117121
num_outputs: z
118122
.number()

packages/node/src/cli/semanticIntents/imageGenerate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const imageGenerateOptionDefinitions = [
2121
kind: 'string',
2222
propertyName: 'model',
2323
optionFlags: '--model',
24-
description: `The AI model to use for image generation. Defaults to ${defaultImageGenerateModel}. Backend-supported models include gpt-image-2 and Google Nano Banana variants.`,
24+
description: `The AI model to use for image generation. Defaults to ${defaultImageGenerateModel}. Backend-supported models include openai/gpt-image-2 and Google Nano Banana variants.`,
2525
required: false,
2626
exampleValue: defaultImageGenerateModel,
2727
},
@@ -95,7 +95,7 @@ const imageGenerateCommandPresentation = {
9595
],
9696
[
9797
'Generate with OpenAI gpt-image-2',
98-
'transloadit image generate --model gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png',
98+
'transloadit image generate --model openai/gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png',
9999
],
100100
[
101101
'Guide generation with one input image',

packages/node/test/unit/cli/intents.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,14 +524,14 @@ describe('intent commands', () => {
524524
)
525525
})
526526

527-
it('passes through gpt-image-2 and explicit dimensions for image generate', async () => {
527+
it('passes through openai/gpt-image-2 and explicit dimensions for image generate', async () => {
528528
const { createSpy } = await runIntentCommand([
529529
'image',
530530
'generate',
531531
'--prompt',
532532
'A ceramic coffee mug on a white sweep',
533533
'--model',
534-
'gpt-image-2',
534+
'openai/gpt-image-2',
535535
'--width',
536536
'1024',
537537
'--height',
@@ -550,7 +550,7 @@ describe('intent commands', () => {
550550
stepsData: {
551551
generate: expect.objectContaining({
552552
robot: '/image/generate',
553-
model: 'gpt-image-2',
553+
model: 'openai/gpt-image-2',
554554
prompt: 'A ceramic coffee mug on a white sweep',
555555
width: 1024,
556556
height: 1024,

packages/transloadit/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
236236
| Flag | Type | Required | Example | Description |
237237
| --- | --- | --- | --- | --- |
238238
| `--prompt` | `string` | yes | `"A red bicycle in a studio"` | The prompt describing the desired image content. |
239-
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include gpt-image-2 and Google Nano Banana variants. |
239+
| `--model` | `string` | no | `google/nano-banana-2` | The AI model to use for image generation. Defaults to google/nano-banana-2. Backend-supported models include openai/gpt-image-2 and Google Nano Banana variants. |
240240
| `--format` | `string` | no | `jpg` | Format of the generated image. |
241241
| `--seed` | `number` | no || Seed for the random number generator. |
242242
| `--aspect-ratio` | `string` | no || Aspect ratio of the generated image. |
@@ -251,7 +251,7 @@ npx transloadit image generate [--input <path|dir|url|->] [options]
251251
# Generate an image from text
252252
transloadit image generate --prompt "A red bicycle in a studio" --output output.png
253253
# Generate with OpenAI gpt-image-2
254-
transloadit image generate --model gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
254+
transloadit image generate --model openai/gpt-image-2 --width 1024 --height 1024 --prompt "A ceramic coffee mug on a white sweep" --output output.png
255255
# Guide generation with one input image
256256
transloadit image generate --input subject.jpg --prompt "Place subject.jpg on a magazine cover" --output output.png
257257
# Guide generation with multiple input images
@@ -1863,3 +1863,4 @@ See [CONTRIBUTING](./CONTRIBUTING.md).
18631863

18641864

18651865

1866+

0 commit comments

Comments
 (0)