vercel.AiGatewayImageClient$stream
The Vercel AI Gateway image client: POST {base_url}/image-model.
Signature
class vercel.AiGatewayImageClient$streamThe Vercel AI Gateway image client: POST {base_url}/image-model.
client "ai-gateway-images/bfl/flux-2-pro" in an LLM function constructs
this class. The gateway fronts many image providers behind one endpoint; the
model id — including its provider prefix — rides in the ai-model-id header,
not in the body.
function DrawLamp(subject: string) -> image {
client "ai-gateway-images/bfl/flux-2-pro"
prompt `A studio photograph of ${subject}.`
}
Image inputs ARE supported: an image prompt part becomes a files[] entry,
which is how the endpoint does editing and variations —
function Restyle(source: image) -> image {
client "ai-gateway-images/openai/gpt-image-1"
prompt `Redraw ${source} in watercolor.`
}
Audio/video/pdf inputs have no representation and are rejected, as is tool
calling. (mask, the other editing input, has no first-class field yet; pass
it through request_body as {"mask": {"type": "file", "mediaType": …, "data": …}}.)
Source:<builtin>/vercel/images.bamlbytes 0–0
Fields
model
string | nullapi_key
ai.Credential$stream | nullbase_url
ai.Credential$stream | nulln
int | nullsize
string | nullaspect_ratio
string | nullseed
int | nullrequest_body
baml.json.json$stream | nullheaders
map<string, string> | nullquery_params
map<string, string> | nullcapture_wire
bool | null