Skip to content

Аутентификация

RouteAPI использует аутентификацию Bearer Token. Каждый API-запрос должен содержать действительный Token в заголовке Authorization.

Authorization: Bearer sk-your-routeapi-token

Пример:

Terminal window
curl https://www.routeapi.ai/v1/models \
-H "Authorization: Bearer $ROUTEAPI_KEY"
  1. RouteAPI console.
  2. API Keys.
  3. Create token.
  4. Set name, quota, permissions, and expiration.
  5. Store it only on the server side or in a secure environment.
ConfigurationОписание
User balance402 may be returned when balance is insufficient
Token quotaA Token can have independent quota or expiration
Rate limit429 is returned after triggering
  • Do not expose Tokens in frontend code or public repositories.
  • Prefer environment variables for server-side calls.
  • Disable leaked Tokens immediately.
Status codeCauseHandling
401Missing or invalid TokenCheck Authorization
402Insufficient balance or quotaRecharge or adjust quota
429Rate limitReduce concurrency