API Quickstart Guide: Creating Keys, Configuring Base URLs, and Model IDs
2026-11-16 · 原创·功能教程
API Quickstart: Keys, Base URL, and Model IDs Tutorial
For developers integrating platform models into an application, correctly configuring the API is the first step. This tutorial will guide you through the core preparation steps for an API quickstart, ensuring your application interacts with the models securely and accurately.
Preparation
Before writing any code, ensure you are registered and signed in to the platform. Navigate to the platform console to prepare your authentication credentials. All configuration instructions and addresses can be found under the platform's `/docs` path.
Operation Steps
1. Create an API Key
First, create an API Key in the console. The API Key is the credential your program uses to communicate with the platform. Keep it secure. Once created, the system will generate a unique key string that you must include in the request headers of your code for authentication.
2. Obtain and Configure the Base URL
The platform supports multiple calling methods. In the documentation, the OpenAI-compatible Base URL and the Anthropic SDK address are listed separately. Depending on the SDK or request protocol you are using, go to `/docs` to find the corresponding Base URL and fill it into your code configuration. Do not mix up addresses from different protocols.
3. Specify the Model ID
When sending a request, the `model` parameter must be exact. Go to the model detail page, locate the target model's ID, and use it as the value for the `model` parameter in your request body. Using the correct model ID ensures the platform routes and processes your request properly.
Result Viewing and Live Debugging
After completing the configuration, you can send a test request to view the results. The platform provides a live debugging feature, but please note that using it requires sign-in and billing confirmation. Once a request is successfully sent, you can view the model's response in the debugging window or your application's console.
Safety Precautions
- Key Protection: An API Key grants access to your account. Never hardcode it in client-side code or upload it to public repositories. It is recommended to use environment variables or backend service calls.
- Billing Confirmation: Both live debugging and actual API calls will incur costs. Always confirm the billing rules and your account status before proceeding.
After completing this tutorial, your application will have the basic capability to call platform models. You can visit the model directory or the corresponding tools to experience more features and explore model integration solutions suitable for your business scenarios.