Use GLM-5.3-FlashX and GLM-5.3 through AI Gateway
AI Gateway now supports GLM-5.3-FlashX through Z.ai and TokenHub, plus GLM-5.3 through Mistral. Try them in the playground, then connect your application through the SDK you already use.
With ngrok-managed inference, you don’t need a separate account or API key for each provider. Use your ngrok access key and credits to send requests, with authentication and billing handled by ngrok.
GLM-5.3-FlashX is the high-speed serving variant of GLM-5.3-Flash. It’s a separate model, so select the FlashX entry to try it. Check the provider’s model details for pricing and supported request formats.
Get started
Create an ngrok account or sign in. Create an access key that allows your chosen provider and model, and confirm your account has credits.
Optionally, try GLM-5.3-FlashX from Z.ai or TokenHub, or GLM-5.3 from Mistral in the playground.
Follow the setup guide and select OpenAI and TypeScript.
Install the OpenAI SDK and TypeScript runner:
Save your ngrok access key in .env.local. Keep this file out of version control:
AI_GATEWAY_API_KEY=your_access_key_here
Use an ES module project ("type": "module" in package.json) for top-level await. Save this example as index.ts:
Run the example from your project directory to print the response:
To try GLM-5.3 with the same client, change model to "z-ai/glm-5.3".
Open Logs, find the request you just sent, and inspect its model, provider, status, token usage, and cost.