openai.internal.OaImagesRequest

POST /v1/images/generations. `prompt` and `model` always ride; everything else is optional and omitted when the client left it unset.

Reference version

Signature

class openai.internal.OaImagesRequest

POST /v1/images/generations. prompt and model always ride; everything else is optional and omitted when the client left it unset.

  • response_format (url | b64_json) is a dall-e-only parameter — the GPT image models always return base64 and reject the field, so the client omits it for them and defaults it to b64_json elsewhere (we need bytes, and the dall-e default is url).
  • output_format / output_compression / background / moderation are GPT-image-only; style is dall-e-3-only. The client sends what it was given and lets the API reject impossible combinations, rather than encoding a model table that goes stale.

Source:<builtin>/openai/ns_internal/images.bamlbytes 16931988

Fields

model

string

prompt

string

n

int | null

size

string | null

quality

string | null

background

string | null

output_format

string | null

output_compression

int | null

moderation

string | null

style

string | null

user

string | null

response_format

string | null