@@ -5560,7 +5560,7 @@ components:
55605560 scheme : bearer
55615561 description : API key as bearer token in Authorization header
55625562paths :
5563- /api/alpha/ responses :
5563+ /responses :
55645564 post :
55655565 x-speakeasy-name-override : send
55665566 x-speakeasy-stream-request-field : stream
@@ -5668,7 +5668,7 @@ paths:
56685668 application/json :
56695669 schema :
56705670 $ref : ' #/components/schemas/ProviderOverloadedResponse'
5671- operationId : createApiAlphaResponses
5671+ operationId : createResponses
56725672 /activity :
56735673 get :
56745674 tags :
@@ -7640,6 +7640,179 @@ paths:
76407640 application/json :
76417641 schema :
76427642 $ref : ' #/components/schemas/InternalServerResponse'
7643+ /auth/keys :
7644+ post :
7645+ operationId : exchangeAuthCodeForAPIKey
7646+ tags :
7647+ - OAuth
7648+ summary : Exchange authorization code for API key
7649+ description : Exchange an authorization code from the PKCE flow for a user-controlled API key
7650+ requestBody :
7651+ content :
7652+ application/json :
7653+ schema :
7654+ type : object
7655+ properties :
7656+ code :
7657+ type : string
7658+ description : The authorization code received from the OAuth redirect
7659+ example : auth_code_abc123def456
7660+ code_verifier :
7661+ type : string
7662+ description : The code verifier if code_challenge was used in the authorization request
7663+ example : dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
7664+ code_challenge_method :
7665+ type : string
7666+ nullable : true
7667+ enum :
7668+ - S256
7669+ - plain
7670+ description : The method used to generate the code challenge
7671+ example : S256
7672+ required :
7673+ - code
7674+ example :
7675+ code : auth_code_abc123def456
7676+ code_verifier : dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
7677+ code_challenge_method : S256
7678+ required : true
7679+ responses :
7680+ ' 200 ' :
7681+ description : Successfully exchanged code for an API key
7682+ content :
7683+ application/json :
7684+ schema :
7685+ type : object
7686+ properties :
7687+ key :
7688+ type : string
7689+ description : The API key to use for OpenRouter requests
7690+ example : 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
7691+ user_id :
7692+ type : string
7693+ nullable : true
7694+ description : User ID associated with the API key
7695+ example : user_2yOPcMpKoQhcd4bVgSMlELRaIah
7696+ required :
7697+ - key
7698+ - user_id
7699+ example :
7700+ key : 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
7701+ user_id : user_2yOPcMpKoQhcd4bVgSMlELRaIah
7702+ ' 400 ' :
7703+ description : Bad Request - Invalid request parameters or malformed input
7704+ content :
7705+ application/json :
7706+ schema :
7707+ $ref : ' #/components/schemas/BadRequestResponse'
7708+ ' 403 ' :
7709+ description : Forbidden - Authentication successful but insufficient permissions
7710+ content :
7711+ application/json :
7712+ schema :
7713+ $ref : ' #/components/schemas/ForbiddenResponse'
7714+ ' 500 ' :
7715+ description : Internal Server Error - Unexpected server error
7716+ content :
7717+ application/json :
7718+ schema :
7719+ $ref : ' #/components/schemas/InternalServerResponse'
7720+ /auth/keys/code :
7721+ post :
7722+ x-speakeasy-name-override : createAuthCode
7723+ tags :
7724+ - OAuth
7725+ summary : Create authorization code
7726+ description : Create an authorization code for the PKCE flow to generate a user-controlled API key
7727+ requestBody :
7728+ content :
7729+ application/json :
7730+ schema :
7731+ type : object
7732+ properties :
7733+ callback_url :
7734+ type : string
7735+ format : uri
7736+ description : >-
7737+ The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are
7738+ allowed.
7739+ example : https://myapp.com/auth/callback
7740+ code_challenge :
7741+ type : string
7742+ description : PKCE code challenge for enhanced security
7743+ example : E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
7744+ code_challenge_method :
7745+ type : string
7746+ enum :
7747+ - S256
7748+ - plain
7749+ description : The method used to generate the code challenge
7750+ example : S256
7751+ limit :
7752+ type : number
7753+ description : Credit limit for the API key to be created
7754+ example : 100
7755+ required :
7756+ - callback_url
7757+ example :
7758+ callback_url : https://myapp.com/auth/callback
7759+ code_challenge : E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
7760+ code_challenge_method : S256
7761+ limit : 100
7762+ required : true
7763+ responses :
7764+ ' 200 ' :
7765+ description : Successfully created authorization code
7766+ content :
7767+ application/json :
7768+ schema :
7769+ type : object
7770+ properties :
7771+ data :
7772+ type : object
7773+ properties :
7774+ id :
7775+ type : string
7776+ description : The authorization code ID to use in the exchange request
7777+ example : auth_code_xyz789
7778+ app_id :
7779+ type : number
7780+ description : The application ID associated with this auth code
7781+ example : 12345
7782+ created_at :
7783+ type : string
7784+ description : ISO 8601 timestamp of when the auth code was created
7785+ example : ' 2025-08-24T10:30:00Z'
7786+ required :
7787+ - id
7788+ - app_id
7789+ - created_at
7790+ description : Auth code data
7791+ example :
7792+ id : auth_code_xyz789
7793+ app_id : 12345
7794+ created_at : ' 2025-08-24T10:30:00Z'
7795+ required :
7796+ - data
7797+ ' 400 ' :
7798+ description : Bad Request - Invalid request parameters or malformed input
7799+ content :
7800+ application/json :
7801+ schema :
7802+ $ref : ' #/components/schemas/BadRequestResponse'
7803+ ' 401 ' :
7804+ description : Unauthorized - Authentication required or invalid credentials
7805+ content :
7806+ application/json :
7807+ schema :
7808+ $ref : ' #/components/schemas/UnauthorizedResponse'
7809+ ' 500 ' :
7810+ description : Internal Server Error - Unexpected server error
7811+ content :
7812+ application/json :
7813+ schema :
7814+ $ref : ' #/components/schemas/InternalServerResponse'
7815+ operationId : createAuthKeysCode
76437816 /chat/completions :
76447817 post :
76457818 summary : Create a chat completion
@@ -7770,6 +7943,8 @@ tags:
77707943 description : Generation history endpoints
77717944 - name : Models
77727945 description : Model information endpoints
7946+ - name : OAuth
7947+ description : OAuth authentication endpoints
77737948 - name : Parameters
77747949 description : Parameters endpoints
77757950 - name : Providers
0 commit comments