Skip to main content
POST
openai_image_generate

Authorizations

X-API-Key
string
header
required

Your fetchbean API key (fb_…). Keys are not accepted through Authorization.

Headers

Idempotency-Key
string

A caller-generated key for safely retrying this execution after a network failure. Reusing the same key with the same operation and input returns the original result; reusing it for a different call is rejected.

Body

application/json
prompt
string
required

what to draw

model
string

gpt-image-2.5-flare (default), gpt-image-2.5-sunburst for precise edits, gpt-image-2

quality
string

low (default), medium, high, xhigh, max, auto

size
string

1024x1024 (default), 1536x1024, 1024x1536, or any WIDTHxHEIGHT in multiples of 16 up to 3840x2160; auto lets the model pick

background
string

opaque (default), transparent (needs output_format png or webp), auto

output_format
string

png (default), jpeg, webp

output_compression
integer

jpeg/webp only

Required range: 0 <= x <= 100
n
integer
Required range: 1 <= x <= 10

Response

Success

The response is of type object.