How to create a GLM API key to use in Ozeki AI Gateway
This guide demonstrates how to create a GLM API key and configure it in Ozeki AI Gateway. You'll learn how to access the Z.AI platform, generate a new API key, and set up GLM as a provider in your gateway. By following these steps, you can connect your Ozeki AI Gateway to GLM's AI models and services.
What is a GLM API Key?
A GLM API key is a unique authentication credential that allows applications to access GLM's AI models and services through the Z.AI platform. The API key serves as a secure token that identifies your Z.AI account and authorizes API requests. When configuring GLM as a provider in Ozeki AI Gateway, you need this API key to establish the connection between your gateway and GLM's services.
How to create a GLM API Key (Quick Steps)
- Open Z.AI page
- Navigate to API keys
- Login to Z.AI
- Create new API key
- Enter key name
- Copy API key
- Open Providers page in Ozeki AI Gateway
- Add new provider
- Enter GLM provider details
- Create provider
How to create a GLM API Key (Video tutorial)
In this video tutorial, you will learn how to create a GLM API key and configure it in Ozeki AI Gateway step-by-step. The video covers accessing the Z.AI platform, generating a new API key, and setting up GLM as a provider in your gateway.
Step 0 - Install Ozeki AI Gateway
Before configuring GLM as a provider, you need to have Ozeki AI Gateway installed and running on your system. If you haven't installed Ozeki AI Gateway yet, follow our Installation on Linux Guide to complete the initial setup.
Step 1 - Open Z.AI page
Open your web browser and navigate to the Z.AI platform. This is the main portal where you can access GLM models and manage your API keys (Figure 1).
Step 2 - Click API
On the Z.AI platform, locate and click the "API" button to access the API management section (Figure 2).
Step 3 - Click API Key
Navigate to the API Key section by clicking on the API Key option. This will take you to the key management page (Figure 3).
Step 4 - Login to Z.AI
Sign in to your Z.AI account using your credentials. If you don't have a Z.AI account yet, you'll need to create one before proceeding (Figure 4).
Step 5 - Create new API key
On the API keys page, click the "Create new API key" button to begin the API key generation process (Figure 5).
Step 6 - Enter key name
Enter a descriptive name for your API key that identifies its purpose. For example, you might name it "Ozeki AI Gateway" to indicate it will be used with your gateway installation. Click "Confirm" to generate the API key (Figure 6).
Step 7 - Copy API key
After the API key is generated, locate and click the copy button on the page to copy the key to your clipboard (Figure 7).
Step 8 - Open Providers page in Ozeki AI Gateway
Open the Ozeki AI Gateway web interface and navigate to the Providers page. This is where you'll configure GLM as a new provider using the API key you just created (Figure 8).
Step 9 - Click add new provider
Click the "New" button to begin the provider creation process. This opens a form where you'll enter the connection details for GLM (Figure 9).
Step 10 - Enter GLM provider details
Fill in the provider configuration form with GLM's details. Enter "GLM" as the provider name, select "OpenAI compatible" as the provider type, specify the API endpoint URL, and paste the API key you copied earlier. Select the preferred model from the dropdown list, then click "Create" to save the configuration (Figure 10).
https://api.z.ai/api/paas/v4/
Step 11 - Provider created
After clicking "Create", the GLM provider is added to Ozeki AI Gateway. The provider now appears in the providers list, confirming that your gateway can route requests to GLM's services. You can now create routes that allow users to access GLM models through your gateway (Figure 11).
Conclusion
You have successfully created a GLM API key and configured it as a provider in Ozeki AI Gateway. Your gateway can now communicate with GLM's services through the Z.AI platform and access GLM AI models through your centralized gateway infrastructure. This setup allows you to manage GLM access for multiple users and applications from a single point.