Skip to content

Commit ce814b9

Browse files
openrouter-docs-sync[bot]OpenRouter SDK Bot
andauthored
chore: update OpenAPI spec from monorepo (#1455)
Co-authored-by: OpenRouter SDK Bot <sdk-bot@openrouter.ai>
1 parent 7dc7d14 commit ce814b9

1 file changed

Lines changed: 117 additions & 1 deletion

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44478,6 +44478,121 @@ paths:
4447844478
summary: 'Get a batch'
4447944479
tags:
4448044480
- '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'
4448144596
/batches/{id}/results:
4448244597
get:
4448344598
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:
5520055315
x-speakeasy-name-override: 'get'
5520155316
/models:
5520255317
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`.'
5520355319
operationId: 'getModels'
5520455320
parameters:
5520555321
- 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:
6580465920
name: 'Anthropic Messages'
6580565921
- description: 'BYOK endpoints'
6580665922
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.'
6580865924
name: 'Batch'
6580965925
- description: 'Benchmarks endpoints'
6581065926
name: 'Benchmarks'

0 commit comments

Comments
 (0)