ReplicateImageComing soon

openai/gpt-image-2

openai/gpt-image-2 is an image tool from Replicate that runs in the background and returns images. Coming soon: listed with its price, not yet open to runs.

This tool is listed but not yet available to run.

Pricing

Coming soon

quality: low $0.0156, medium $0.0611, auto (default) $0.1664, high $0.1664 per image. Billed on number_of_images, default 1.

Limits

Runs
In the background
Returns
image
Longest queue wait
1 hour
Run deadline
30 minutes
Longest run, end to end
225 minutes
Largest inline input
1 MB
Largest input file
500 MB
Largest output
5 GB
Outputs per run
16

Input

FieldKindDefaultDescription
prompt requiredtext—

A text description of the desired image

qualityJSONauto

The quality of the generated image

user_idtextnull

An optional unique identifier representing your end-user. This helps OpenAI monitor and detect abuse.

backgroundJSONauto

Set whether the background is transparent or opaque or choose automatically

moderationJSONauto

Content moderation level

aspect_ratioJSON1:1

The size of the generated image. Use 'auto' to let the model pick. Sizes above 2560x1440 are experimental and may give more variable results.

input_imageslistnull

A list of images to use as input for the generation

output_formatJSONwebp

Output format

openai_api_keytextnull

Your OpenAI API key (optional - uses proxy if not provided)

number_of_imagesnumber (whole)
1 to 10
1

Number of images to generate (1-10)

output_compressionnumber (whole)
0 to 100
90

Compression level (0-100%)

Same request in code

curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "replicate",
    "model": "openai/gpt-image-2",
    "input": {
      "prompt": "<prompt>"
    }
  }'