Skip to content

Commit 1910a4a

Browse files
openrouter-docs-sync[bot]OpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#790)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent 2b43b74 commit 1910a4a

1 file changed

Lines changed: 226 additions & 0 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14968,6 +14968,82 @@ components:
1496814968
- 'code'
1496914969
- 'message'
1497014970
type: 'object'
14971+
OAuthErrorResponse:
14972+
description: 'RFC 6749 §5.2 error response.'
14973+
example:
14974+
error: 'invalid_grant'
14975+
error_description: 'The subject token was not accepted.'
14976+
properties:
14977+
error:
14978+
enum:
14979+
- 'invalid_request'
14980+
- 'invalid_grant'
14981+
- 'unsupported_grant_type'
14982+
- 'invalid_scope'
14983+
- 'server_error'
14984+
- 'temporarily_unavailable'
14985+
type: 'string'
14986+
error_description:
14987+
type: 'string'
14988+
required:
14989+
- 'error'
14990+
- 'error_description'
14991+
type: 'object'
14992+
OAuthJwks:
14993+
description: 'RFC 7517 JWK Set of the keys OpenRouter signs access tokens with.'
14994+
example:
14995+
keys:
14996+
- alg: 'ES256'
14997+
crv: 'P-256'
14998+
kid: 'or-2026-09'
14999+
kty: 'EC'
15000+
use: 'sig'
15001+
x: 'f83OJ3D2xF1Bg8vub9tLe1gHMzV76e8Tus9uPHvRVEU'
15002+
'y': 'x_FEzRu9m36HLN_tue659LNpXW6pCyStikYjKIWI5a0'
15003+
properties:
15004+
keys:
15005+
items:
15006+
additionalProperties: false
15007+
properties:
15008+
alg:
15009+
enum:
15010+
- 'ES256'
15011+
type: 'string'
15012+
crv:
15013+
enum:
15014+
- 'P-256'
15015+
type: 'string'
15016+
kid:
15017+
minLength: 1
15018+
type: 'string'
15019+
kty:
15020+
enum:
15021+
- 'EC'
15022+
type: 'string'
15023+
use:
15024+
enum:
15025+
- 'sig'
15026+
type: 'string'
15027+
x:
15028+
pattern: '^[A-Za-z0-9_-]+$'
15029+
type: 'string'
15030+
'y':
15031+
pattern: '^[A-Za-z0-9_-]+$'
15032+
type: 'string'
15033+
required:
15034+
- 'kty'
15035+
- 'crv'
15036+
- 'kid'
15037+
- 'x'
15038+
- 'y'
15039+
- 'alg'
15040+
- 'use'
15041+
type: 'object'
15042+
minItems: 1
15043+
type: 'array'
15044+
required:
15045+
- 'keys'
15046+
type: 'object'
1497115047
ObservabilityArizeDestination:
1497215048
example:
1497315049
api_key_hashes: null
@@ -24945,6 +25021,92 @@ components:
2494525021
example:
2494625022
format:
2494725023
type: 'text'
25024+
TokenExchangeRequest:
25025+
description: 'RFC 8693 token exchange request body (application/x-www-form-urlencoded).'
25026+
example:
25027+
federation_policy_id: '4b2f7d1e-8c3a-4e5f-9a6b-1c2d3e4f5a6b'
25028+
grant_type: 'urn:ietf:params:oauth:grant-type:token-exchange'
25029+
subject_token: '<jwt from your identity provider>'
25030+
subject_token_type: 'urn:ietf:params:oauth:token-type:jwt'
25031+
properties:
25032+
federation_policy_id:
25033+
description: 'The federation policy to evaluate, from Settings → Workload identity. Binds the exchange to one organization.'
25034+
example: '4b2f7d1e-8c3a-4e5f-9a6b-1c2d3e4f5a6b'
25035+
format: 'uuid'
25036+
type: 'string'
25037+
grant_type:
25038+
description: 'Must be `urn:ietf:params:oauth:grant-type:token-exchange`.'
25039+
enum:
25040+
- 'urn:ietf:params:oauth:grant-type:token-exchange'
25041+
example: 'urn:ietf:params:oauth:grant-type:token-exchange'
25042+
type: 'string'
25043+
requested_token_type:
25044+
description: 'Optional; when present must be `urn:ietf:params:oauth:token-type:access_token`.'
25045+
enum:
25046+
- 'urn:ietf:params:oauth:token-type:access_token'
25047+
example: 'urn:ietf:params:oauth:token-type:access_token'
25048+
type: 'string'
25049+
scope:
25050+
description: 'Optional; only `inference` is available.'
25051+
enum:
25052+
- 'inference'
25053+
example: 'inference'
25054+
type: 'string'
25055+
subject_token:
25056+
description: 'The JWT issued by your identity provider.'
25057+
example: '<jwt from your identity provider>'
25058+
maxLength: 16384
25059+
minLength: 1
25060+
type: 'string'
25061+
subject_token_type:
25062+
description: 'Must be `urn:ietf:params:oauth:token-type:jwt`.'
25063+
enum:
25064+
- 'urn:ietf:params:oauth:token-type:jwt'
25065+
example: 'urn:ietf:params:oauth:token-type:jwt'
25066+
type: 'string'
25067+
required:
25068+
- 'grant_type'
25069+
- 'subject_token'
25070+
- 'federation_policy_id'
25071+
- 'subject_token_type'
25072+
type: 'object'
25073+
TokenExchangeResponse:
25074+
description: 'RFC 8693 token exchange response.'
25075+
example:
25076+
access_token: '<short-lived openrouter access token jwt>'
25077+
expires_in: 900
25078+
issued_token_type: 'urn:ietf:params:oauth:token-type:access_token'
25079+
scope: 'inference'
25080+
token_type: 'Bearer'
25081+
properties:
25082+
access_token:
25083+
description: 'A short-lived JWT to send as `Authorization: Bearer` to the inference API.'
25084+
example: '<short-lived openrouter access token jwt>'
25085+
type: 'string'
25086+
expires_in:
25087+
description: 'Seconds until the access token expires: at most 15 minutes, and never later than the subject token expires.'
25088+
example: 900
25089+
type: 'integer'
25090+
issued_token_type:
25091+
enum:
25092+
- 'urn:ietf:params:oauth:token-type:access_token'
25093+
example: 'urn:ietf:params:oauth:token-type:access_token'
25094+
type: 'string'
25095+
scope:
25096+
example: 'inference'
25097+
type: 'string'
25098+
token_type:
25099+
enum:
25100+
- 'Bearer'
25101+
example: 'Bearer'
25102+
type: 'string'
25103+
required:
25104+
- 'access_token'
25105+
- 'issued_token_type'
25106+
- 'token_type'
25107+
- 'expires_in'
25108+
- 'scope'
25109+
type: 'object'
2494825110
ToolCallStatus:
2494925111
enum:
2495025112
- 'in_progress'
@@ -36197,6 +36359,70 @@ paths:
3619736359
outputs:
3619836360
results: '$.data'
3619936361
type: 'offsetLimit'
36362+
/oauth/jwks:
36363+
get:
36364+
description: 'RFC 7517 JWK Set containing the public keys OpenRouter signs access tokens with.'
36365+
operationId: 'listOauthJwks'
36366+
responses:
36367+
'200':
36368+
content:
36369+
application/json:
36370+
schema:
36371+
$ref: '#/components/schemas/OAuthJwks'
36372+
description: 'JWK Set'
36373+
'500':
36374+
content:
36375+
application/json:
36376+
schema:
36377+
$ref: '#/components/schemas/InternalServerResponse'
36378+
description: 'Signing keys are not configured'
36379+
summary: 'OpenRouter access token signing keys'
36380+
tags:
36381+
- 'OAuth'
36382+
/oauth/token:
36383+
post:
36384+
description: '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.'
36385+
operationId: 'createOauthToken'
36386+
requestBody:
36387+
content:
36388+
application/x-www-form-urlencoded:
36389+
schema:
36390+
$ref: '#/components/schemas/TokenExchangeRequest'
36391+
required: true
36392+
responses:
36393+
'200':
36394+
content:
36395+
application/json:
36396+
schema:
36397+
$ref: '#/components/schemas/TokenExchangeResponse'
36398+
description: 'Access token issued'
36399+
'400':
36400+
content:
36401+
application/json:
36402+
schema:
36403+
$ref: '#/components/schemas/OAuthErrorResponse'
36404+
description: 'Malformed request, unsupported grant, or the subject token was not accepted'
36405+
'429':
36406+
content:
36407+
application/json:
36408+
schema:
36409+
$ref: '#/components/schemas/OAuthErrorResponse'
36410+
description: 'Rate limited'
36411+
'500':
36412+
content:
36413+
application/json:
36414+
schema:
36415+
$ref: '#/components/schemas/OAuthErrorResponse'
36416+
description: 'The token could not be issued'
36417+
'503':
36418+
content:
36419+
application/json:
36420+
schema:
36421+
$ref: '#/components/schemas/OAuthErrorResponse'
36422+
description: 'The issuer’s discovery document or JWKS could not be fetched'
36423+
summary: 'Exchange a workload identity token'
36424+
tags:
36425+
- 'OAuth'
3620036426
/observability/destinations:
3620136427
get:
3620236428
description: 'List the observability destinations configured for the authenticated entity''s default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.'

0 commit comments

Comments
 (0)