openai.ImageClient$stream
The OpenAI image-generation client: POST {base_url}/images/generations.
Reference version
Signature
class openai.ImageClient$streamThe OpenAI image-generation client: POST {base_url}/images/generations.
client "openai-images/gpt-image-1" in an LLM function constructs this
class. Its output type is media — -> image, -> image[], -> image?,
-> string | image — which the runner builds from the turn's media blocks
(ai/runner.baml) instead of parsing text.
function DrawLamp(subject: string) -> image {
client "openai-images/gpt-image-1"
prompt `A studio photograph of ${subject}.`
}
The endpoint takes a text prompt only: media inputs are rejected (image editing is a different, multipart endpoint) and tools are not supported.
Source:<builtin>/openai/images.bamlbytes 0–0
Fields
model
string | nullapi_key
ai.Credential$stream | nullbase_url
ai.Credential$stream | nulln
int | nullsize
string | nullquality
string | nullbackground
string | nulloutput_format
string | nulloutput_compression
int | nullmoderation
string | nullstyle
string | nulluser
string | nullresponse_format
string | nullrequest_body
baml.json.json$stream | nullheaders
map<string, string> | nullquery_params
map<string, string> | nullcapture_wire
bool | null