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 206db95
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .speakeasy/out.openapi.yaml
+121-1Lines changed: 121 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -44900,6 +44900,125 @@ paths:
44900
44900
- $ref: "#/components/parameters/AppIdentifier"
44901
44901
- $ref: "#/components/parameters/AppDisplayName"
44902
44902
- $ref: "#/components/parameters/AppCategories"
44903
+
/batches/{id}/cancel:
44904
+
post:
44905
+
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).'
44906
+
operationId: 'cancelBatch'
44907
+
parameters:
44908
+
- description: 'The batch job id returned from submit.'
44909
+
in: 'path'
44910
+
name: 'id'
44911
+
required: true
44912
+
schema:
44913
+
description: 'The batch job id returned from submit.'
44914
+
example: 'batch_abc123'
44915
+
minLength: 1
44916
+
type: 'string'
44917
+
responses:
44918
+
'200':
44919
+
content:
44920
+
application/json:
44921
+
schema:
44922
+
$ref: '#/components/schemas/BatchObject'
44923
+
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.'
44924
+
'400':
44925
+
content:
44926
+
application/json:
44927
+
example:
44928
+
error:
44929
+
code: 400
44930
+
message: 'No active workspace resolved for this request.'
44931
+
schema:
44932
+
$ref: '#/components/schemas/BatchErrorResponse'
44933
+
description: 'The API key resolved no active workspace.'
44934
+
'401':
44935
+
content:
44936
+
application/json:
44937
+
example:
44938
+
error:
44939
+
code: 401
44940
+
message: 'No auth credentials found.'
44941
+
schema:
44942
+
$ref: '#/components/schemas/BatchErrorResponse'
44943
+
description: 'Missing or invalid API key.'
44944
+
'403':
44945
+
content:
44946
+
application/json:
44947
+
example:
44948
+
error:
44949
+
code: 403
44950
+
message: 'Batch cancellation is not enabled for this organization.'
44951
+
schema:
44952
+
$ref: '#/components/schemas/BatchErrorResponse'
44953
+
description: 'Batch cancellation is not enabled for the organization.'
44954
+
'404':
44955
+
content:
44956
+
application/json:
44957
+
example:
44958
+
error:
44959
+
code: 404
44960
+
message: 'Batch not found.'
44961
+
schema:
44962
+
$ref: '#/components/schemas/BatchErrorResponse'
44963
+
description: 'No batch exists for the given id.'
44964
+
'409':
44965
+
content:
44966
+
application/json:
44967
+
example:
44968
+
error:
44969
+
code: 409
44970
+
message: 'This batch has already ended and cannot be cancelled.'
44971
+
schema:
44972
+
$ref: '#/components/schemas/BatchErrorResponse'
44973
+
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.'
44974
+
'429':
44975
+
content:
44976
+
application/json:
44977
+
example:
44978
+
error:
44979
+
code: 429
44980
+
message: 'Rate limit exceeded.'
44981
+
schema:
44982
+
$ref: '#/components/schemas/BatchErrorResponse'
44983
+
description: 'Batch API rate limit exceeded for the billable entity.'
44984
+
'500':
44985
+
content:
44986
+
application/json:
44987
+
example:
44988
+
error:
44989
+
code: 500
44990
+
message: 'Internal server error.'
44991
+
schema:
44992
+
$ref: '#/components/schemas/BatchErrorResponse'
44993
+
description: 'Unexpected error in the ingress or upstream batch-api.'
44994
+
'502':
44995
+
content:
44996
+
application/json:
44997
+
example:
44998
+
error:
44999
+
code: 502
45000
+
message: 'Upstream batch-api is unavailable.'
45001
+
schema:
45002
+
$ref: '#/components/schemas/BatchErrorResponse'
45003
+
description: 'The batch service is unavailable, or an upstream provider operation failed.'
45004
+
'503':
45005
+
content:
45006
+
application/json:
45007
+
example:
45008
+
error:
45009
+
code: 503
45010
+
message: 'Service Unavailable'
45011
+
schema:
45012
+
$ref: '#/components/schemas/BatchErrorResponse'
45013
+
description: 'OpenRouter could not check whether the caller may cancel the batch. No cancellation is sent to the provider. Retry the request.'
45014
+
summary: 'Cancel a batch'
45015
+
tags:
45016
+
- 'Batch'
45017
+
x-speakeasy-name-override: 'cancel'
45018
+
parameters:
45019
+
- $ref: "#/components/parameters/AppIdentifier"
45020
+
- $ref: "#/components/parameters/AppDisplayName"
45021
+
- $ref: "#/components/parameters/AppCategories"
44903
45022
/batches/{id}/results:
44904
45023
get:
44905
45024
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).'
@@ -55883,6 +56002,7 @@ paths:
55883
56002
- $ref: "#/components/parameters/AppCategories"
55884
56003
/models:
55885
56004
get:
56005
+
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`.'
55886
56006
operationId: 'getModels'
55887
56007
parameters:
55888
56008
- description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned'
@@ -66727,7 +66847,7 @@ tags:
66727
66847
name: 'Anthropic Messages'
66728
66848
- description: 'BYOK endpoints'
66729
66849
name: 'BYOK'
66730
-
- description: 'Submit, list, poll, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
66850
+
- description: 'Submit, list, poll, cancel, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
0 commit comments