Skip to main content

Overview

OAuth authentication endpoints

Available Operations

exchange_auth_code_for_api_key

Exchange an authorization code from the PKCE flow for a user-controlled API key

Example Usage

Parameters

Response

operations.ExchangeAuthCodeForAPIKeyResponse

Errors

create_auth_code

Create an authorization code for the PKCE flow to generate a user-controlled API key

Example Usage

Parameters

Response

operations.CreateAuthKeysCodeResponse

Errors

list_oauth_jwks

RFC 7517 JWK Set containing the public keys OpenRouter signs access tokens with.

Example Usage

Parameters

Response

components.OAuthJwks

Errors

create_oauth_token

RFC 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.

Example Usage

Parameters

Response

components.TokenExchangeResponse

Errors