Skip to main content

Overview

OAuth authentication endpoints

Available Operations

ExchangeAuthCodeForAPIKey

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

Example Usage

Parameters

Response

*operations.ExchangeAuthCodeForAPIKeyResponse, error

Errors

CreateAuthCode

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

Example Usage

Parameters

Response

*operations.CreateAuthKeysCodeResponse, error

Errors

ListOauthJwks

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

Example Usage

Parameters

Response

*components.OAuthJwks, error

Errors

CreateOauthToken

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, error

Errors