API Quickstart Tutorial: Create an API Key, Choose a Base URL, and Set a Model ID
2026-11-28 · 原创·功能教程
API Quickstart: Prepare the Key, Base URL, and Model ID
For developers integrating platform models into an application for the first time, the API quickstart begins with three pieces of configuration: an API Key, a Base URL, and a model ID. This guide follows a short preparation, configuration, debugging, and verification flow. Use the development docs at /docs as the reference entry for the current instructions.
1. Prepare the integration type
Read the docs at /docs and decide whether your application will use OpenAI-compatible calls or the Anthropic SDK. The docs list separate base URLs for these two approaches, so choose the one that matches your SDK and avoid mixing them. Next, create an API Key in the console. Treat the key as a secret: store it in a server-side environment variable or secret manager, not in front-end code or a public repository.
2. Configure the request
Create the API Key in the console and keep it available for authentication. From /docs, copy the Base URL that corresponds to your chosen integration type. Then open the model detail page and use the model ID shown there as the model value in your request. Do not invent, shorten, or guess the model ID.
A simple configuration checklist:
- API Key created in the console.
- Base URL selected from the matching section in /docs.
- model parameter set to the model ID from the model detail page.
3. Debug and check results
If you use live debugging, sign in and confirm billing first. After configuration, send a request from the debugging interface or your own application, then review the response and any error message. If the request fails, check the API Key, confirm that the Base URL matches the SDK type, and verify that the model value exactly matches the model ID on the model detail page. Review the result together with the billing confirmation state.
4. Safety notes
Keep API Keys out of logs where possible, and do not expose full credentials in client-side code. If a key is exposed, handle it according to your security process. Live debugging requires billing confirmation, so check the account and billing status before testing. Do not assume free quota, automation, or success guarantees that are not stated in the documentation.
After the first request, return to the model detail page to confirm the model ID, and use /docs as the entry point for further parameter and integration guidance. You can also review models in the model directory and continue testing with the corresponding tools.