Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 117 additions & 1 deletion .speakeasy/in.openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44478,6 +44478,121 @@ paths:
summary: 'Get a batch'
tags:
- 'Batch'
/batches/{id}/cancel:
post:
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).'
operationId: 'cancelBatch'
parameters:
- description: 'The batch job id returned from submit.'
in: 'path'
name: 'id'
required: true
schema:
description: 'The batch job id returned from submit.'
example: 'batch_abc123'
minLength: 1
type: 'string'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchObject'
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.'
'400':
content:
application/json:
example:
error:
code: 400
message: 'No active workspace resolved for this request.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'The API key resolved no active workspace.'
'401':
content:
application/json:
example:
error:
code: 401
message: 'No auth credentials found.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'Missing or invalid API key.'
'403':
content:
application/json:
example:
error:
code: 403
message: 'Batch cancellation is not enabled for this organization.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'Batch cancellation is not enabled for the organization.'
'404':
content:
application/json:
example:
error:
code: 404
message: 'Batch not found.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'No batch exists for the given id.'
'409':
content:
application/json:
example:
error:
code: 409
message: 'This batch has already ended and cannot be cancelled.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
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.'
'429':
content:
application/json:
example:
error:
code: 429
message: 'Rate limit exceeded.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'Batch API rate limit exceeded for the billable entity.'
'500':
content:
application/json:
example:
error:
code: 500
message: 'Internal server error.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'Unexpected error in the ingress or upstream batch-api.'
'502':
content:
application/json:
example:
error:
code: 502
message: 'Upstream batch-api is unavailable.'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'The batch service is unavailable, or an upstream provider operation failed.'
'503':
content:
application/json:
example:
error:
code: 503
message: 'Service Unavailable'
schema:
$ref: '#/components/schemas/BatchErrorResponse'
description: 'OpenRouter could not check whether the caller may cancel the batch. No cancellation is sent to the provider. Retry the request.'
summary: 'Cancel a batch'
tags:
- 'Batch'
x-speakeasy-name-override: 'cancel'
/batches/{id}/results:
get:
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).'
Expand Down Expand Up @@ -55200,6 +55315,7 @@ paths:
x-speakeasy-name-override: 'get'
/models:
get:
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`.'
operationId: 'getModels'
parameters:
- description: 'Number of records to skip for pagination. When both offset and limit are omitted, the full list is returned'
Expand Down Expand Up @@ -65804,7 +65920,7 @@ tags:
name: 'Anthropic Messages'
- description: 'BYOK endpoints'
name: 'BYOK'
- description: 'Submit, list, poll, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
- description: 'Submit, list, poll, cancel, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.'
name: 'Batch'
- description: 'Benchmarks endpoints'
name: 'Benchmarks'
Expand Down
Loading