GLM 5.3 Flash from Z.ai is now available on AI Gateway as zai/glm-5.3-flash .
GLM 5.3 Flash is a multimodal coding model with a 1M-token context window. It accepts both text and image inputs and supports function calling, structured output, and streaming.
import { streamText } from 'ai' ;
const result = streamText ( {
model : 'zai/glm-5.3-flash' ,
prompt : 'Build a responsive React dashboard with a collapsible sidebar.' ,
} ) ;
Stream a response from GLM 5.3 Flash through AI Gateway.
To include images, pass them with text in a message. A request can include multiple images using URLs, Base64 data URLs, or binary data:
import { readFileSync } from 'node:fs' ;
import { streamText } from 'ai' ;
const result = streamText ( {
model : 'zai/glm-5.3-flash' ,
messages : [
{
role : 'user' ,
content : [
{
type : 'text' ,
text : 'Recreate this screenshot as a responsive React component.' ,
} ,
{
type : 'file' ,
mediaType : 'image/png' ,
data : readFileSync ( 'screenshot.png' ) ,
} ,
] ,
} ,
]…