Skip to content

Commit e5c35f9

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

1 file changed

Lines changed: 248 additions & 0 deletions

File tree

‎.speakeasy/in.openapi.yaml‎

Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13034,6 +13034,47 @@ components:
1303413034
- 'content'
1303513035
- 'role'
1303613036
type: 'object'
13037+
InternInvokeAcceptedResponse:
13038+
description: 'The intern admitted the prompt. The run continues on the intern.'
13039+
example:
13040+
session_id: 'b51a0e21-368b-4780-a220-14655bf28c55'
13041+
status: 'started'
13042+
properties:
13043+
session_id:
13044+
description: 'The session the run belongs to. Send it back to continue the conversation.'
13045+
example: 'b51a0e21-368b-4780-a220-14655bf28c55'
13046+
type: 'string'
13047+
status:
13048+
description: '`started` when a new run began. `steered` when the session already had a run going and the prompt was delivered into it instead.'
13049+
enum:
13050+
- 'started'
13051+
- 'steered'
13052+
example: 'started'
13053+
type: 'string'
13054+
required:
13055+
- 'session_id'
13056+
- 'status'
13057+
type: 'object'
13058+
InternInvokeRequest:
13059+
description: 'A prompt to run on the intern without holding a connection open.'
13060+
example:
13061+
input: 'New support ticket 48213. Case token: ct_9f2c. Investigate and reply.'
13062+
properties:
13063+
input:
13064+
description: 'The prompt for the run, at most 32000 characters.'
13065+
example: 'New support ticket 48213. Case token: ct_9f2c. Investigate and reply.'
13066+
maxLength: 32000
13067+
minLength: 1
13068+
type: 'string'
13069+
session_id:
13070+
description: 'The session to run in. Send the `session_id` from an earlier `202` to continue that conversation, for example to hand the intern a decision on a case it is working. Omit it to start a new session. Only a `session_id` this endpoint issued to the same caller on the same intern is accepted; any other is refused with `404`.'
13071+
example: 'b51a0e21-368b-4780-a220-14655bf28c55'
13072+
maxLength: 256
13073+
minLength: 1
13074+
type: 'string'
13075+
required:
13076+
- 'input'
13077+
type: 'object'
1303713078
InternLifecycleError:
1303813079
additionalProperties: false
1303913080
description: 'Intern lifecycle request failure.'
@@ -37235,6 +37276,213 @@ paths:
3723537276
- 'Interns'
3723637277
x-speakeasy-group: 'interns'
3723737278
x-speakeasy-name-override: 'chat'
37279+
/interns/{internId}/invoke:
37280+
post:
37281+
description: "Starts a run on one of your interns and answers `202` with the `session_id` as soon as the intern accepts it. The run keeps going on the intern after the response. Nothing about its progress comes back on this request; the intern reports through its own tools, such as Slack.\n\nSend the same `session_id` later to continue the conversation, for example to hand the intern a decision on work it started. If that session already has a run going, the prompt is delivered into it and the status is `steered`. A `session_id` is accepted only from the caller it was issued to, on the same intern; any other, including sessions started from Slack or the chat endpoint, is refused with `404`.\n\nRuns started here self-drive: the intern consents to its own tool approvals, and a question it asks is answered by its own fallback. A run ends when the intern finishes it or after its execution deadline (1 hour by default).\n\nAvailable to interns programme members. Callers outside the programme receive `404` for every path under `/api/v1/interns`."
37282+
operationId: 'invokeIntern'
37283+
parameters:
37284+
- description: 'The intern to run.'
37285+
in: 'path'
37286+
name: 'internId'
37287+
required: true
37288+
schema:
37289+
description: 'The intern to run.'
37290+
example: 'a11e0000-0000-4000-8000-000000000005'
37291+
type: 'string'
37292+
requestBody:
37293+
content:
37294+
application/json:
37295+
schema:
37296+
$ref: '#/components/schemas/InternInvokeRequest'
37297+
required: true
37298+
responses:
37299+
'202':
37300+
content:
37301+
application/json:
37302+
schema:
37303+
$ref: '#/components/schemas/InternInvokeAcceptedResponse'
37304+
description: 'The intern accepted the prompt. The run continues on the intern.'
37305+
'400':
37306+
content:
37307+
application/json:
37308+
example:
37309+
error:
37310+
code: 400
37311+
message: 'Invalid invoke request (input: Too small: expected string to have >=1 characters).'
37312+
metadata:
37313+
reason: 'bad_request'
37314+
retryable: false
37315+
schema:
37316+
$ref: '#/components/schemas/InternChatErrorResponse'
37317+
description: 'The body is not a valid request (`bad_request`).'
37318+
'401':
37319+
content:
37320+
application/json:
37321+
example:
37322+
error:
37323+
code: 401
37324+
message: 'Invalid or missing API key'
37325+
schema:
37326+
$ref: '#/components/schemas/InternChatErrorResponse'
37327+
description: 'No valid API key.'
37328+
'403':
37329+
content:
37330+
application/json:
37331+
example:
37332+
error:
37333+
code: 403
37334+
message: 'This API key''s creator is no longer a member of the organization. Ask an organization admin to reassign the key to an active member.'
37335+
schema:
37336+
$ref: '#/components/schemas/InternChatErrorResponse'
37337+
description: 'The key belongs to a member who has left the organization and holds no grant.'
37338+
'404':
37339+
content:
37340+
application/json:
37341+
example:
37342+
error:
37343+
code: 404
37344+
message: 'Intern not found'
37345+
metadata:
37346+
reason: 'not_found'
37347+
retryable: false
37348+
schema:
37349+
$ref: '#/components/schemas/InternChatErrorResponse'
37350+
description: 'The caller is outside the interns programme, the intern does not exist for this key, or the `session_id` was not issued to this caller on this intern (`not_found`).'
37351+
'408':
37352+
content:
37353+
application/json:
37354+
example:
37355+
error:
37356+
code: 408
37357+
message: 'Operation timed out after 60s. Please try again later.'
37358+
metadata:
37359+
reason: 'timeout'
37360+
retryable: true
37361+
schema:
37362+
$ref: '#/components/schemas/InternChatErrorResponse'
37363+
description: 'The request exceeded the route''s own deadline before the handler answered (`timeout`).'
37364+
'409':
37365+
content:
37366+
application/json:
37367+
example:
37368+
error:
37369+
code: 409
37370+
message: 'This intern is not running.'
37371+
metadata:
37372+
reason: 'intern_not_ready'
37373+
retryable: true
37374+
schema:
37375+
$ref: '#/components/schemas/InternChatErrorResponse'
37376+
description: 'The intern is not running or its runtime is too old to keep a run going without a connection (`intern_not_ready`), or the session already has a run that did not take the prompt (`busy`). A `busy` refusal carries `Retry-After`.'
37377+
headers:
37378+
Retry-After:
37379+
description: 'Seconds to wait before retrying this request. Present only on a `busy` refusal.'
37380+
required: false
37381+
schema:
37382+
description: 'Seconds to wait before retrying this request. Present only on a `busy` refusal.'
37383+
example: '5'
37384+
type: 'string'
37385+
'413':
37386+
content:
37387+
application/json:
37388+
example:
37389+
error:
37390+
code: 413
37391+
message: 'Request body exceeds 1048576 bytes'
37392+
metadata:
37393+
reason: 'payload_too_large'
37394+
retryable: false
37395+
schema:
37396+
$ref: '#/components/schemas/InternChatErrorResponse'
37397+
description: 'The body exceeds 1 MiB (`payload_too_large`).'
37398+
'429':
37399+
content:
37400+
application/json:
37401+
example:
37402+
error:
37403+
code: 429
37404+
message: 'Too many intern turns. Please wait a moment.'
37405+
metadata:
37406+
reason: 'rate_limited'
37407+
retryable: true
37408+
schema:
37409+
$ref: '#/components/schemas/InternChatErrorResponse'
37410+
description: 'Too many turns for the user or organization this key acts as (`rate_limited`). It carries `Retry-After`.'
37411+
headers:
37412+
Retry-After:
37413+
description: 'Seconds to wait before retrying this request.'
37414+
required: true
37415+
schema:
37416+
description: 'Seconds to wait before retrying this request.'
37417+
example: '60'
37418+
type: 'string'
37419+
'500':
37420+
content:
37421+
application/json:
37422+
example:
37423+
error:
37424+
code: 500
37425+
message: 'Could not look up the intern'
37426+
metadata:
37427+
reason: 'intern_unreachable'
37428+
retryable: true
37429+
schema:
37430+
$ref: '#/components/schemas/InternChatErrorResponse'
37431+
description: 'The intern could not be looked up, or authenticating the key failed.'
37432+
'502':
37433+
content:
37434+
application/json:
37435+
example:
37436+
error:
37437+
code: 502
37438+
message: 'The intern could not be reached.'
37439+
metadata:
37440+
reason: 'intern_unreachable'
37441+
retryable: true
37442+
schema:
37443+
$ref: '#/components/schemas/InternChatErrorResponse'
37444+
description: 'The intern could not be reached, rejected the request, or refused the turn before it started.'
37445+
'503':
37446+
content:
37447+
application/json:
37448+
example:
37449+
error:
37450+
code: 503
37451+
message: 'The intern cannot hold another run open across a question right now. Retry later.'
37452+
metadata:
37453+
reason: 'busy'
37454+
retryable: true
37455+
schema:
37456+
$ref: '#/components/schemas/InternChatErrorResponse'
37457+
description: 'The intern cannot take another run right now (`busy`). It reports `retryable: true` and carries `Retry-After`.'
37458+
headers:
37459+
Retry-After:
37460+
description: 'Seconds to wait before retrying this request.'
37461+
required: true
37462+
schema:
37463+
description: 'Seconds to wait before retrying this request.'
37464+
example: '5'
37465+
type: 'string'
37466+
'504':
37467+
content:
37468+
application/json:
37469+
example:
37470+
error:
37471+
code: 504
37472+
message: 'The intern did not answer in time.'
37473+
metadata:
37474+
reason: 'timeout'
37475+
retryable: true
37476+
schema:
37477+
$ref: '#/components/schemas/InternChatErrorResponse'
37478+
description: 'The intern did not accept the turn in time (`timeout`).'
37479+
security:
37480+
- apiKey: []
37481+
summary: 'Start an intern run without waiting for it'
37482+
tags:
37483+
- 'Interns'
37484+
x-speakeasy-group: 'interns'
37485+
x-speakeasy-name-override: 'invoke'
3723837486
/interns/{internId}/provision:
3723937487
post:
3724037488
description: 'Starts the first boot, or resumes an intern after suspension. This operation takes no request body. A body carrying any field is refused with 400 rather than ignored. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.'

0 commit comments

Comments
 (0)