How to create a Qwen API key to use Ozeki AI Gateway
This guide demonstrates how to create a Qwen API key and configure it in Ozeki AI Gateway. You'll learn how to access the Alibaba Cloud Model Studio platform, generate a new API key, and set up Qwen as a provider in your gateway. By following these steps, you can connect your Ozeki AI Gateway to Qwen's AI models and services.
API URL: https://dashscope-intl.aliyuncs.com/compatible-mode/v1 Example API Key: sk-12345... Default model: qwen-flash
What is a Qwen API key?
A Qwen API key is a unique authentication credential that allows applications to access Qwen's AI models and services through Alibaba Cloud's Model Studio platform. The API key serves as a secure token that identifies your Alibaba Cloud account and authorizes API requests. When configuring Qwen as a provider in Ozeki AI Gateway, you need this API key to establish the connection between your gateway and Qwen's services.
Steps to follow
We assume Ozeki AI Gateway is already installed on your system. You can install it on Linux, Windows or Mac.
- Open Model Studio API key page
- Login to Alibaba Cloud
- Click create API key
- Choose owner account
- Set workspace and description
- Copy API key
- Open Providers page in Ozeki AI Gateway
- Create provider
How to create a Qwen API key video
The following video shows how to create a Qwen API key and configure it in Ozeki AI Gateway step-by-step. The video covers accessing the Alibaba Cloud Model Studio platform, generating a new API key, and setting up Qwen as a provider in your gateway.
Step 1 - Open Model Studio API key page
Open your web browser and navigate to the Alibaba Cloud. This is where you'll create and manage your Qwen API keys (Figure 1).
Step 2 - Login to Alibaba Cloud
If you're not already logged in, the system will prompt you to authenticate. Click the login button to proceed to the Alibaba Cloud sign-in page (Figure 2).
Sign in to your Alibaba Cloud account using your credentials. If you don't have an Alibaba Cloud account yet, you'll need to create one before proceeding. After logging in, you'll be able to create the API key (Figure 3).
Step 3 - Click create API key
On the API key management page, click the "Create API key" button to begin the key generation process (Figure 4).
Step 4 - Choose owner account
Select the owner account for the API key. This determines which Alibaba Cloud account will be associated with the API key and its usage. Choose your account from the list (Figure 5).
Step 5 - Set workspace and description
Enter a workspace name and description for your API key. For example, you might use "Ozeki AI Gateway" as the description. The workspace name helps organize your API keys. Click "OK" to generate the API key (Figure 6).
Step 6 - Copy API key
After the API key is generated, you'll see the key on the API keys page. Click the copy button to copy the key to your clipboard (Figure 7).
Step 7 - 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 Qwen as a new provider using the API key you just created (Figure 8).
Step 8 - Create provider
Click the "New" button to begin the provider creation process. This opens a form where you'll enter the connection details for Qwen (Figure 9).
Fill in the provider configuration form with Qwen's details. Enter "Qwen" 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://dashscope-intl.aliyuncs.com/compatible-mode/v1
After clicking "Create", the Qwen provider is added to Ozeki AI Gateway. The provider now appears in the providers list, confirming that your gateway can route requests to Qwen's services. You can now create routes that allow users to access Qwen models through your gateway (Figure 11).
Conclusion
You have successfully created a Qwen API key and configured it as a provider in Ozeki AI Gateway. Your gateway can now communicate with Qwen's services and access Qwen AI models through your centralized gateway infrastructure. This setup allows you to manage Qwen access for multiple users and applications from a single point.