You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ce814b9
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/in.openapi.yaml
+117-1Lines changed: 117 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44478,6 +44478,121 @@ paths:
44478
44478
summary: 'Get a batch'
44479
44479
tags:
44480
44480
- 'Batch'
44481
+
/batches/{id}/cancel:
44482
+
post:
44483
+
description: 'Asks the provider to stop a batch that is still running. Cancellation is enabled per organization; other organizations get `403`. The response is the batch in its current status: it stays `in_progress` until the provider confirms, then becomes `cancelled`, or `completed`, `failed`, or `expired` when the provider job ended first. Poll until the batch has any final status. Repeating the call is safe while the batch is still `in_progress`; once it has a final status the call returns `409`. OpenRouter returns no result rows for a cancelled batch, and the provider still charges for the requests that finished before the cancellation. When the batch wrote its output to your own storage, retrieving the batch can still return that location, and the rows the provider wrote there stay yours to read. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).'
44484
+
operationId: 'cancelBatch'
44485
+
parameters:
44486
+
- description: 'The batch job id returned from submit.'
44487
+
in: 'path'
44488
+
name: 'id'
44489
+
required: true
44490
+
schema:
44491
+
description: 'The batch job id returned from submit.'
44492
+
example: 'batch_abc123'
44493
+
minLength: 1
44494
+
type: 'string'
44495
+
responses:
44496
+
'200':
44497
+
content:
44498
+
application/json:
44499
+
schema:
44500
+
$ref: '#/components/schemas/BatchObject'
44501
+
description: 'The provider accepted the cancellation, or the provider job had already ended while OpenRouter still stores the batch as running. Poll the batch for its final status.'
44502
+
'400':
44503
+
content:
44504
+
application/json:
44505
+
example:
44506
+
error:
44507
+
code: 400
44508
+
message: 'No active workspace resolved for this request.'
44509
+
schema:
44510
+
$ref: '#/components/schemas/BatchErrorResponse'
44511
+
description: 'The API key resolved no active workspace.'
44512
+
'401':
44513
+
content:
44514
+
application/json:
44515
+
example:
44516
+
error:
44517
+
code: 401
44518
+
message: 'No auth credentials found.'
44519
+
schema:
44520
+
$ref: '#/components/schemas/BatchErrorResponse'
44521
+
description: 'Missing or invalid API key.'
44522
+
'403':
44523
+
content:
44524
+
application/json:
44525
+
example:
44526
+
error:
44527
+
code: 403
44528
+
message: 'Batch cancellation is not enabled for this organization.'
44529
+
schema:
44530
+
$ref: '#/components/schemas/BatchErrorResponse'
44531
+
description: 'Batch cancellation is not enabled for the organization.'
44532
+
'404':
44533
+
content:
44534
+
application/json:
44535
+
example:
44536
+
error:
44537
+
code: 404
44538
+
message: 'Batch not found.'
44539
+
schema:
44540
+
$ref: '#/components/schemas/BatchErrorResponse'
44541
+
description: 'No batch exists for the given id.'
44542
+
'409':
44543
+
content:
44544
+
application/json:
44545
+
example:
44546
+
error:
44547
+
code: 409
44548
+
message: 'This batch has already ended and cannot be cancelled.'
44549
+
schema:
44550
+
$ref: '#/components/schemas/BatchErrorResponse'
44551
+
description: 'The batch has already ended, has not reached the provider yet, runs on a provider without a cancel call, or its required provider key is unavailable.'
44552
+
'429':
44553
+
content:
44554
+
application/json:
44555
+
example:
44556
+
error:
44557
+
code: 429
44558
+
message: 'Rate limit exceeded.'
44559
+
schema:
44560
+
$ref: '#/components/schemas/BatchErrorResponse'
44561
+
description: 'Batch API rate limit exceeded for the billable entity.'
44562
+
'500':
44563
+
content:
44564
+
application/json:
44565
+
example:
44566
+
error:
44567
+
code: 500
44568
+
message: 'Internal server error.'
44569
+
schema:
44570
+
$ref: '#/components/schemas/BatchErrorResponse'
44571
+
description: 'Unexpected error in the ingress or upstream batch-api.'
44572
+
'502':
44573
+
content:
44574
+
application/json:
44575
+
example:
44576
+
error:
44577
+
code: 502
44578
+
message: 'Upstream batch-api is unavailable.'
44579
+
schema:
44580
+
$ref: '#/components/schemas/BatchErrorResponse'
44581
+
description: 'The batch service is unavailable, or an upstream provider operation failed.'
44582
+
'503':
44583
+
content:
44584
+
application/json:
44585
+
example:
44586
+
error:
44587
+
code: 503
44588
+
message: 'Service Unavailable'
44589
+
schema:
44590
+
$ref: '#/components/schemas/BatchErrorResponse'
44591
+
description: 'OpenRouter could not check whether the caller may cancel the batch. No cancellation is sent to the provider. Retry the request.'
44592
+
summary: 'Cancel a batch'
44593
+
tags:
44594
+
- 'Batch'
44595
+
x-speakeasy-name-override: 'cancel'
44481
44596
/batches/{id}/results:
44482
44597
get:
44483
44598
description: 'Returns a cursor-paginated page of normalized OpenRouter-format results for a finished batch. Pass the previous page''s `next_cursor` as `cursor` to read the next page. Pages are stable across retries for the 30-day artifact retention window. See the [Batch API Quickstart](https://openrouter.ai/docs/batch-quickstart).'
@@ -55200,6 +55315,7 @@ paths:
55200
55315
x-speakeasy-name-override: 'get'
55201
55316
/models:
55202
55317
get:
55318
+
description: 'Lists the models available to the caller with their pricing, context length, modalities, and supported parameters, plus presets when the caller is authenticated. An unfiltered call returns every text-output model (often several hundred KB of JSON or more; set `output_modalities` to list models with other outputs); use `limit` and `offset` to cap the result and filters such as `q`, `output_modalities`, `input_modalities`, or `supported_parameters` to narrow it (`sort` only reorders), or call `GET /api/v1/model/{author}/{slug}` to inspect a single catalog model. `category` is a usage shortlist, not a catalog filter: it returns only the top 20 models in that category by past-week token usage, never presets, and cannot be combined with `limit`, `offset`, or `supported_parameters`.'
55203
55319
operationId: 'getModels'
55204
55320
parameters:
55205
55321
- description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned'
@@ -65804,7 +65920,7 @@ tags:
65804
65920
name: 'Anthropic Messages'
65805
65921
- description: 'BYOK endpoints'
65806
65922
name: 'BYOK'
65807
-
- description: 'Submit, list, poll, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
65923
+
- description: 'Submit, list, poll, cancel, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
0 commit comments