API Quickstart Tutorial: Create a Key, Confirm the Base URL, and Use the Model ID

2026-11-16 · 原创·功能教程

Before you start

Open `/docs` and read the API quickstart guidance. The documentation lists separate base URLs for OpenAI-compatible calls and the Anthropic SDK, so first decide which integration style your application uses. Then create an API Key in the console and open the model detail page for the model you plan to use. Note the model ID shown there. For a first integration, keep the setup small: one API Key and one model ID are enough to begin.

Steps

1. Create an API Key in the console. Store it as a sensitive credential; do not commit it to a public repository, paste it into screenshots, or expose it in client-side code.

2. Go to `/docs` and confirm the correct base URL. Use the documented OpenAI-compatible base URL for OpenAI-compatible calls, or the documented Anthropic SDK base URL when using the Anthropic SDK. Do not mix the two.

3. Set the request's `model` value to the model ID from the model detail page. Do not guess, shorten, or rewrite the ID.

4. If you want to use live debugging, sign in first and confirm billing as prompted. Do not assume that live debugging will run or return a result before those steps are complete.

Check the result

After sending a request, inspect the response for the expected structure. Then verify that the base URL, model ID, and authentication information in your request match the documentation and the console. If you receive an error, return to `/docs` and compare your request with the documented example. Check the base URL, parameter names, and API Key before changing other settings. Avoid switching model IDs repeatedly as a troubleshooting shortcut; that can make configuration errors harder to isolate.

Safety notes

Keep API Keys in server-side or controlled environments. Avoid printing full keys in logs, and follow your organization's credential-handling rules. Use the key only for the intended integration. Before production use, validate the request path in a test environment and include billing confirmation and error handling in your integration process. When you need to choose a model, review the model detail page in the model catalog, then return to these steps to complete the integration.