API Quickstart: Keys, Base URL, and Model IDs
2026-11-09 · 原创·功能教程
Three values
Create an API Key in the console, copy the protocol-specific Base URL from the docs, and copy the model ID below the model name.
Minimal call
1. Store the Key securely and never commit it.
2. OpenAI-compatible clients use the documented `/v1` URL. Anthropic SDKs use their separate base origin and append paths automatically.
3. Set `model` to the model ID.
4. Start with a short non-streaming request before adding parameters.
Common errors
For 401 check the Key, for 404 check the model ID, for 402 check the matching-currency balance, and for 429 inspect the specific limit source.