Prepare your account
Create a key in the console, identify an enabled group and copy the exact model name. Keep the key in a server-side environment variable. Public catalog availability does not replace account-level checks.
Choose the right protocol
Channels may expose Chat Completions, Messages or Gemini endpoints. These have different paths, authentication headers and request shapes. The example below is only for a channel that supports Chat Completions.
Check the result
Inspect the response and usage record. Test streaming, tool calls or structured output only when the chosen model and channel document support.
Troubleshoot common errors
For 401/403, check credentials, account status and group permissions. For 400/404, check the identifier, request shape and base path; do not append /v1 twice. For 429, inspect quotas and follow the response’s retry guidance.
Chat Completions example
Set YOUJIE_BASE_URL to the account-provided API base, usually ending in /v1. Replace YOUR_ENABLED_MODEL with an enabled identifier. This template does not make a live call.
curl "$YOUJIE_BASE_URL/chat/completions" \
-H "Authorization: Bearer $YOUJIE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_ENABLED_MODEL","messages":[{"role":"user","content":"Hello"}]}'Contact: 244075703@qq.com