Overview
Create, inspect, update, provision, suspend and delete OpenRouter interns through an API key, and talk to them: the chat route streams OpenAI-compatible completions from one intern, pausing as anopenrouter.provide_input tool call when the intern needs your permission or an answer. Available to interns programme members; other callers receive 404. See https://openrouter.ai/docs/guides/ori/intern-chat.
Available Operations
- ListInterns - List interns
- CreateIntern - Create an intern
- DeleteIntern - Delete an intern
- GetIntern - Get an intern
- UpdateIntern - Update an intern
- ProvisionIntern - Provision an intern
- SuspendIntern - Suspend an intern
- Chat - Stream a chat completion with an intern
ListInterns
Lists interns visible to the authenticated key, newest first. Filter by workspace and one or more lifecycle statuses. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.InternListResponse, errorErrors
CreateIntern
Creates an intern in an explicit workspace. The operation also creates its private vault. It can start provisioning immediately or wait for a later provision call. A retry with the same idempotency key and body resumes unfinished work. The request body is capped at 1048576 bytes and a larger body is refused with 413. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.Intern, errorErrors
DeleteIntern
Starts safe teardown of the intern, its runtime and its private vault. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.DeleteInternResponse, errorErrors
GetIntern
Returns the public lifecycle state and settings for one visible intern. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.Intern, errorErrors
UpdateIntern
Changes the intern name, description, instructions or model. Omitted fields stay unchanged. The request body is capped at 1048576 bytes and a larger body is refused with 413. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.Intern, errorErrors
ProvisionIntern
Starts the first boot, or resumes an intern after suspension. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.ProvisionInternResponse, errorErrors
SuspendIntern
Stops the intern runtime while keeping its disk and configuration for a later provision call. The API key selects the caller, workspace and visible interns. There is no default workspace fallback. Requests on regional hostnames such aseu.openrouter.ai are refused. API key required.
Example Usage
Parameters
Response
*components.SuspendInternResponse, errorErrors
Chat
Sends a prompt to one of your interns and streams the reply as OpenAI-compatible server-sent events ending with[DONE]. The run executes on the intern, which may pause to ask you something. It then streams one openrouter.provide_input tool call and finishes with finish_reason: "tool_calls", and the run stays open on the intern.
Every response, whether it ends with stop, tool_calls or error, is followed by a final chunk with empty choices that carries session_id, then data: [DONE]. That chunk carries the usage the intern reported for the run, after stop or error, and null when the intern reported none. After tool_calls its usage is null because the turn is not over. Read through [DONE]: the session_id you need to reply arrives after the tool_calls finish chunk.
To answer, send a second request with the same session_id, the assistant message echoing that tool call, and a tool message whose tool_call_id is the tool call id and whose content is the answer. The answer is delivered to the run that asked and the stream continues from where it paused. A question stays open for its interaction deadline (5 minutes by default) and the run is cancelled when that passes. Rejected replies do not extend the deadline.
Closing the connection after the [DONE] that follows finish_reason: "tool_calls" keeps the run alive. Disconnecting while a response is still streaming cancels the run. The disconnect is noticed when the intern next writes to the stream, which during a silent tool run can take more than one 30 second heartbeat interval.
A run the intern ends while you are still connected, by cancellation or by a deadline, ends the stream with a finish_reason: "error" chunk carrying 410 and reason run_ended, then the final empty-choices chunk and [DONE]. That error reports only an ending the intern confirmed. A connection that breaks without that confirmation ends with reason stream_severed, and a client that has already disconnected is promised no final event.
Set approval_mode to manual to have the intern ask before approval-bearing tools such as the shell. Omitted, the run self-drives and consents on your behalf. The mode belongs to the run started by that prompt and must be repeated on later prompts.
Available to interns programme members. Callers outside the programme receive 404 for every path under /api/v1/interns.