Skip to main content
Wafer is a hosted inference provider for serverless chat models. TrueFoundry connects to Wafer natively through the AI Gateway, so you can send text prompts and receive text responses with optional zero-data-retention. Wafer supports chat completions, streaming, and tool / function calling (where the model supports it) for models like GLM 5.2.

Adding Models

This section explains the steps to add a Wafer model account, register chat models, and configure access controls.
1

Select Wafer as the provider

From the TrueFoundry dashboard, go to AI Gateway > Models, click Add Model and choose To New Provider Account. Select Wafer from the provider list.
Add Provider Account page listing the supported model providers

Choose a provider in Add Provider Account

2

Add Wafer account details

Give a unique name to your Wafer account and complete the form:
  • Base URL (optional): defaults to https://pass.wafer.ai/v1. Change this only if Wafer directs you to a different endpoint.
  • Zero Data Retention: when enabled, the AI Gateway sends the Wafer-ZDR: required header on API requests for request-scoped zero data retention. This is enabled by default.
  • API Key: your Wafer API key for authentication.
Wafer Configure Account form in the provider account setup drawer

Configure Account for Wafer

3

Register chat models

Click Add Model Manually to register one or more chat models under your Wafer account. For each model, set:
  • Display Name: the name shown in the TrueFoundry UI (for example, glm-5.2).
  • Model ID: the Wafer model identifier used in API calls (for example, GLM-5.2).
  • Model Types: select Chat.
Wafer model form with Display Name, Model ID, and Model Types for GLM-5.2

Add a Wafer chat model

Use the exact Model ID from Wafer’s documentation or dashboard. A common model is GLM-5.2.
4

Save and grant access

Click Test Credentials to check the account against the selected models, or click Save without Testing. To keep the account in Git instead, click Apply using YAML and apply the generated spec with tfy apply.To let other users, teams or virtual accounts use or manage these models, open Manage Accounts, click ⋮ on the account and choose Access Control > Grant Access. See Access control.

Inference

After adding the models, call them through the AI Gateway like any other chat model — via the Playground or by integrating with your application using the OpenAI-compatible /chat/completions API. Use the TrueFoundry model ID in the format your-wafer-account/glm-5.2. See Chat Completions - Getting Started for a full code example: