Docs
Authentication API Reference
Chutes supports API key authentication for server-to-server requests and OAuth for user-scoped access.
API key authentication
Provide your API key via the Authorization header for all Chutes API requests.
curl -s https://api.chutes.ai/chutes \
-H "Authorization: Bearer cpk_..."OAuth endpoints
Use the Chutes IDP endpoints for authorization code flow. Discover endpoints from the OpenID configuration:
curl -s https://idp.chutes.ai/.well-known/openid-configuration | jq .Token exchange
Exchange the authorization code for tokens via the token endpoint.
curl -X POST https://api.chutes.ai/idp/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=authorization_code" \
-d "code=..." \
-d "redirect_uri=https://yourapp.com/api/auth/callback" \
-d "client_id=..."Userinfo
Fetch user identity after authentication.
curl -s https://api.chutes.ai/idp/userinfo \
-H "Authorization: Bearer ey..."