OAuth
Exchange a workload identity token
Changed onRFC 8693 token exchange. Presents a JWT from an issuer your organization trusts (Settings → Workload identity) and receives a short-lived OpenRouter access token that acts as the API key the matching federation policy targets.
post/oauth/token
Request
- Base URL: https://openrouter.ai/api/v1
- URL: https://openrouter.ai/api/v1/oauth/token
- Auth: HTTP bearer
Response
Access token issued
Example response
{
"access_token": "<short-lived openrouter access token jwt>",
"expires_in": 900,
"issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
"scope": "inference",
"token_type": "Bearer"
}Changes
- info
added the new
managementenum value to the request property
- info
- breaking
added the pattern
^[\w-]+\.[\w-]+\.[\w-]+$to the request property
- breaking