Skip to content

Commit dfa2bdd

Browse files
author
OpenRouter SDK Bot
committed
chore: update OpenAPI spec [sdk-bot]
1 parent cd9c6fd commit dfa2bdd

1 file changed

Lines changed: 207 additions & 0 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22521,6 +22521,82 @@ components:
2252122521
- 'code'
2252222522
- 'message'
2252322523
type: 'object'
22524+
SessionCostItem:
22525+
properties:
22526+
app_name:
22527+
description: 'Published harness display label.'
22528+
example: 'Hermes Agent'
22529+
type: 'string'
22530+
app_slug:
22531+
description: 'Stable public slug of the harness.'
22532+
example: 'hermes-agent'
22533+
type: 'string'
22534+
median_session_cost_usd:
22535+
description: 'Median USD spend per sampled session.'
22536+
example: 1.74
22537+
format: 'double'
22538+
type: 'number'
22539+
model_permaslug:
22540+
description: 'Exact model permaslug.'
22541+
example: 'anthropic/claude-4.8-opus'
22542+
type: 'string'
22543+
turn_range:
22544+
description: 'Inclusive session turn-count range.'
22545+
enum:
22546+
- '1-turn'
22547+
- '2-9-turns'
22548+
- '10-49-turns'
22549+
- '50-plus-turns'
22550+
example: '10-49-turns'
22551+
type: 'string'
22552+
required:
22553+
- 'app_slug'
22554+
- 'app_name'
22555+
- 'turn_range'
22556+
- 'model_permaslug'
22557+
- 'median_session_cost_usd'
22558+
type: 'object'
22559+
SessionCostMeta:
22560+
properties:
22561+
as_of:
22562+
description: 'ISO-8601 timestamp when the response was generated.'
22563+
example: '2026-05-12T02:00:00.000Z'
22564+
type: 'string'
22565+
version:
22566+
description: 'Dataset version.'
22567+
enum:
22568+
- 'v1'
22569+
type: 'string'
22570+
window_days:
22571+
description: 'Number of days in the weekly session sample window, or null when no snapshot is published.'
22572+
example: 30
22573+
type:
22574+
- 'integer'
22575+
- 'null'
22576+
window_end_date:
22577+
description: 'UTC date of the final day in the session sample window, or null when no snapshot is published.'
22578+
example: '2026-05-11'
22579+
type:
22580+
- 'string'
22581+
- 'null'
22582+
required:
22583+
- 'as_of'
22584+
- 'version'
22585+
- 'window_days'
22586+
- 'window_end_date'
22587+
type: 'object'
22588+
SessionCostResponse:
22589+
properties:
22590+
data:
22591+
items:
22592+
$ref: '#/components/schemas/SessionCostItem'
22593+
type: 'array'
22594+
meta:
22595+
$ref: '#/components/schemas/SessionCostMeta'
22596+
required:
22597+
- 'data'
22598+
- 'meta'
22599+
type: 'object'
2252422600
ShellCallItem:
2252522601
description: 'A shell command execution call (newer variant)'
2252622602
example:
@@ -28825,6 +28901,137 @@ paths:
2882528901
summary: 'Daily token totals for top 50 models'
2882628902
tags:
2882728903
- 'Datasets'
28904+
/datasets/session-cost:
28905+
get:
28906+
description: "Returns weekly refreshed, aggregated cost-per-session cells for the published harnesses.\nSessions are never pooled across apps. Medians are of per-session USD spend, and\nprivacy-preserving aggregation never exposes clerk_user_id values or per-session rows.\n\nFilter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps\nfor harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot\nwindow in `meta`."
28907+
operationId: 'getSessionCost'
28908+
parameters:
28909+
- description: 'Filter to one published harness slug.'
28910+
in: 'query'
28911+
name: 'app_slug'
28912+
required: false
28913+
schema:
28914+
description: 'Filter to one published harness slug.'
28915+
example: 'hermes-agent'
28916+
type: 'string'
28917+
- description: 'Exact model permaslug filter. Works across all harness apps.'
28918+
in: 'query'
28919+
name: 'model'
28920+
required: false
28921+
schema:
28922+
description: 'Exact model permaslug filter. Works across all harness apps.'
28923+
example: 'anthropic/claude-4.8-opus'
28924+
type: 'string'
28925+
- description: 'Filter by the inclusive number of turns in a session.'
28926+
in: 'query'
28927+
name: 'turn_range'
28928+
required: false
28929+
schema:
28930+
description: 'Filter by the inclusive number of turns in a session.'
28931+
enum:
28932+
- '1-turn'
28933+
- '2-9-turns'
28934+
- '10-49-turns'
28935+
- '50-plus-turns'
28936+
example: '10-49-turns'
28937+
type: 'string'
28938+
- description: 'Maximum number of cells to return (1-500). Defaults to 100.'
28939+
in: 'query'
28940+
name: 'limit'
28941+
required: false
28942+
schema:
28943+
default: 100
28944+
description: 'Maximum number of cells to return (1-500). Defaults to 100.'
28945+
example: 100
28946+
maximum: 500
28947+
minimum: 1
28948+
type: 'integer'
28949+
- description: 'Number of sorted cells to skip (0-5000). Defaults to 0.'
28950+
in: 'query'
28951+
name: 'offset'
28952+
required: false
28953+
schema:
28954+
default: 0
28955+
description: 'Number of sorted cells to skip (0-5000). Defaults to 0.'
28956+
example: 0
28957+
maximum: 5000
28958+
minimum: 0
28959+
type:
28960+
- 'integer'
28961+
- 'null'
28962+
responses:
28963+
'200':
28964+
content:
28965+
application/json:
28966+
example:
28967+
data:
28968+
- app_name: 'Hermes Agent'
28969+
app_slug: 'hermes-agent'
28970+
median_session_cost_usd: 1.74
28971+
model_permaslug: 'anthropic/claude-4.8-opus'
28972+
turn_range: '10-49-turns'
28973+
meta:
28974+
as_of: '2026-05-12T02:00:00.000Z'
28975+
version: 'v1'
28976+
window_days: 30
28977+
window_end_date: '2026-05-11'
28978+
schema:
28979+
$ref: '#/components/schemas/SessionCostResponse'
28980+
description: 'Aggregated cost-per-session cells for the requested filters.'
28981+
'400':
28982+
content:
28983+
application/json:
28984+
example:
28985+
error:
28986+
code: 400
28987+
message: 'Invalid request parameters'
28988+
schema:
28989+
$ref: '#/components/schemas/BadRequestResponse'
28990+
description: 'Bad Request - Invalid request parameters or malformed input'
28991+
'401':
28992+
content:
28993+
application/json:
28994+
example:
28995+
error:
28996+
code: 401
28997+
message: 'Missing Authentication header'
28998+
schema:
28999+
$ref: '#/components/schemas/UnauthorizedResponse'
29000+
description: 'Unauthorized - Authentication required or invalid credentials'
29001+
'429':
29002+
content:
29003+
application/json:
29004+
example:
29005+
error:
29006+
code: 429
29007+
message: 'Rate limit exceeded'
29008+
schema:
29009+
$ref: '#/components/schemas/TooManyRequestsResponse'
29010+
description: 'Too Many Requests - Rate limit exceeded'
29011+
'500':
29012+
content:
29013+
application/json:
29014+
example:
29015+
error:
29016+
code: 500
29017+
message: 'Internal Server Error'
29018+
schema:
29019+
$ref: '#/components/schemas/InternalServerResponse'
29020+
description: 'Internal Server Error - Unexpected server error'
29021+
summary: 'Cost per session by harness and model'
29022+
tags:
29023+
- 'Datasets'
29024+
x-speakeasy-pagination:
29025+
inputs:
29026+
- in: 'parameters'
29027+
name: 'offset'
29028+
type: 'offset'
29029+
- in: 'parameters'
29030+
name: 'limit'
29031+
type: 'limit'
29032+
outputs:
29033+
results: '$.data'
29034+
type: 'offsetLimit'
2882829035
/embeddings:
2882929036
post:
2883029037
description: 'Submits an embedding request to the embeddings router'

0 commit comments

Comments
 (0)