Overview
OAuth authentication endpointsAvailable Operations
- exchangeAuthCodeForAPIKey - Exchange authorization code for API key
- createAuthCode - Create authorization code
- listOauthJwks - OpenRouter access token signing keys
- createOauthToken - Exchange a workload identity token
exchangeAuthCodeForAPIKey
Exchange an authorization code from the PKCE flow for a user-controlled API keyExample Usage
Standalone function
The standalone function version of this method:Parameters
Response
Promise<operations.ExchangeAuthCodeForAPIKeyResponse>Errors
createAuthCode
Create an authorization code for the PKCE flow to generate a user-controlled API key. Requires a Clerk session that completed reverification recently (Clerklax level); otherwise the response is 403 with error.metadata.reverification set to lax, and the caller must reverify the session before retrying.