Skip to content

Commit b794150

Browse files
robert-j-yOpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#304)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent 0f116c9 commit b794150

1 file changed

Lines changed: 190 additions & 4 deletions

File tree

.speakeasy/in.openapi.yaml

Lines changed: 190 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6728,6 +6728,44 @@ components:
67286728
id: ctco-abc123
67296729
output: patch applied successfully
67306730
type: custom_tool_call_output
6731+
DABenchmarkEntry:
6732+
description: A single Design Arena benchmark entry for a specific arena+category
6733+
example:
6734+
arena: models
6735+
category: website
6736+
elo: 1385.2
6737+
rank: 5
6738+
win_rate: 62.5
6739+
properties:
6740+
arena:
6741+
description: Arena type (e.g. models, builders, agents)
6742+
example: models
6743+
type: string
6744+
category:
6745+
description: Category within the arena (e.g. website, gamedev, uicomponent)
6746+
example: website
6747+
type: string
6748+
elo:
6749+
description: ELO rating from head-to-head arena battles
6750+
example: 1385.2
6751+
format: double
6752+
type: number
6753+
rank:
6754+
description: Rank position within this arena+category among models available on OpenRouter (1 = highest ELO)
6755+
example: 5
6756+
type: integer
6757+
win_rate:
6758+
description: Win rate percentage in arena battles
6759+
example: 62.5
6760+
format: double
6761+
type: number
6762+
required:
6763+
- arena
6764+
- category
6765+
- elo
6766+
- win_rate
6767+
- rank
6768+
type: object
67316769
DatetimeServerTool:
67326770
description: 'OpenRouter built-in server tool: returns the current date and time'
67336771
example:
@@ -11577,6 +11615,8 @@ components:
1157711615
properties:
1157811616
architecture:
1157911617
$ref: '#/components/schemas/ModelArchitecture'
11618+
benchmarks:
11619+
$ref: '#/components/schemas/ModelBenchmarks'
1158011620
canonical_slug:
1158111621
description: Canonical slug for the model
1158211622
example: openai/gpt-4
@@ -11716,6 +11756,32 @@ components:
1171611756
- input_modalities
1171711757
- output_modalities
1171811758
type: object
11759+
ModelBenchmarks:
11760+
description: Third-party benchmark rankings for this model. Omitted when no benchmark data is available.
11761+
example:
11762+
design_arena:
11763+
- arena: models
11764+
category: website
11765+
elo: 1385.2
11766+
rank: 5
11767+
win_rate: 62.5
11768+
properties:
11769+
design_arena:
11770+
description: >-
11771+
Design Arena ELO rankings across arena+category pairs. The parent benchmarks object is omitted when the
11772+
model has not been evaluated.
11773+
example:
11774+
- arena: models
11775+
category: website
11776+
elo: 1385.2
11777+
rank: 5
11778+
win_rate: 62.5
11779+
items:
11780+
$ref: '#/components/schemas/DABenchmarkEntry'
11781+
type: array
11782+
required:
11783+
- design_arena
11784+
type: object
1171911785
ModelGroup:
1172011786
description: Tokenizer type used by the model
1172111787
enum:
@@ -11757,6 +11823,43 @@ components:
1175711823
description: Model to use for completion
1175811824
example: openai/gpt-4
1175911825
type: string
11826+
ModelResponse:
11827+
description: Single model response
11828+
example:
11829+
data:
11830+
architecture:
11831+
input_modalities:
11832+
- text
11833+
instruct_type: chatml
11834+
modality: text->text
11835+
output_modalities:
11836+
- text
11837+
tokenizer: GPT
11838+
context_length: 8192
11839+
created: 1692901234
11840+
description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
11841+
id: openai/gpt-4
11842+
name: GPT-4
11843+
per_request_limits: null
11844+
pricing:
11845+
completion: '0.00006'
11846+
image: '0'
11847+
prompt: '0.00003'
11848+
request: '0'
11849+
supported_parameters:
11850+
- temperature
11851+
- top_p
11852+
- max_tokens
11853+
top_provider:
11854+
context_length: 8192
11855+
is_moderated: true
11856+
max_completion_tokens: 4096
11857+
properties:
11858+
data:
11859+
$ref: '#/components/schemas/Model'
11860+
required:
11861+
- data
11862+
type: object
1176011863
ModelsCountResponse:
1176111864
description: Model count data
1176211865
example:
@@ -21451,10 +21554,10 @@ paths:
2145121554
type: string
2145221555
group_limit:
2145321556
description: >-
21454-
Maximum rows per distinct combination of dimensions (ClickHouse LIMIT n BY). When omitted on
21455-
time-series queries (granularity + dimensions), auto-computed to avoid truncating time windows.
21456-
Explicit values override the default and may truncate time buckets if set lower than the number of
21457-
buckets in the range. Ignored when no dimensions are specified.
21557+
Maximum rows per distinct combination of dimensions. When omitted on time-series queries
21558+
(granularity + dimensions), auto-computed to avoid truncating time windows. Explicit values override
21559+
the default and may truncate time buckets if set lower than the number of buckets in the range.
21560+
Ignored when no dimensions are specified.
2145821561
example: 100
2145921562
type: integer
2146021563
limit:
@@ -26902,6 +27005,89 @@ paths:
2690227005
x-speakeasy-ignore: true
2690327006
x-speakeasy-name-override: create
2690427007
x-speakeasy-stream-request-field: stream
27008+
/model/{author}/{slug}:
27009+
get:
27010+
description: >-
27011+
Returns full details for a single model identified by its author and slug (e.g. openai/gpt-4). Supports variant
27012+
suffixes (e.g. openai/gpt-4:free) and resolves known slug aliases.
27013+
operationId: getModel
27014+
parameters:
27015+
- description: The author/organization of the model
27016+
in: path
27017+
name: author
27018+
required: true
27019+
schema:
27020+
description: The author/organization of the model
27021+
example: openai
27022+
type: string
27023+
- description: The model slug, optionally including a variant suffix (e.g. gpt-4 or gpt-4:free)
27024+
in: path
27025+
name: slug
27026+
required: true
27027+
schema:
27028+
description: The model slug, optionally including a variant suffix (e.g. gpt-4 or gpt-4:free)
27029+
example: gpt-4
27030+
type: string
27031+
responses:
27032+
'200':
27033+
content:
27034+
application/json:
27035+
example:
27036+
data:
27037+
architecture:
27038+
input_modalities:
27039+
- text
27040+
instruct_type: chatml
27041+
modality: text->text
27042+
output_modalities:
27043+
- text
27044+
tokenizer: GPT
27045+
context_length: 8192
27046+
created: 1692901234
27047+
description: GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
27048+
id: openai/gpt-4
27049+
name: GPT-4
27050+
per_request_limits: null
27051+
pricing:
27052+
completion: '0.00006'
27053+
image: '0'
27054+
prompt: '0.00003'
27055+
request: '0'
27056+
supported_parameters:
27057+
- temperature
27058+
- top_p
27059+
- max_tokens
27060+
top_provider:
27061+
context_length: 8192
27062+
is_moderated: true
27063+
max_completion_tokens: 4096
27064+
schema:
27065+
$ref: '#/components/schemas/ModelResponse'
27066+
description: Returns the model details
27067+
'404':
27068+
content:
27069+
application/json:
27070+
example:
27071+
error:
27072+
code: 404
27073+
message: Resource not found
27074+
schema:
27075+
$ref: '#/components/schemas/NotFoundResponse'
27076+
description: Not Found - Resource does not exist
27077+
'500':
27078+
content:
27079+
application/json:
27080+
example:
27081+
error:
27082+
code: 500
27083+
message: Internal Server Error
27084+
schema:
27085+
$ref: '#/components/schemas/InternalServerResponse'
27086+
description: Internal Server Error - Unexpected server error
27087+
summary: Get a model by its slug
27088+
tags:
27089+
- Models
27090+
x-speakeasy-name-override: get
2690527091
/models:
2690627092
get:
2690727093
operationId: getModels

0 commit comments

Comments
 (0)