Integrations · Z.ai
Guild agents call Z.ai’s GLM models through task.llm, using a credential for AWS Bedrock, OpenRouter, or Fireworks AI. Guild holds the credential server-side, checks your model policies on every call, and attributes spend to the workspace, agent, and user that made it.
Book a demo
See how teams govern agents that use Z.ai.
Start free
Connect Z.ai and scope your first agent.
GLM through the provider you already run
GLM models reach Guild only through third-party inference providers.glm-5.3 is on Bedrock in all four supported US regions and on Fireworks AI, which adds glm-5.3-flash and glm-5.2. The default, glm-5, is on Bedrock outside us-west-1. OpenRouter serves its z-ai/ namespace.
How it works
1
Add a credential
In Access & setup > Models & providers, click Add API key and choose AWS Bedrock, OpenRouter, or Fireworks AI. Check Z.ai under Models.
2
Write a model policy
Bind the credential’s Z.ai access to the account, a workspace, or an agent, and list the models it may call, such as
glm-*.3
Call it from task.llm
Name
"zai" in llmPreferences, or leave preferences out and let your policies choose. Guild resolves the credential at runtime.Every GLM call goes through your policies
Agents never hold the key. Guild stores the credential server-side and shows only a masked value, so you can rotate it without touching agent code or the model policies bound to it. Policies are an allowlist: a workspace, agent, or installed agent can call a GLM model only if a rule allows it. Set a daily token limit to cap spend, and see each call by workspace, agent, and user in Usage. A raw API key in an agent’s environment reaches every model the key can. A policy reaches only the models you name.About Z.ai models on Guild
Inference providers
Z.ai models are served only through third-party inference providers, not a Z.ai API.
Write the canonical model name, such as
glm-5, everywhere in Guild. Guild maps it to each provider’s own model ID.
Models
Guild prices and recognizes these Z.ai model IDs. A policy or preference can also name any other model your credential can reach. Third-party providers route more models than this list, and their catalogs change; see each provider’s page for what it serves.Set up Z.ai
Guild has no managed key for Z.ai. To use Z.ai models, add a credential for a provider that serves them. Adding your first credential switches the whole account to bring your own key (BYOK).1
Open Models & providers
Click Access & setup in the left nav, then Models & providers. In an organization, only admins can open it.
2
Add a credential
Click Add API key and choose an inference provider from the table above.
3
Enter the provider's secret
Give the credential a Name and paste your provider’s API key. AWS Bedrock asks for an IAM role and region instead.
4
Choose Z.ai
Under Models, check Z.ai. Keep
glm-5 as its default model or enter another from the list above. Then click Add Key. On Fireworks AI, pick a model from its list, because the pre-filled default isn’t available there.--models "glm-*" limits a policy to matching models:
Use it from an agent
Agent code never names a credential. Guild resolves the call against the workspace owner’s settings. To ask for Z.ai explicitly, put it inllmPreferences:
glm-4.7-flash. The second falls back to the default model of the matching policy. Preferences are strict: if no credential or policy allows any of them, the call fails rather than using another publisher. See LLM preferences.
The
"zai" provider value needs @guildai/agents-sdk 0.7.6 or later.Frequently asked questions
Can I use GLM with Guild's managed tokens?
Can I use GLM with Guild's managed tokens?
No. Guild has no managed key for Z.ai. Add a credential for a provider that serves it, which switches the account to bring your own key (BYOK).
Can I connect the Z.ai API directly?
Can I connect the Z.ai API directly?
No. Guild serves GLM models only through AWS Bedrock, OpenRouter, and Fireworks AI.
Why does my Fireworks AI credential fail with the default model?
Why does my Fireworks AI credential fail with the default model?
The pre-filled default,
glm-5, isn’t on Fireworks AI. Pick a model from its list, such as glm-5.3, before you save.What SDK version do I need?
What SDK version do I need?
@guildai/agents-sdk 0.7.6 or later, for the "zai" provider value in llmPreferences.Put a governed agent on Z.ai this week
Book a demo
See how teams govern agents that use Z.ai.
Start free
Connect Z.ai and scope your first agent.