API
Experimental HttpApi surface for selected instance routes. The reference covers 170 operations and 500 schemas from the OpenAPI 3.1.0 document.
get/api/infoGet server info
Return the server identity, connection URLs, paths, and readiness status.
| Status | Type | Description |
|---|---|---|
200 | ServerInfo | ServerInfo |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID server.info
post/api/pairCreate pairing code
Create a short-lived, single-use code for a /auth/connect/:code pairing link.
| Status | Type | Description |
|---|---|---|
200 | PairingCode | PairingCode |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID server.pair
get/auth/connect/{code}Redeem pairing code
Redeem a pairing code. Browsers receive a session cookie and a redirect to the web app; requests that accept JSON receive a session token to use as the password.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
code | path | string | Required |
| Status | Type | Description |
|---|---|---|
200 | PairingSession | PairingSession |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID server.connect
get/api/locationGet location
Resolve the requested location or the server default location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | Location.PublicInfo | Location.PublicInfo |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID location.get
post/api/location/reloadReload configuration
Shut down and rebuild every loaded location. Pending permissions and forms are cancelled; running sessions continue with fresh services at the next step boundary. Emits location.shutdown for client recovery and responds once all replacement builds settle.
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID location.reload
get/api/agentList agents
Retrieve currently registered agents.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID agent.list
get/api/agent/{agentID}Get agent
Retrieve a single currently registered agent.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
agentID | path | Agent.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | AgentNotFoundErrorEncoded | LocationNotFoundErrorEncoded | AgentNotFoundError | LocationNotFoundError |
Operation ID agent.get
Experimental plugin routes.
get/api/pluginList plugins
Retrieve enabled server plugins and their current status.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID plugin.list
get/api/plugin/guiRead plugin GUI bundle
Read an active plugin's prebuilt CommonJS `./gui-experimental` bundle. Desktop app windows run its default export; the desktop app's main process runs its `main` export. Fails with not found when no active plugin has the id or the plugin exports no `./gui-experimental`.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
id | query | Plugin.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PluginNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PluginNotFoundError | LocationNotFoundError |
Operation ID plugin.gui
post/api/plugin/checkCheck plugin updates
Check one or all package plugins for available updates.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID plugin.check
post/api/plugin/updateUpdate plugins
Update package plugins concurrently and notify active locations to reload them. Responds once every update has finished; fails when any update fails.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID plugin.update
Experimental session routes.
get/api/sessionList sessions
Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | string | Optional | |
order | query | "asc" | "desc" | Optional | |
search | query | string | Optional | |
parentID | query | Session.ID | "null" | Optional | |
archived | query | "true" | "false" | Optional | |
directory | query | AbsolutePath | Optional | |
project | query | Project.ID | Optional | |
subpath | query | RelativePath | Optional | |
cursor | query | SessionsCursor | Optional |
| Status | Type | Description |
|---|---|---|
200 | SessionsResponse | SessionsResponse |
400 | InvalidCursorErrorEncoded | InvalidRequestErrorEncoded | InvalidCursorError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID session.list
post/api/sessionCreate session
Create a session at the requested location. A parentID creates a linked child session at its parent's location.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.create
get/api/experimental/session/statsGet session statistics
Aggregate local session activity, usage, and tool reliability for a time range.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string | Optional | |
to | query | string | Optional | |
project | query | Project.ID | Optional | |
timezone | query | string | Optional | |
tools | query | "none" | "summary" | "detail" | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID experimental.session.stats
post/api/experimental/session/importImport session
Import a projected session transcript at the requested location. Accepts transcripts exported by earlier releases. If parentID is supplied, the parent session must already exist; import parents before children.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID experimental.session.import
get/api/experimental/session/{sessionID}/exportExport session
Export a complete projected session transcript.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
sanitize | query | "true" | "false" | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID experimental.session.export
get/api/session/activeList active sessions
Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID session.active
get/api/session/{sessionID}Get session
Retrieve a session by ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.get
patch/api/session/{sessionID}Update session
Update mutable session properties.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
Operation ID session.update
delete/api/session/{sessionID}Delete session
Delete a session and its child sessions.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.remove
post/api/session/{sessionID}/forkFork session
Create a child session by copying projected history before a message. Omit before to copy the full history.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | MessageNotFoundErrorEncoded | SessionNotFoundError | MessageNotFoundError |
Operation ID session.fork
post/api/session/{sessionID}/agentSwitch session agent
Switch the agent used by subsequent provider turns.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.switchAgent
post/api/session/{sessionID}/modelSwitch session model
Switch the model used by subsequent provider turns.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.switchModel
post/api/session/{sessionID}/moveMove session
Move a session to another project directory at the requested delivery boundary.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.move
post/api/session/{sessionID}/promptSend message
Durably admit one session input and schedule agent-loop execution unless resume is false.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID session.prompt
post/api/session/{sessionID}/commandRun command
Execute a slash command callback immediately.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | CommandNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | CommandNotFoundError | LocationNotFoundError |
500 | CommandExecutionErrorEncoded | CommandExecutionError |
Operation ID session.command
post/api/experimental/session/{sessionID}/skillActivate skill
Activate a skill for a session by appending a skill message and resuming execution.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SkillNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | SkillNotFoundError | LocationNotFoundError |
Operation ID experimental.session.skill
post/api/session/{sessionID}/syntheticAdd synthetic message
Durably admit synthetic session input and schedule execution unless resume is false.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID session.synthetic
post/api/session/{sessionID}/shellRun shell command
Execute one shell command in the session's working directory. Emits a shell.started event before execution and a shell.ended event with the merged output after.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
Operation ID session.shell
post/api/session/{sessionID}/compactCompact session
Durably admit a session compaction request. Steers by default: it runs at the next step boundary instead of waiting behind queued prompts.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID session.compact
post/api/experimental/session/{sessionID}/waitWait for session
Wait for a session agent loop to become idle.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.session.wait
post/api/session/{sessionID}/revert/stageStage session revert
Stage or move a reversible session boundary and optionally apply its file changes.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | MessageNotFoundErrorEncoded | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | MessageNotFoundError | SessionNotFoundError | LocationNotFoundError |
409 | SessionBusyErrorEncoded | SessionBusyError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID session.revert.stage
delete/api/session/{sessionID}/revertClear staged revert
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
409 | SessionBusyErrorEncoded | SessionBusyError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID session.revert.clear
post/api/session/{sessionID}/revert/commitCommit staged revert
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
409 | SessionBusyErrorEncoded | SessionBusyError |
Operation ID session.revert.commit
get/api/session/{sessionID}/contextGet session context
Retrieve the active context messages for a session (all messages after the last compaction).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID session.context
get/api/session/{sessionID}/diffDiff session turns
Structured per-file diffs of the files a turn changed. A turn runs from the first prompt after the session was last idle until its next idle marker, so prompts steered in while it was busy belong to the same turn; `to` extends the range through a later turn. Compares the range's first recorded snapshot with its last; a step still running in the active session compares against the working copy. Ranges that span a location change are rejected. In sessions without any idle marker, a prompt's turn spans until the next user message.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
from | query | Session.Message.ID | Optional | |
to | query | Session.Message.ID | Optional | |
context | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | MessageNotFoundErrorEncoded | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | MessageNotFoundError | SessionNotFoundError | LocationNotFoundError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID session.diff
get/api/session/{sessionID}/inboxList session inbox
List durable enqueued session work not yet delivered, ordered by enqueue sequence. Includes user, synthetic, compaction, and move items.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.inbox.list
patch/api/session/{sessionID}/inbox/{inboxID}Update inbox item
Change a pending inbox item's delivery mode. Steering wakes session execution.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
inboxID | path | Session.Message.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID session.inbox.update
delete/api/session/{sessionID}/inbox/{inboxID}Cancel inbox input
Cancel an inbox item that has not yet been delivered. Unavailable items are a no-op.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
inboxID | path | Session.Message.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.inbox.cancel
get/api/experimental/session/{sessionID}/instructions/entriesList instruction entries
List API-managed instruction entries attached to the session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.session.instructions.entry.list
put/api/experimental/session/{sessionID}/instructions/entries/{key}Put instruction entry
Attach or replace one durable instruction entry. Changes announce as updates at the next step boundary.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
key | path | InstructionEntry.Key | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
413 | InstructionEntryValueTooLargeErrorEncoded | InstructionEntryValueTooLargeError |
Operation ID experimental.session.instructions.entry.put
delete/api/experimental/session/{sessionID}/instructions/entries/{key}Remove instruction entry
Remove one instruction entry; the removal is announced to the model at the next step boundary.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
key | path | InstructionEntry.Key | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.session.instructions.entry.remove
post/api/session/{sessionID}/generateGenerate text from session context
Generate transient text from the current session context without mutating session history. Its tokens and cost count toward the session's totals.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | SessionGenerateResponse | SessionGenerateResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID session.generate
get/api/experimental/session/{sessionID}/logRead the session log
Experimental durable session event log. Reads events after an exclusive aggregate sequence and continues with live events when follow=true.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
after | query | string | Optional | |
follow | query | "true" | "false" | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.session.log
post/api/session/{sessionID}/interruptInterrupt session execution
Interrupt active execution owned by this OpenCode process. Returns interrupted=true when an active execution was interrupted and false for the idle no-op. When resume=true, execution resumes pending steering input and next-in-line control items (manual compaction, moves) while queued prompts remain parked.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
resume | query | "true" | "false" | Optional |
| Status | Type | Description |
|---|---|---|
200 | SessionInterruptResponse | SessionInterruptResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.interrupt
post/api/session/{sessionID}/backgroundBackground blocking session tools
Move active foreground backgroundable tools for this session into background observation. Idle requests are a no-op.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.background
get/api/session/{sessionID}/message/{messageID}Get session message
Retrieve one projected message owned by the Session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
messageID | path | Session.Message.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | MessageNotFoundErrorEncoded | SessionNotFoundError | MessageNotFoundError |
Operation ID session.message.get
get/api/session/{sessionID}/formList session forms
Retrieve pending forms for a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | string | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
Operation ID session.form.list
post/api/session/{sessionID}/formCreate session form
Create a form for a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | string | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Form.CreatePayload | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID session.form.create
get/api/session/{sessionID}/form/{formID}Get session form
Retrieve a form and its current state for a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | string | Required | |
formID | path | Form.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | FormNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | FormNotFoundError | LocationNotFoundError |
Operation ID session.form.get
delete/api/session/{sessionID}/form/{formID}Cancel form
Cancel a pending form, optionally telling the asker why it was not answered.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | string | Required | |
formID | path | Form.ID | Required | |
message | query | string | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | FormNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | FormNotFoundError | LocationNotFoundError |
409 | FormAlreadySettledErrorEncoded | FormAlreadySettledError |
Operation ID session.form.cancel
post/api/session/{sessionID}/form/{formID}/replyReply to form
Submit an answer to a pending form.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | string | Required | |
formID | path | Form.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Form.Reply | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | FormInvalidAnswerErrorEncoded | InvalidRequestErrorEncoded | FormInvalidAnswerError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | FormNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | FormNotFoundError | LocationNotFoundError |
409 | FormAlreadySettledErrorEncoded | FormAlreadySettledError |
Operation ID session.form.reply
put/api/session/{sessionID}/environmentSet session environment
Replace the process environment used by local shell commands for this session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.environment
post/api/session/{sessionID}/viewView session
Mark the idle transition observed by the viewer as viewed.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID session.view
get/api/session/{sessionID}/messageGet session messages
Retrieve projected messages for a session, optionally filtered by type. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline, passing the same type filter on each page.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
limit | query | string | Optional | |
order | query | "asc" | "desc" | Optional | |
cursor | query | string | Optional | |
type | query | "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | Optional |
| Status | Type | Description |
|---|---|---|
200 | SessionMessagesResponse | SessionMessagesResponse |
400 | InvalidCursorErrorEncoded | InvalidRequestErrorEncoded | InvalidCursorError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID session.message.list
Experimental model routes.
get/api/modelList models
Retrieve the current snapshot of available models of the requested types, chat by default, ordered by release date within each type. The snapshot may precede initial plugin settlement.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
types | query | Model.Type | Model.Type[] | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID model.list
get/api/model/defaultGet default model
Retrieve the model used when a session has no explicit model selection.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID model.default
Experimental one-shot generation routes.
post/api/experimental/generate/textGenerate text
Run one stateless model generation using the server's base configuration and return the assistant text. Uses the base configuration's default model when none is specified.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | GenerateTextResponse | GenerateTextResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProviderNotFoundErrorEncoded | ModelNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError |
422 | UnsupportedModelErrorEncoded | UnsupportedModelError |
502 | ProviderRequestErrorEncoded | ProviderRequestError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.generate.text
post/api/experimental/generateGenerate text (deprecated path)
Deprecated alias of POST /api/experimental/generate/text.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | GenerateTextResponse | GenerateTextResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProviderNotFoundErrorEncoded | ModelNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError |
422 | UnsupportedModelErrorEncoded | UnsupportedModelError |
502 | ProviderRequestErrorEncoded | ProviderRequestError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.generate.textLegacy
post/api/experimental/generate/imageGenerate images
Generate or edit images with an image model using the server's base configuration and return them as base64. Stateless: nothing is stored.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Generate.ImageRequest | Required |
| Status | Type | Description |
|---|---|---|
200 | GenerateImageResponse | GenerateImageResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProviderNotFoundErrorEncoded | ModelNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError |
422 | UnsupportedModelErrorEncoded | UnsupportedModelError |
502 | ProviderRequestErrorEncoded | ProviderRequestError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.generate.image
post/api/experimental/generate/decisionsGenerate decisions
Ask a decision model typed predicate, choice and score questions about the input and return one probability-bearing answer per question, in question order. Stateless: nothing is stored.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Generate.DecisionRequest | Required |
| Status | Type | Description |
|---|---|---|
200 | GenerateDecisionsResponse | GenerateDecisionsResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProviderNotFoundErrorEncoded | ModelNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | ModelNotFoundError | LocationNotFoundError |
422 | UnsupportedModelErrorEncoded | UnsupportedModelError |
502 | ProviderRequestErrorEncoded | ProviderRequestError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.generate.decisions
Experimental server-brokered voice session routes.
get/api/experimental/voice/modelsList voice models
List supported voice models, their transports, and whether the server has a usable API key for each provider.
| Status | Type | Description |
|---|---|---|
200 | VoiceModelsResponse | VoiceModelsResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.voice.models
post/api/experimental/voice/sessionCreate voice session
Create a server-brokered voice session using the server's configured provider credentials and return the WebRTC SDP answer or WebSocket ephemeral token.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | VoiceSessionResponse | VoiceSessionResponse |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.voice.session
Experimental provider routes.
get/api/providerList providers
Retrieve active AI providers so clients can show provider availability and configuration.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID provider.list
get/api/provider/{providerID}Get provider
Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
providerID | path | Provider.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProviderNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID provider.get
Integration discovery and authentication routes.
get/api/integrationList integrations
Retrieve available integrations and their authentication methods.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID integration.list
get/api/integration/{integrationID}Get integration
Retrieve one integration and its authentication methods.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | LocationNotFoundError |
Operation ID integration.get
post/api/experimental/integration/wellknownAdd wellknown integration
Discover and persist an experimental wellknown integration source.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.integration.wellknown.add
post/api/integration/{integrationID}/connect/keyConnect with key
Run a key authentication method and store the resulting credential.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | LocationNotFoundError |
Operation ID integration.connect.key
post/api/integration/{integrationID}/connect/externalConnect with external credentials
Run an external authentication method and store a reference to its credential source.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | LocationNotFoundError |
Operation ID integration.connect.external
post/api/integration/{integrationID}/connect/oauthBegin OAuth connection
Start an OAuth attempt and return the authorization details.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID integration.oauth.connect
get/api/integration/{integrationID}/connect/oauth/{attemptID}Get OAuth attempt status
Poll the current status of an OAuth attempt.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
attemptID | path | Integration.AttemptID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | IntegrationAttemptNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError |
Operation ID integration.oauth.status
delete/api/integration/{integrationID}/connect/oauth/{attemptID}Cancel OAuth connection
Cancel an OAuth attempt and release its resources.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
attemptID | path | Integration.AttemptID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID integration.oauth.cancel
post/api/integration/{integrationID}/connect/oauth/{attemptID}/completeComplete OAuth connection
Complete a code-based OAuth attempt and store the resulting credential. For an automatic attempt with `paste`, `code` is the redirect URL copied from the browser, and the result arrives through the attempt status.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
attemptID | path | Integration.AttemptID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | IntegrationAttemptNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError |
Operation ID integration.oauth.complete
post/api/integration/{integrationID}/connect/commandBegin command connection
Start a command authentication attempt.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | IntegrationMethodNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | IntegrationMethodNotFoundError | LocationNotFoundError |
Operation ID integration.command.connect
get/api/integration/{integrationID}/connect/command/{attemptID}Get command attempt status
Poll the current status and output of a command authentication attempt.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
attemptID | path | Integration.AttemptID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | IntegrationNotFoundErrorEncoded | IntegrationAttemptNotFoundErrorEncoded | LocationNotFoundErrorEncoded | IntegrationNotFoundError | IntegrationAttemptNotFoundError | LocationNotFoundError |
Operation ID integration.command.status
delete/api/integration/{integrationID}/connect/command/{attemptID}Cancel command connection
Cancel a command authentication attempt and terminate its process.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
integrationID | path | Integration.ID | Required | |
attemptID | path | Integration.AttemptID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID integration.command.cancel
MCP server and resource routes.
get/api/mcpList MCP servers
Retrieve configured MCP servers and their connection status.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID mcp.list
put/api/experimental/mcp/{server}Add MCP server
Add an MCP server at runtime or replace an existing one, connecting it immediately.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
server | path | string | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.mcp.add
delete/api/experimental/mcp/{server}Remove MCP server
Stop an MCP server and remove it from the runtime set until restart.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
server | path | string | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | McpServerNotFoundErrorEncoded | LocationNotFoundErrorEncoded | McpServerNotFoundError | LocationNotFoundError |
Operation ID experimental.mcp.remove
post/api/experimental/mcp/{server}/connectConnect MCP server
Connect an MCP server at runtime, overriding a disabled configuration until restart.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
server | path | string | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | McpServerNotFoundErrorEncoded | LocationNotFoundErrorEncoded | McpServerNotFoundError | LocationNotFoundError |
Operation ID experimental.mcp.connect
post/api/experimental/mcp/{server}/disconnectDisconnect MCP server
Disconnect an MCP server at runtime, removing its tools until reconnected.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
server | path | string | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | McpServerNotFoundErrorEncoded | LocationNotFoundErrorEncoded | McpServerNotFoundError | LocationNotFoundError |
Operation ID experimental.mcp.disconnect
get/api/mcp/resourceList MCP resources
Retrieve resources and resource templates from connected MCP servers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID mcp.resource.catalog
post/api/experimental/client-mcp/tokenCreate client MCP WebSocket token
Create a short-lived single-use ticket for opening a client MCP WebSocket connection from a browser.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
x-opencode-ticket | header | string | Optional | |
location | query | object | Optional | |
name | query | string | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.mcp.client.token
get/api/experimental/client-mcpAttach client MCP server
Upgrade to a WebSocket over which the client hosts an MCP server named after `name`; its tools stay available while the socket is open. One JSON-RPC message per text frame. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
name | query | string | Required | |
ticket | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | boolean | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.mcp.client
get/api/credentialList credentials
List every stored integration credential, including its secret value.
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID credential.list
post/api/credentialCreate credential
Store an integration credential. It becomes the integration's active credential unless activate is false and the integration already has one. Fails with a conflict when the requested ID already exists, and with an invalid request when an `integration.connect` policy denies the integration.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Credential.CreateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID credential.create
patch/api/credential/{credentialID}Update credential
Update a stored credential label.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
credentialID | path | Credential.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID credential.update
delete/api/credential/{credentialID}Remove credential
Remove a stored integration credential.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
credentialID | path | Credential.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID credential.remove
post/api/credential/{credentialID}/activateActivate credential
Activate a stored integration credential.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
credentialID | path | Credential.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID credential.activate
Project routes.
get/api/projectList projects
List known projects. Archived projects are excluded unless archived=true.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
archived | query | "true" | "false" | Optional |
| Status | Type | Description |
|---|---|---|
200 | Project[] | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID project.list
patch/api/project/{projectID}Update project
Update the project canonical directory, display metadata, and workspace commands.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
projectID | path | Project.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | Project | Project |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProjectNotFoundErrorEncoded | ProjectNotFoundError |
Operation ID project.update
Location form routes.
get/api/formList pending forms
Retrieve pending forms for a location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID form.list
Experimental permission routes.
get/api/permission/requestList pending permission requests
Retrieve pending permission requests for a location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID permission.request.list
get/api/permission/savedList saved permissions
Retrieve saved permissions, optionally filtered by project.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
projectID | query | Project.ID | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID permission.saved.list
patch/api/permission/saved/{id}Update saved permission
Change the action or resource of a saved permission. Fails with a conflict when the project already has a saved permission with the same action and resource.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | PermissionSaved.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PermissionSavedNotFoundErrorEncoded | PermissionSavedNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
Operation ID permission.saved.update
delete/api/permission/saved/{id}Remove saved permission
Remove a saved permission by ID.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | PermissionSaved.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID permission.saved.remove
get/api/session/{sessionID}/permissionList session permission requests
Retrieve pending permission requests owned by a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
Operation ID session.permission.list
post/api/session/{sessionID}/permissionCreate permission request
Evaluate and, when approval is required, create a permission request for a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
Operation ID session.permission.create
get/api/session/{sessionID}/permission/{requestID}Get permission request
Retrieve a pending permission request owned by a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
requestID | path | Permission.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | PermissionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | PermissionNotFoundError | LocationNotFoundError |
Operation ID session.permission.get
post/api/session/{sessionID}/permission/{requestID}/replyReply to pending permission request
Respond to a pending permission request owned by a session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
requestID | path | Permission.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | PermissionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | PermissionNotFoundError | LocationNotFoundError |
Operation ID session.permission.reply
Experimental location-scoped filesystem routes.
get/api/fs/read/*Read file
Stream one file relative to the requested location with ETag, Last-Modified, and single-range HTTP Range support (206 Partial Content, 416 Range Not Satisfiable, and 304 Not Modified; multi-range and malformed Range headers fall back to 200).
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | string<binary> | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | FileNotFoundErrorEncoded | LocationNotFoundErrorEncoded | FileNotFoundError | LocationNotFoundError |
Operation ID fs.read
get/api/fs/listList directory
List direct children using an absolute path or a path relative to the requested location, including parents and siblings outside its directory. Entry paths remain relative to the requested location; listing does not switch locations.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
path | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | FileNotFoundErrorEncoded | LocationNotFoundErrorEncoded | FileNotFoundError | LocationNotFoundError |
Operation ID fs.list
get/api/fs/findFind files
Find recursively ranked filesystem entries relative to the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
query | query | string | Required | |
type | query | "file" | "directory" | Optional | |
limit | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID fs.find
post/api/experimental/fs/writeWrite file
Write the raw request body to an absolute path or a path relative to the requested location, creating parent directories, and return the resolved absolute path. Unlike read, the target is not confined to the location. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
path | query | string | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/octet-stream | string<binary> | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.fs.write
post/api/experimental/fs/watchWatch file
Watch one file relative to the requested location for 24 hours, publishing filesystem.changed on that location when it changes. Watching an already watched file resets its expiry. Paths follow read confinement. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | FileNotFoundErrorEncoded | LocationNotFoundErrorEncoded | FileNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.fs.watch
delete/api/experimental/fs/watchUnwatch file
Stop watching one file relative to the requested location. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.fs.unwatch
Experimental command routes.
get/api/commandList commands
Retrieve currently registered commands.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID command.list
Experimental skill routes.
get/api/skillList skills
Retrieve currently registered skills.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID skill.list
Plugin RPC routes.
post/api/rpc/{rpcID}/{method}Call a plugin RPC
Dispatch a method to the currently registered RPC at the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
rpcID | path | string | Required | |
method | path | string | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Rpc.Input | Required |
| Status | Type | Description |
|---|---|---|
200 | Rpc.Output | Rpc.Output |
400 | RpcErrorEncoded | InvalidRequestErrorEncoded | RpcError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
500 | RpcInternalErrorEncoded | RpcInternalError |
Operation ID rpc.call
Experimental event stream routes.
get/api/eventSubscribe to events
Subscribe to native events and plugin RPC events across all server locations. Volatile by contract: a slow consumer overflows and fails the stream, and events during disconnection are missed.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
types | query | "location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.first-token" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "artifact.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | "experimental.mcp.event" | string | "location.shutdown" | "models-dev.refreshed" | "credential.updated" | "credential.switched" | "integration.updated" | "provider.updated" | "model.updated" | "agent.updated" | "session.created" | "session.agent.selected" | "session.model.selected" | "session.moved" | "session.renamed" | "session.metadata.updated" | "session.permissions" | "session.viewed" | "session.archived" | "session.unarchived" | "session.usage.updated" | "session.deleted" | "session.forked" | "session.inbox.delivered" | "session.inbox.enqueued" | "session.inbox.cancelled" | "session.inbox.delivery.changed" | "session.execution.started" | "session.execution.succeeded" | "session.execution.failed" | "session.execution.interrupted" | "session.instructions.updated" | "session.synthetic" | "session.skill.activated" | "session.shell.started" | "session.shell.ended" | "session.step.started" | "session.step.first-token" | "session.step.streamed" | "session.step.ended" | "session.step.failed" | "session.text.started" | "session.text.delta" | "session.text.ended" | "session.reasoning.started" | "session.reasoning.delta" | "session.reasoning.ended" | "session.tool.input.started" | "session.tool.input.delta" | "session.tool.input.ended" | "session.tool.called" | "session.tool.progress" | "session.tool.success" | "session.tool.failed" | "session.retry.scheduled" | "session.compaction.started" | "session.compaction.delta" | "session.compaction.ended" | "session.compaction.failed" | "session.revert.staged" | "session.revert.cleared" | "session.revert.committed" | "filesystem.changed" | "reference.updated" | "permission.asked" | "permission.replied" | "plugin.updated" | "project.updated" | "worktree.updated" | "worktree.resolved" | "command.updated" | "config.updated" | "skill.updated" | "pty.created" | "pty.updated" | "pty.exited" | "pty.deleted" | "persistent-pty.added" | "persistent-pty.removed" | "persistent-pty.updated" | "shell.created" | "shell.exited" | "shell.deleted" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "artifact.updated" | "session.status" | "session.idle" | "tui.prompt.append" | "tui.command.execute" | "tui.toast.show" | "tui.session.select" | "installation.updated" | "installation.update-available" | "vcs.branch.updated" | "mcp.status.changed" | "mcp.resources.changed" | "experimental.mcp.event" | string[] | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID event.subscribe
Experimental location-scoped PTY routes.
get/api/ptyList PTY sessions
List PTY sessions for a location, including exited sessions retained until removal.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID pty.list
post/api/ptyCreate PTY session
Create a pseudo-terminal session for a location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID pty.create
get/api/pty/{ptyID}Get PTY session
Get one PTY session, including its exit code once exited.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PtyNotFoundError | LocationNotFoundError |
Operation ID pty.get
put/api/pty/{ptyID}Update PTY session
Update the title or viewport size of one PTY session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PtyNotFoundError | LocationNotFoundError |
Operation ID pty.update
delete/api/pty/{ptyID}Remove PTY session
Terminate and remove one PTY session.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PtyNotFoundError | LocationNotFoundError |
Operation ID pty.remove
post/api/pty/{ptyID}/connect-tokenCreate PTY WebSocket token
Create a short-lived single-use ticket for opening a PTY WebSocket connection.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
x-opencode-ticket | header | string | Optional | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | PtyNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PtyNotFoundError | LocationNotFoundError |
Operation ID pty.connect.token
get/api/pty/{ptyID}/connectConnect to PTY session
Establish a WebSocket connection streaming PTY output and accepting terminal input.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
location[directory] | query | string | Optional | |
cursor | query | string | Optional | |
ticket | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | boolean | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | PtyNotFoundErrorEncoded | LocationNotFoundErrorEncoded | PtyNotFoundError | LocationNotFoundError |
Operation ID pty.connect
Prototype persistent PTY routes.
get/api/experimental/session/{sessionID}/terminal/readRead the session's most recently controlled terminal
Read the last physical rows without changing selection or taking control. Omitted lines uses the live terminal height; larger counts include retained history. Blank rows are preserved. Screen dimensions and cursor remain relative to the live screen. Returns null when no current terminal exists. Selection is server-local and resets on restart. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required | |
lines | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.read
get/api/experimental/session/{sessionID}/terminal
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.list
post/api/experimental/session/{sessionID}/terminal
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | path | Session.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | PersistentPty.CreateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.create
post/api/experimental/persistent-pty/shutdown
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.shutdown
post/api/experimental/persistent-pty/handoff
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.handoff
get/api/experimental/persistent-pty/{ptyID}
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.get
put/api/experimental/persistent-pty/{ptyID}
Resize when size is present and rename when title is present; a null title clears the user title so the shell's title shows again. Renaming fails with 501 while the terminal service predates renaming.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | PersistentPty.UpdateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
501 | PtyFeatureUnsupportedErrorEncoded | PtyFeatureUnsupportedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.update
delete/api/experimental/persistent-pty/{ptyID}
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.remove
get/api/experimental/persistent-pty/{ptyID}/snapshot
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.snapshot
post/api/experimental/persistent-pty/{ptyID}/connect-token
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
x-opencode-ticket | header | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.connectToken
get/api/experimental/persistent-pty/{ptyID}/connectConnect to a persistent PTY
Stream persistent PTY output through the OpenCode server.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
ptyID | path | Pty.ID | Required | |
cursor | query | string | Optional | |
role | query | string | Optional | |
attachment_id | query | string | Optional | |
takeover | query | string | Optional | |
input_protocol | query | string | Optional | |
ticket | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | boolean | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | PtyNotFoundErrorEncoded | PtyNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.persistentPty.connect
get/api/experimental/media/{hash}Read media blob
Read a content-addressed media blob by SHA-256 hash with immutable Cache-Control, ETag, and 304 Not Modified support. Only blobs a stored message or inbox item still references are served. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
hash | path | MediaHash | Required |
| Status | Type | Description |
|---|---|---|
200 | string<binary> | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | FileNotFoundErrorEncoded | FileNotFoundError |
Operation ID experimental.media.get
get/api/experimental/scheduleList schedules
List a Session's schedules, oldest first. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | query | Session.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.schedule.list
post/api/experimental/scheduleCreate schedule
Schedule a prompt that wakes the Session once after a delay, at a time, every interval, or on a cron. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Schedule.CreatePayload | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.schedule.create
get/api/experimental/schedule/{scheduleID}Get schedule
Read one schedule. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
scheduleID | path | Schedule.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ScheduleNotFoundErrorEncoded | ScheduleNotFoundError |
Operation ID experimental.schedule.get
delete/api/experimental/schedule/{scheduleID}Delete schedule
Delete a schedule. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
scheduleID | path | Schedule.ID | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ScheduleNotFoundErrorEncoded | ScheduleNotFoundError |
Operation ID experimental.schedule.delete
post/api/experimental/schedule/{scheduleID}/pausePause schedule
Stop a schedule from firing until it is resumed. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
scheduleID | path | Schedule.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ScheduleNotFoundErrorEncoded | ScheduleNotFoundError |
Operation ID experimental.schedule.pause
post/api/experimental/schedule/{scheduleID}/resumeResume schedule
Resume a paused schedule. A one-shot that fell due while paused fires once; a repeating schedule resumes at its next slot. Experimental: needs experimental.schedules in the Session's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
scheduleID | path | Schedule.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ScheduleNotFoundErrorEncoded | ScheduleNotFoundError |
Operation ID experimental.schedule.resume
get/api/experimental/artifacts/providersList artifact providers
Return active artifact providers and default. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.providers
get/api/experimental/artifactsList artifacts
List published artifacts, newest update first. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
sessionID | query | Session.ID | Optional | |
provider | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.list
post/api/experimental/artifactsCreate artifact
Publish a new artifact through the selected or default artifact provider. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Artifact.CreateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ProviderNotFoundErrorEncoded | SessionNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ProviderNotFoundError | SessionNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.create
get/api/experimental/artifacts/{artifactID}Read artifact
Read an artifact's metadata and file contents. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifactID | path | Artifact.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ArtifactNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ArtifactNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.get
patch/api/experimental/artifacts/{artifactID}Update artifact
Replace an artifact's files at the same ID and URL. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifactID | path | Artifact.ID | Required | |
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Artifact.UpdateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | SessionNotFoundErrorEncoded | ArtifactNotFoundErrorEncoded | LocationNotFoundErrorEncoded | SessionNotFoundError | ArtifactNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.update
delete/api/experimental/artifacts/{artifactID}Delete artifact
Remove an artifact and its stored files. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifactID | path | Artifact.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | ArtifactNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ArtifactNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.delete
get/api/experimental/artifacts/{artifactID}/view/*View local artifact
Serve HTML and static files from the local provider. Experimental: needs experimental.artifacts in the Location's config and may change without notice.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
artifactID | path | Artifact.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | string<binary> | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
403 | ForbiddenErrorEncoded | ForbiddenError |
404 | FileNotFoundErrorEncoded | ArtifactNotFoundErrorEncoded | LocationNotFoundErrorEncoded | FileNotFoundError | ArtifactNotFoundError | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.artifacts.view
get/api/experimental/jobList background jobs
List active and unconsumed background jobs, optionally filtered by owning session, descendants, or kind. Experimental: may change without compatibility guarantees.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
sessionID | query | Session.ID | Optional | |
kind | query | Job.Kind | Optional | |
status | query | Job.Status | Optional | |
descendants | query | "true" | "false" | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | SessionNotFoundErrorEncoded | SessionNotFoundError |
Operation ID experimental.job.list
Location-scoped shell command routes.
get/api/shellList running shell commands
List currently running shell commands for a location. Exited commands are not included.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID shell.list
post/api/shellRun shell command
Spawn one non-interactive shell command for a location. Combined stdout/stderr is captured to a file pageable via output.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID shell.create
get/api/shell/{id}Get shell command
Get one shell command, including its status and exit code once exited.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | Shell.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ShellNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ShellNotFoundError | LocationNotFoundError |
Operation ID shell.get
delete/api/shell/{id}Remove shell command
Terminate and remove one shell command and its retained output.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | Shell.ID | Required | |
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID shell.remove
get/api/shell/{id}/outputRead shell output
Page through captured combined output by absolute byte cursor.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
id | path | Shell.ID | Required | |
location | query | object | Optional | |
cursor | query | string | Optional | |
limit | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ShellNotFoundErrorEncoded | LocationNotFoundErrorEncoded | ShellNotFoundError | LocationNotFoundError |
Operation ID shell.output
Location-scoped project references.
get/api/referenceList references
List references available in the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID reference.list
Project-based worktree management routes.
get/api/worktreeList worktrees
Return the project's saved worktree inventory without loading configuration or running discovery.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
projectID | query | Project.ID | Required |
| Status | Type | Description |
|---|---|---|
200 | Worktree.List | Worktree.List |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProjectNotFoundErrorEncoded | ProjectNotFoundError |
Operation ID worktree.list
post/api/worktreeCreate worktree
Load the project's canonical configuration, create a local worktree using its selected strategy, then run the project's setup script.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Worktree.CreateInput | Required |
| Status | Type | Description |
|---|---|---|
200 | Worktree.Info | Worktree.Info |
400 | WorktreeErrorEncoded | InvalidRequestErrorEncoded | WorktreeError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProjectNotFoundErrorEncoded | ProjectNotFoundError |
Operation ID worktree.create
delete/api/worktreeRemove worktree
Load the project's canonical configuration and remove a saved worktree using its recorded strategy.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Worktree.RemoveInput | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | WorktreeErrorEncoded | InvalidRequestErrorEncoded | WorktreeError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProjectNotFoundErrorEncoded | ProjectNotFoundError |
Operation ID worktree.remove
post/api/worktree/refreshRefresh worktrees
Load the project's canonical configuration, discover worktrees across known checkout roots using all available strategies, and reconcile saved state.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | WorktreeErrorEncoded | InvalidRequestErrorEncoded | WorktreeError | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | ProjectNotFoundErrorEncoded | ProjectNotFoundError |
Operation ID worktree.refresh
Location-scoped version control routes.
post/api/vcs/initInitialize VCS repository
Initialize a repository using the selected VCS provider in a markerless project's directory and refresh its location services. Omitting provider defaults to git; built-in git and hg providers support initialization. An unknown provider returns 400; a registered provider without init returns 501.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
provider | query | string | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
409 | ConflictErrorEncoded | ConflictError |
501 | VcsInitNotSupportedErrorEncoded | VcsInitNotSupportedError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID vcs.init
get/api/vcsVCS info
Get current and default branch information for the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID vcs.get
get/api/vcs/baseVCS review base
Infer a local review base from named branch creation history, or the repository default only when currently on that branch. Returns null before the first commit or when the provider lacks base metadata; ambiguous Git history requires an explicit base on diff requests.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID vcs.base
get/api/vcs/statusVCS status
List uncommitted working-copy changes relative to the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID vcs.status
get/api/vcs/branchVCS branches
List local and remote branches available at the requested location.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
search | query | string | Optional | |
limit | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID vcs.branch.list
get/api/vcs/diffVCS diff
Diff HEAD to the working copy (working), the base merge-base to the working copy (branch), or the base merge-base to HEAD (committed). Omitting base preserves repository-default comparison; supplying it overrides the comparison without saving it.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional | |
mode | query | Vcs.Mode | Required | |
base | query | string | Optional | |
context | query | string | Optional | |
untracked | query | Vcs.Untracked | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID vcs.diff
post/api/debug/heap-dumpWrite a heap snapshot
Write a JavaScript heap snapshot of the server process into its log directory, or the requested directory, and return the server-local path once the file is complete. Pauses the server while the heap serializes and can temporarily increase its memory use. The snapshot can contain credentials, prompts, and file contents.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
directory | query | string | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
500 | UnknownErrorEncoded | UnknownError |
Operation ID debug.heapDump
get/api/debug/locationList loaded locations
List locations currently loaded by the server.
| Status | Type | Description |
|---|---|---|
200 | Location.PublicRef[] | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID debug.location.list
delete/api/debug/locationEvict a loaded location
Dispose the requested location's cached services so its next use boots them fresh.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID debug.location.evict
get/api/experimental/migration/v1Get V1 migration status
Return the progress of the V1 to V2 session history migration.
| Status | Type | Description |
|---|---|---|
200 | object | object | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
Operation ID experimental.migration.v1.status
Location-scoped web search routes.
get/api/websearch/providerList web search providers
Return the registered web search providers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID websearch.providers
post/api/websearchSearch the web
Run one web search through the selected provider. Specify a provider to override the configured default.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | object | Required |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID websearch.query
Experimental usage limit routes.
get/api/experimental/usage/limitsGet usage limits
Return the OpenCode Go allowance and Console budgets of the OpenCode Console workspace the location is signed in to, or null when it isn't signed in.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | object | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
503 | ServiceUnavailableErrorEncoded | ServiceUnavailableError |
Operation ID experimental.usage.limits
Location-scoped configuration routes.
get/api/configGet configuration
Return configuration documents and discovery sources for the requested location, from lowest to highest priority.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
location | query | object | Optional |
| Status | Type | Description |
|---|---|---|
200 | Config.Entry[] | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID config.get
get/api/config/shellList available shells
Return shells available to terminal and agent execution.
| Status | Type | Description |
|---|---|---|
200 | ConfigShell.Option[] | Success |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID config.shells
patch/api/experimental/configUpdate global configuration
Patch supported fields in the highest-precedence global configuration document.
| Request body | Type | Required | Description |
|---|---|---|---|
application/json | Config.Patch | Required |
| Status | Type | Description |
|---|---|---|
204 | empty | <No Content> |
400 | InvalidRequestErrorEncoded | InvalidRequestError |
401 | UnauthorizedErrorEncoded | UnauthorizedError |
404 | LocationNotFoundErrorEncoded | LocationNotFoundError |
Operation ID experimental.config.update
The data types the operations above refer to.
AbsolutePathstring
string
Agent.Colorstring
string
Agent.IDstring
string
Agent.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Agent.ID | Required | |
name | string | Required | |
model | Model.Ref | Optional | |
request | Provider.Request | Required | |
system | string | Optional | |
description | string | Optional | |
mode | "subagent" | "primary" | "all" | Required | |
hidden | boolean | Required | |
color | Agent.Color | Optional | |
steps | integer | Optional | |
permissions | Permission.Ruleset | Required |
AgentNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "AgentNotFoundError" | Required | |
agentID | string | Required | |
message | string | Required |
Artifact.Capability"static" | "server-code" | "sqlite" | "durable-objects"
"static" | "server-code" | "sqlite" | "durable-objects"
Artifact.Contentobject
| Field | Type | Required | Description |
|---|---|---|---|
info | Artifact.Info | Required | |
files | object | Required |
Artifact.CreateInputobject
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Required | |
files | object | Required | |
entry | string | Optional | |
provider | string | Optional | |
sessionID | Session.ID | Optional |
Artifact.IDstring
string
Artifact.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Artifact.ID | Required | |
provider | Artifact.ProviderIDEncoded | Required | |
sessionID | Session.ID | Optional | |
title | string | Required | |
entry | string | Required | |
url | string | Required | |
time | Artifact.Time | Required |
Artifact.Providerobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Artifact.ProviderIDEncoded | Required | |
name | string | Required | |
capabilities | Artifact.Capability[] | Required | |
default | boolean | Required |
Artifact.ProviderIDEncodedstring
string
Artifact.Timeobject
| Field | Type | Required | Description |
|---|---|---|---|
created | number | Required | |
updated | number | Required |
Artifact.UpdateInputobject
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Optional | |
files | object | Required | |
entry | string | Optional | |
sessionID | Session.ID | Optional |
ArtifactNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ArtifactNotFoundError" | Required | |
artifactID | string | Required | |
message | string | Required |
Command.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
description | string | Optional |
CommandExecutionErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "CommandExecutionError" | Required | |
command | string | Required | |
message | string | Required |
CommandNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "CommandNotFoundError" | Required | |
command | string | Required | |
message | string | Required |
Config.AgentEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
model | string | object | Optional | |
request | object | Optional | |
system | string | Optional | |
description | string | Optional | |
mode | "subagent" | "primary" | "all" | Optional | |
hidden | boolean | Optional | |
color | string | Optional | |
steps | integer | Optional | |
disabled | boolean | Optional | |
permissions | Permission.Ruleset | Optional |
Config.CommandEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
template | string | Required | |
description | string | Optional | |
agent | string | Optional | |
model | string | object | Optional | |
subagent | boolean | Optional | |
subtask | boolean | Optional | Deprecated alias for subagent. |
Config.Compaction.Percentstring
string
Config.DirectoryEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "directory" | Required | |
path | AbsolutePath | Required |
Config.DocumentEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "document" | Required | |
path | AbsolutePath | Optional | |
info | Config.InfoEncoded | Required |
Config.EntryConfig.DocumentEncoded | Config.DirectoryEncoded
Config.Formatter.EntryEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
disabled | boolean | Optional | |
command | string[] | Optional | |
environment | object | Optional | |
extensions | string[] | Optional |
Config.InfoEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
$schema | string | Optional | |
shell | string | Optional | |
model | string | object | Optional | |
default_agent | string | Optional | |
update | "disable" | "notify" | "auto" | Optional | |
share | "manual" | "auto" | "disabled" | Optional | |
enterprise | object | Optional | |
username | string | Optional | |
timezone | string | Optional | |
permissions | Permission.Ruleset | Optional | |
policies | object[] | Optional | |
agents | object | Optional | |
snapshots | boolean | Optional | |
watcher | object | Optional | |
formatter | boolean | object | Optional | |
lsp | boolean | object | Optional | |
media | object | Optional | |
tool_output | object | Optional | |
mcp | object | Optional | |
compaction | object | Optional | |
skills | string[] | Optional | |
commands | object | Optional | |
instructions | string[] | Optional | |
references | object | Optional | |
websearch | false | ConfigWebSearch.InfoEncoded | Optional | |
plugins | string | Config.Plugin.EntryEncoded[] | Optional | |
worktree | Config.Worktree | Optional | |
warming | boolean | Config.WarmingEncoded | Optional | |
providers | object | Optional | |
experimental | object | Optional |
Config.LSP.ServerEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
command | string[] | Required | |
extensions | string[] | Optional | |
disabled | boolean | Optional | |
env | object | Optional | |
initialization | object | Optional |
Config.Model.Capabilitiesobject
| Field | Type | Required | Description |
|---|---|---|---|
tools | boolean | Optional | |
freeform | Tool.FreeformFormat[] | Optional | |
input | string[] | Optional | |
output | string[] | Optional | |
temperature | boolean | Optional | |
reasoning | Config.Model.Reasoning | Optional |
Config.Model.CostEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
tier | object | Optional | |
input | Money.USDPerMillionTokens | Required | |
output | Money.USDPerMillionTokens | Required | |
cache | object | Optional |
Config.Model.Reasoningobject | object
object | object
Config.Model.Settingsobject
| Field | Type | Required | Description |
|---|---|---|---|
compaction | Provider.Compaction | Optional | |
cache | Provider.Cache | Optional | |
encoding | Provider.Encoding | Optional |
Config.Model.VariantSettingsobject
| Field | Type | Required | Description |
|---|---|---|---|
compaction | Provider.Compaction | Optional | |
encoding | Provider.Encoding | Optional |
Config.ModelEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
modelID | string | Optional | |
type | Model.Type | Optional | |
family | string | Optional | |
name | string | Optional | |
releaseDate | string | Optional | Release date as YYYY-MM-DD or YYYY-MM |
compatibility | Model.Compatibility | Optional | |
package | string | Optional | |
settings | Config.Model.Settings | Optional | |
headers | object | Optional | |
body | object | Optional | |
capabilities | Config.Model.Capabilities | Optional | |
variants | object[] | Optional | |
cost | Config.Model.CostEncoded | Config.Model.CostEncoded[] | Optional | |
disabled | boolean | Optional | |
limit | object | Optional |
Config.Patchobject
| Field | Type | Required | Description |
|---|---|---|---|
shell | string | null | Required |
Config.Plugin.EntryEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
package | string | Required | |
options | object | Optional |
Config.Provider.Settingsobject
| Field | Type | Required | Description |
|---|---|---|---|
timeout | number | false | Optional | |
headerTimeout | number | false | Optional | |
chunkTimeout | number | false | Optional | |
compaction | Provider.Compaction | Optional | |
cache | Provider.Cache | Optional | |
transport | Provider.Transport | Optional | |
encoding | Provider.Encoding | Optional |
Config.ProviderEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
canonical | Provider.ID | Optional | |
name | string | Optional | |
env | string[] | Optional | |
package | string | Optional | |
compatibility | Provider.Compatibility | Optional | |
settings | Config.Provider.Settings | Optional | |
headers | object | Optional | |
body | object | Optional | |
models | object | Optional |
Config.Reference.GitEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
repository | string | Required | |
branch | string | Optional | |
description | string | Optional | |
hidden | boolean | Optional |
Config.Reference.LocalEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
path | string | Required | |
description | string | Optional | |
hidden | boolean | Optional |
Config.WarmingEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Optional | |
interval | "auto" | string | Optional | |
duration | string | Optional |
Config.Worktreeobject
| Field | Type | Required | Description |
|---|---|---|---|
directory | string | Required |
ConfigShell.Optionobject
| Field | Type | Required | Description |
|---|---|---|---|
path | string | Required | |
name | string | Required | |
acceptable | boolean | Required |
ConfigWebSearch.InfoEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
provider | "random" | WebSearch.ID | Required |
ConflictErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ConflictError" | Required | |
message | string | Required | |
resource | string | null | Optional |
Connection.CredentialInfoobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "credential" | Required | |
id | Credential.ID | Required | |
label | string | Required | |
method | "key" | "oauth" | "external" | Required | |
status | Connection.Status | Optional |
Connection.EnvInfoobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "env" | Required | |
name | string | Required | |
status | Connection.Status | Optional |
Connection.InfoConnection.CredentialInfo | Connection.EnvInfo
Connection.Statusobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "needs_auth" | Required | |
message | string | Required | |
url | string | Optional |
Credential.CreateInputobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Credential.ID | Optional | |
integrationID | Integration.ID | Required | |
label | string | Optional | |
value | Credential.Value | Required | |
activate | boolean | Optional |
Credential.Entryobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Credential.ID | Required | |
integrationID | Integration.ID | Required | |
label | string | Required | |
active | boolean | Required | |
value | Credential.Value | Required |
Credential.Externalobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "external" | Required | |
methodID | Integration.MethodID | Required | |
metadata | object | Optional |
Credential.IDstring
string
Credential.Keyobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "key" | Required | |
key | string | Required | |
metadata | object | Optional |
Credential.OAuthobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "oauth" | Required | |
methodID | Integration.MethodID | Required | |
refresh | string | Required | |
access | string | Required | |
expires | integer | Required | |
metadata | object | Optional |
Credential.ValueCredential.OAuth | Credential.Key | Credential.External
Event.IDstring
string
Event.Seqinteger
integer
Event.VersionEncoded_c3ea984aceae2
2
Event.VersionEncoded_c77c5abcb68d1
1
EventLog.Syncedobject
Marker emitted once when a log read reaches its captured watermark. The reader holds every event committed at or below seq.
| Field | Type | Required | Description |
|---|---|---|---|
type | "log.synced" | Required | |
aggregateID | string | Required | |
seq | Event.Seq | Optional |
FileDiff.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Required | |
patch | string | Required | |
additions | integer | Required | |
deletions | integer | Required | |
status | "added" | "deleted" | "modified" | Required | |
more | true | Optional |
FileNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "FileNotFoundError" | Required | |
path | string | Required | |
message | string | Required |
FileSystem.Entryobject
| Field | Type | Required | Description |
|---|---|---|---|
path | RelativePath | Required | |
type | "file" | "directory" | Required |
FileSystem.Writeobject
| Field | Type | Required | Description |
|---|---|---|---|
path | AbsolutePath | Required |
ForbiddenErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ForbiddenError" | Required | |
message | string | Required |
Form.Answerobject
object
Form.Answer_1object
object
Form.BooleanFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When[] | Optional | |
type | "boolean" | Required | |
default | boolean | Optional |
Form.BooleanField_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When_1[] | Optional | |
type | "boolean" | Required | |
default | boolean | Optional |
Form.CreatePayloadobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Form.ID | null | Optional | |
title | string | Required | |
metadata | Form.Metadata | Optional | |
fields | Form.Fields | Required |
Form.Detailobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Form.ID | Required | |
sessionID | string | Required | |
title | string | Required | |
metadata | Form.Metadata | Optional | |
fields | Form.Fields | Required | |
state | Form.State | Required |
Form.ExternalFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
type | "external" | Required | |
url | string | Required | |
title | string | Optional | |
description | string | Optional |
Form.FieldForm.StringField | Form.NumberField | Form.IntegerField | Form.BooleanField | Form.MultiselectField | Form.ExternalField
Form.Field_1Form.StringField_1 | Form.NumberField_1 | Form.IntegerField_1 | Form.BooleanField_1 | Form.MultiselectField_1 | Form.ExternalField
Form.FieldsForm.Field[]
Form.Fields_1Form.Field_1[]
Form.IDstring
string
Form.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Form.ID | Required | |
sessionID | string | Required | |
title | string | Required | |
metadata | Form.Metadata | Optional | |
fields | Form.Fields | Required |
Form.Info_1object
| Field | Type | Required | Description |
|---|---|---|---|
id | Form.ID | Required | |
sessionID | string | Required | |
title | string | Required | |
metadata | Form.Metadata | Optional | |
fields | Form.Fields_1 | Required |
Form.IntegerFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When[] | Optional | |
type | "integer" | Required | |
minimum | number | "Infinity" | "-Infinity" | "NaN" | Optional | |
maximum | number | "Infinity" | "-Infinity" | "NaN" | Optional | |
default | number | "Infinity" | "-Infinity" | "NaN" | Optional |
Form.IntegerField_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When_1[] | Optional | |
type | "integer" | Required | |
minimum | number | "NaN" | "Infinity" | "-Infinity" | Optional | |
maximum | number | "NaN" | "Infinity" | "-Infinity" | Optional | |
default | number | "NaN" | "Infinity" | "-Infinity" | Optional |
Form.Metadataobject
object
Form.MultiselectFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When[] | Optional | |
type | "multiselect" | Required | |
options | Form.Option[] | Required | |
minItems | integer | Optional | |
maxItems | integer | Optional | |
custom | boolean | Optional | |
default | string[] | Optional |
Form.MultiselectField_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When_1[] | Optional | |
type | "multiselect" | Required | |
options | Form.Option[] | Required | |
minItems | integer | Optional | |
maxItems | integer | Optional | |
custom | boolean | Optional | |
default | string[] | Optional |
Form.NumberFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When[] | Optional | |
type | "number" | Required | |
minimum | number | "Infinity" | "-Infinity" | "NaN" | Optional | |
maximum | number | "Infinity" | "-Infinity" | "NaN" | Optional | |
default | number | "Infinity" | "-Infinity" | "NaN" | Optional |
Form.NumberField_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When_1[] | Optional | |
type | "number" | Required | |
minimum | number | "NaN" | "Infinity" | "-Infinity" | Optional | |
maximum | number | "NaN" | "Infinity" | "-Infinity" | Optional | |
default | number | "NaN" | "Infinity" | "-Infinity" | Optional |
Form.Optionobject
| Field | Type | Required | Description |
|---|---|---|---|
value | string | Required | |
label | string | Required | |
description | string | Optional |
Form.Replyobject
| Field | Type | Required | Description |
|---|---|---|---|
answer | Form.Answer | Required |
Form.Stateobject | object | object
object | object | object
Form.StringFieldobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When[] | Optional | |
type | "string" | Required | |
format | "email" | "uri" | "date" | "date-time" | Optional | |
minLength | integer | Optional | |
maxLength | integer | Optional | |
pattern | string | Optional | |
placeholder | string | Optional | |
default | string | Optional | |
options | Form.Option[] | Optional | |
custom | boolean | Optional |
Form.StringField_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
title | string | Optional | |
description | string | Optional | |
required | boolean | Optional | |
hidden | boolean | Optional | |
when | Form.When_1[] | Optional | |
type | "string" | Required | |
format | "email" | "uri" | "date" | "date-time" | Optional | |
minLength | integer | Optional | |
maxLength | integer | Optional | |
pattern | string | Optional | |
placeholder | string | Optional | |
default | string | Optional | |
options | Form.Option[] | Optional | |
custom | boolean | Optional |
Form.Valuestring | number | "Infinity" | "-Infinity" | "NaN" | boolean | string[]
string | number | "Infinity" | "-Infinity" | "NaN" | boolean | string[]
Form.Value_1string | number | "NaN" | "Infinity" | "-Infinity" | boolean | string[]
string | number | "NaN" | "Infinity" | "-Infinity" | boolean | string[]
Form.Whenobject
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
op | "eq" | "neq" | Required | |
value | string | number | "Infinity" | "-Infinity" | "NaN" | boolean | Required |
Form.When_1object
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Required | |
op | "eq" | "neq" | Required | |
value | string | number | "NaN" | "Infinity" | "-Infinity" | boolean | Required |
FormAlreadySettledErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "FormAlreadySettledError" | Required | |
id | string | Required | |
message | string | Required |
FormInvalidAnswerErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "FormInvalidAnswerError" | Required | |
id | string | Required | |
message | string | Required |
FormNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "FormNotFoundError" | Required | |
id | string | Required | |
message | string | Required |
Generate.ChoiceAnswerobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "choice" | Required | |
name | string | Required | |
choice | Generate.ChoiceValue | Required | |
probabilities | object[] | Required | |
confidence | number | Required |
Generate.ChoiceQuestionobject
Pick one value from a fixed set
| Field | Type | Required | Description |
|---|---|---|---|
type | "choice" | Required | |
name | string | Required | Unique within the request; echoed on the matching answer |
instructions | string | Required | |
choices | object[] | Required |
Generate.ChoiceValuestring | boolean
Choice values are typed: true and "true" are different values
string | boolean
Generate.DecisionAnswerGenerate.PredicateAnswer | Generate.ChoiceAnswer | Generate.ScoreAnswer | Generate.ErrorAnswer
Generate.DecisionFilePartobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "file" | Required | |
data | Prompt.Base64 | Required | |
mime | string | Required | |
name | string | Optional |
Generate.DecisionJsonPartobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "json" | Required | |
value | object | Required |
Generate.DecisionPartGenerate.DecisionTextPart | Generate.DecisionJsonPart | Generate.DecisionFilePart
Generate.DecisionQuestionGenerate.PredicateQuestion | Generate.ChoiceQuestion | Generate.ScoreQuestion
Generate.DecisionRequestobject
| Field | Type | Required | Description |
|---|---|---|---|
model | Model.Ref | Required | |
input | Generate.DecisionPart[] | Required | The evidence every question is asked about, in order |
questions | Generate.DecisionQuestion[] | Required | Question names must be unique; duplicates fail with InvalidRequestError |
Generate.DecisionResultobject
| Field | Type | Required | Description |
|---|---|---|---|
answers | Generate.DecisionAnswer[] | Required | One answer per question, in question order |
cost | Money.USD | Optional | |
tokens | Generate.Usage | Optional | |
native | Generate.Native | Optional |
Generate.DecisionTextPartobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "text" | Required | |
text | string | Required |
Generate.ErrorAnswerobject
This one question has no answer; the other answers still came back
| Field | Type | Required | Description |
|---|---|---|---|
type | "error" | Required | |
name | string | Required | |
reason | string | Required | Why the question has no answer, for example refusal |
message | string | Optional |
Generate.Fileobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Prompt.Base64 | Required | |
mime | string | Required | |
name | string | Optional |
Generate.ImageAspectstring
Aspect ratio as width:height, for example 16:9
string
Generate.ImageOutputobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "image" | Required | |
data | Prompt.Base64 | Required | |
mime | string | Required | |
name | string | Optional |
Generate.ImageRequestobject
| Field | Type | Required | Description |
|---|---|---|---|
model | Model.Ref | Required | |
prompt | string | Required | |
images | Generate.File[] | Optional | |
n | integer | Optional | |
aspect | Generate.ImageAspect | Optional | |
resolution | Generate.ImageResolution | Optional |
Generate.ImageResolution"1K" | "2K" | "4K" | string
Size tier such as 1K, 2K or 4K; 1K is about as many pixels as 1024x1024 at the requested aspect
"1K" | "2K" | "4K" | string
Generate.ImageResultobject
| Field | Type | Required | Description |
|---|---|---|---|
images | Generate.ImageOutput[] | Required | |
cost | Money.USD | Optional | |
tokens | Generate.Usage | Optional | |
native | Generate.Native | Optional |
Generate.Nativeobject
Provider-specific data the shared fields do not cover
object
Generate.PredicateAnswerobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "predicate" | Required | |
name | string | Required | |
probability | number | Required |
Generate.PredicateQuestionobject
The probability that a statement is true
| Field | Type | Required | Description |
|---|---|---|---|
type | "predicate" | Required | |
name | string | Required | Unique within the request; echoed on the matching answer |
instructions | string | Required | |
criteria | object | Optional |
Generate.ScoreAnswerobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "score" | Required | |
name | string | Required | |
score | number | Required | Probability-weighted level index, so it can fall between levels |
probabilities | object[] | Required | |
confidence | number | Required |
Generate.ScoreQuestionobject
Place the input on ordered levels, lowest first
| Field | Type | Required | Description |
|---|---|---|---|
type | "score" | Required | |
name | string | Required | Unique within the request; echoed on the matching answer |
instructions | string | Required | |
levels | object[] | Required |
Generate.Usageobject
Token counts, when the provider reports them
| Field | Type | Required | Description |
|---|---|---|---|
input | number | Optional | |
output | number | Optional |
GenerateDecisionsResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Generate.DecisionResult | Required |
GenerateImageResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Generate.ImageResult | Required |
GenerateTextResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Required |
Instruction.Hashstring
string
Instruction.Keystring
string
InstructionEntry.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
key | InstructionEntry.Key | Required | |
value | object | Required | JSON value attached to the session's instructions |
InstructionEntry.Keystring
Instruction entry key (lowercase alphanumerics plus . _ -)
string
InstructionEntry.Snapshotobject[]
object[]
InstructionEntryValueTooLargeErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "InstructionEntryValueTooLargeError" | Required | |
actualBytes | integer | Required | |
maxBytes | integer | Required | |
message | string | Required |
Integration.AttemptEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
attemptID | Integration.AttemptID | Required | |
url | string | Required | |
instructions | string | Required | |
mode | "auto" | "code" | Required | |
paste | true | Optional | |
time | object | Required |
Integration.AttemptIDstring
string
Integration.AttemptStatusobject | object | object | object
object | object | object | object
Integration.CommandAttemptobject
| Field | Type | Required | Description |
|---|---|---|---|
attemptID | Integration.AttemptID | Required | |
time | object | Required |
Integration.CommandAttemptStatusobject | object | object | object
object | object | object | object
Integration.CommandMethodobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Integration.MethodID | Required | |
type | "command" | Required | |
label | string | Required | |
command | string[] | Required |
Integration.EnvMethodobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "env" | Required | |
names | string[] | Required |
Integration.ExternalMethodobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Integration.MethodID | Required | |
type | "external" | Required | |
label | string | Required | |
form | Form.Fields | Optional |
Integration.IDstring
string
Integration.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Integration.ID | Required | |
name | string | Required | |
metadata | object | Optional | |
methods | Integration.Method[] | Required | |
connections | Connection.Info[] | Required |
Integration.KeyMethodobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "key" | Required | |
label | string | Optional | |
form | Form.Fields | Optional |
Integration.MethodIntegration.OAuthMethod | Integration.CommandMethod | Integration.KeyMethod | Integration.ExternalMethod | Integration.EnvMethod
Integration.MethodIDstring
string
Integration.OAuthMethodobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Integration.MethodID | Required | |
type | "oauth" | Required | |
label | string | Required | |
form | Form.Fields | Optional |
IntegrationAttemptNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "IntegrationAttemptNotFoundError" | Required | |
integrationID | string | Required | |
attemptID | string | Required | |
message | string | Required |
IntegrationMethodNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "IntegrationMethodNotFoundError" | Required | |
integrationID | string | Required | |
methodID | string | Required | |
message | string | Required |
IntegrationNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "IntegrationNotFoundError" | Required | |
integrationID | string | Required | |
message | string | Required |
InvalidCursorErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "InvalidCursorError" | Required | |
message | string | Required |
InvalidRequestErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "InvalidRequestError" | Required | |
message | string | Required | |
kind | string | null | Optional | |
field | string | null | Optional |
Job.Imageobject
| Field | Type | Required | Description |
|---|---|---|---|
kind | "image" | Required | |
id | string | Required | |
sessionID | Session.ID | Required | |
status | Job.Status | Required | |
title | string | Optional | |
time | Job.Time | Required | |
path | string | Required | |
model | string | Required |
Job.InfoJob.Shell | Job.Subagent | Job.Image
Job.Kind"shell" | "subagent" | "image"
"shell" | "subagent" | "image"
Job.Shellobject
| Field | Type | Required | Description |
|---|---|---|---|
kind | "shell" | Required | |
id | string | Required | |
sessionID | Session.ID | Required | |
status | Job.Status | Required | |
title | string | Optional | |
time | Job.Time | Required | |
shellID | string | Required | |
command | string | Required |
Job.Status"running" | "completed" | "error" | "cancelled"
"running" | "completed" | "error" | "cancelled"
Job.Subagentobject
| Field | Type | Required | Description |
|---|---|---|---|
kind | "subagent" | Required | |
id | string | Required | |
sessionID | Session.ID | Required | |
status | Job.Status | Required | |
title | string | Optional | |
time | Job.Time | Required | |
childSessionID | Session.ID | Required | |
agent | string | Required | |
description | string | Required |
Job.Timeobject
| Field | Type | Required | Description |
|---|---|---|---|
started | number | Required | Start time in milliseconds since the Unix epoch |
completed | number | Optional |
Location.PublicInfoobject
| Field | Type | Required | Description |
|---|---|---|---|
directory | AbsolutePath | Required | |
project | object | Required |
Location.PublicRefobject
| Field | Type | Required | Description |
|---|---|---|---|
directory | AbsolutePath | Required |
Location.Refobject
| Field | Type | Required | Description |
|---|---|---|---|
directory | AbsolutePath | Required | |
workspaceID | Workspace.ID | Optional |
LocationNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "LocationNotFoundError" | Required | |
location | Location.PublicRef | Required | |
message | string | Required |
Mcp.LocalConfigEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "local" | Required | |
command | string[] | Required | |
cwd | string | Optional | |
environment | object | Optional | |
disabled | boolean | Optional | |
codemode | boolean | Optional | |
timeout | object | Optional | |
protocol | Mcp.Protocol | Optional | |
pool | boolean | Optional |
Mcp.OAuthConfigEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | Optional | |
client_secret | string | Optional | |
scope | string | Optional | |
callback_port | integer | Optional | |
redirect_uri | string | Optional | |
auth_server_metadata_url | string | Optional |
Mcp.Protocol"legacy" | "auto" | "2026-07-28"
MCP protocol negotiation. "legacy" (default) opens with the initialize handshake and speaks protocol revisions up to 2025-11-25. "auto" probes for the 2026-07-28 revision and falls back to legacy when the server does not support it. "2026-07-28" requires that revision and fails otherwise.
"legacy" | "auto" | "2026-07-28"
Mcp.RemoteConfigEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "remote" | Required | |
url | string | Required | |
headers | object | Optional | |
oauth | Mcp.OAuthConfigEncoded | false | Optional | |
disabled | boolean | Optional | |
codemode | boolean | Optional | |
timeout | object | Optional | |
protocol | Mcp.Protocol | Optional | |
pool | boolean | Optional |
Mcp.Resourceobject
| Field | Type | Required | Description |
|---|---|---|---|
server | string | Required | |
name | string | Required | |
uri | string | Required | |
description | string | Optional | |
mimeType | string | Optional |
Mcp.ResourceCatalogobject
| Field | Type | Required | Description |
|---|---|---|---|
resources | Mcp.Resource[] | Required | |
templates | Mcp.ResourceTemplate[] | Required |
Mcp.ResourceTemplateobject
| Field | Type | Required | Description |
|---|---|---|---|
server | string | Required | |
name | string | Required | |
uriTemplate | string | Required | |
description | string | Optional | |
mimeType | string | Optional |
Mcp.Serverobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
status | Mcp.Status.Connected | Mcp.Status.Pending | Mcp.Status.Disabled | Mcp.Status.Failed | Mcp.Status.NeedsAuth | Required | |
title | string | Optional | |
integrationID | Integration.ID | Optional |
Mcp.Status.Connectedobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "connected" | Required |
Mcp.Status.Disabledobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "disabled" | Required |
Mcp.Status.Failedobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "failed" | Required | |
error | string | Required |
Mcp.Status.NeedsAuthobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "needs_auth" | Required | |
error | string | Required |
Mcp.Status.Pendingobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "pending" | Required |
McpServerNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "McpServerNotFoundError" | Required | |
server | string | Required | |
message | string | Required |
MediaHashstring
string
MessageNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "MessageNotFoundError" | Required | |
sessionID | string | Required | |
messageID | string | Required | |
message | string | Required |
Model.CacheFormat"anthropic" | "alibaba"
"anthropic" | "alibaba"
Model.Capabilitiesobject
| Field | Type | Required | Description |
|---|---|---|---|
tools | boolean | Required | |
freeform | Tool.FreeformFormat[] | Optional | |
input | string[] | Required | |
output | string[] | Required | |
temperature | boolean | Optional |
Model.Compatibilityobject
| Field | Type | Required | Description |
|---|---|---|---|
reasoningField | Model.ReasoningField | Optional | |
requireReasoning | boolean | Optional | |
maxTokensField | Model.MaxTokensField | Optional | |
requireFinishReason | boolean | Optional | |
requireAssistantAfterTool | boolean | Optional | |
supportsPromptCacheKey | boolean | Optional | |
streamUsage | boolean | Optional | |
cacheFormat | Model.CacheFormat | Optional | |
supportsThinkingBlockBinding | boolean | Optional | |
supportsEffortUpdates | boolean | Optional | |
mediaInput | Model.MediaInput | Optional |
Model.Costobject
| Field | Type | Required | Description |
|---|---|---|---|
tier | object | Optional | |
input | Money.USDPerMillionTokens | Required | |
output | Money.USDPerMillionTokens | Required | |
cache | object | Required |
Model.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | |
modelID | string | Required | |
providerID | Provider.ID | Required | |
canonical | Provider.ID | Optional | |
type | Model.Type | Optional | |
family | string | Optional | |
name | string | Required | |
compatibility | Model.Compatibility | Optional | |
package | string | Optional | |
settings | Model.Settings | Optional | |
headers | object | Optional | |
body | object | Optional | |
capabilities | Model.Capabilities | Required | |
variants | Model.Variant[] | Required | |
time | object | Required | |
cost | Model.Cost[] | Required | |
status | "alpha" | "beta" | "deprecated" | "active" | Required | |
enabled | boolean | Required | |
limit | object | Required |
Model.MaxTokensField"max_completion_tokens" | "max_tokens"
"max_completion_tokens" | "max_tokens"
Model.MediaInput"assets" | "state" | "root"
"assets" | "state" | "root"
Model.ReasoningField"reasoning" | "reasoning_content" | "reasoning_text" | string
"reasoning" | "reasoning_content" | "reasoning_text" | string
Model.Refobject
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | |
providerID | Provider.ID | Required | |
variant | string | Optional |
Model.Settingsobject
| Field | Type | Required | Description |
|---|---|---|---|
compaction | Provider.Compaction | Optional | |
cache | Provider.Cache | Optional | |
encoding | Provider.Encoding | Optional |
Model.Type"chat" | "decision" | "image" | string
"chat" | "decision" | "image" | string
Model.Variantobject
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | |
settings | Model.VariantSettings | Optional | |
headers | object | Optional | |
body | object | Optional |
Model.VariantSettingsobject
| Field | Type | Required | Description |
|---|---|---|---|
compaction | Provider.Compaction | Optional | |
encoding | Provider.Encoding | Optional |
ModelNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ModelNotFoundError" | Required | |
providerID | string | Required | |
modelID | string | Required | |
message | string | Required |
Money.USDnumber
number
Money.USDPerMillionTokensnumber
number
PairingCodeobject
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Required | |
expires_in | integer | Required |
PairingSessionobject
| Field | Type | Required | Description |
|---|---|---|---|
token | string | Required |
Permission.Effect"allow" | "deny" | "ask"
"allow" | "deny" | "ask"
Permission.IDstring
string
Permission.Reply"once" | "always" | "reject"
"once" | "always" | "reject"
Permission.Requestobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Permission.ID | Required | |
sessionID | Session.ID | Required | |
action | string | Required | |
resources | string[] | Required | |
save | string[] | Optional | |
metadata | object | Optional | |
source | Permission.Source | Optional | |
message | string | Optional |
Permission.Ruleobject
| Field | Type | Required | Description |
|---|---|---|---|
action | string | Required | |
resource | string | Required | |
effect | Permission.Effect | Required |
Permission.RulesetPermission.Rule[]
Permission.Sourceobject
object
PermissionNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "PermissionNotFoundError" | Required | |
requestID | string | Required | |
message | string | Required |
PermissionSaved.IDstring
string
PermissionSaved.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | PermissionSaved.ID | Required | |
projectID | Project.ID | Required | |
action | string | Required | |
resource | string | Required | |
time | object | Required |
PermissionSavedNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "PermissionSavedNotFoundError" | Required | |
id | string | Required | |
message | string | Required |
PersistentPty.CreateInputobject
| Field | Type | Required | Description |
|---|---|---|---|
command | string | Optional | |
args | string[] | Required | |
cwd | string | Optional | |
title | string | Required | |
env | object | Required | |
size | object | Optional |
PersistentPty.Handoffobject
| Field | Type | Required | Description |
|---|---|---|---|
directory | string | Required | |
instanceID | string | Required | |
ticket | string | Required | |
expiresAt | number | "Infinity" | "-Infinity" | "NaN" | Required |
PersistentPty.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Pty.ID | Required | |
title | string | Required | |
command | string | Required | |
args | string[] | Required | |
cwd | string | Required | |
status | "running" | "exited" | Required | |
pid | integer | Required | |
exitCode | integer | Optional | |
sessionID | Session.ID | Required | |
userTitle | string | null | Required | |
foregroundProcess | string | null | Required | |
size | object | Required | |
output | object | Required |
PersistentPty.ReadResultobject
| Field | Type | Required | Description |
|---|---|---|---|
ptyID | Pty.ID | Required | |
title | string | Required | |
cwd | string | Required | |
foregroundProcess | string | null | Required | |
screen | object | Required |
PersistentPty.Snapshotobject
| Field | Type | Required | Description |
|---|---|---|---|
info | PersistentPty.Info | Required | |
text | string | Required | |
checkpoint | string<byte> | Required | |
cursor | object | Required |
PersistentPty.UpdateInputobject
| Field | Type | Required | Description |
|---|---|---|---|
attachmentID | string | Optional | |
size | object | Optional | |
title | string | null | Optional |
Plugin.Featuresobject
| Field | Type | Required | Description |
|---|---|---|---|
server | true | Optional | |
tui | true | Optional | |
rpc | true | Optional | |
gui | true | Optional |
Plugin.GuiBundleobject
| Field | Type | Required | Description |
|---|---|---|---|
code | string | Required | |
revision | string | Required | |
options | object | Required |
Plugin.IDstring
string
Plugin.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Plugin.ID | Optional | |
source | Plugin.Source | Required | |
features | Plugin.Features | Required | |
state | Plugin.State | Required |
Plugin.Sourceobject | object | object | object
object | object | object | object
Plugin.Stateobject | object
object | object
PluginNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "PluginNotFoundError" | Required | |
pluginID | string | Required | |
message | string | Required |
Projectobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Project.ID | Required | |
canonical | AbsolutePath | Required | |
vcs | Project.Vcs | Optional | |
name | string | Optional | |
icon | Project.Icon | Optional | |
commands | Project.Commands | Optional | |
time | Project.Time | Required | |
sandboxes | string[] | Required |
Project.Commandsobject
| Field | Type | Required | Description |
|---|---|---|---|
start | string | Optional | Startup script to run when creating a new workspace (worktree) |
Project.IDstring
string
Project.Iconobject
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Optional | |
override | string | Optional | |
color | string | Optional |
Project.Timeobject
| Field | Type | Required | Description |
|---|---|---|---|
created | integer | Required | |
updated | integer | Required | |
active | integer | Required | |
archived | integer | Optional |
Project.Vcsstring
string
ProjectNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ProjectNotFoundError" | Required | |
projectID | string | Required | |
message | string | Required |
Prompt.AgentAttachmentobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
mention | Prompt.Mention | Optional |
Prompt.Base64string
string
Prompt.FileAttachmentobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Prompt.Base64 | Required | |
mime | string | Required | |
source | Prompt.FileSource | Required | |
name | string | Optional | |
description | string | Optional | |
mention | Prompt.Mention | Optional |
Prompt.FileSourceobject | object
object | object
Prompt.Mentionobject
| Field | Type | Required | Description |
|---|---|---|---|
start | number | Required | |
end | number | Required | |
text | string | Required |
Prompt.SkillAttachmentobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Skill.ID | Required | |
name | Skill.Name | Required | |
text | string | Optional | |
mention | Prompt.Mention | Optional |
PromptInput.FileAttachmentobject
| Field | Type | Required | Description |
|---|---|---|---|
uri | string | Required | |
source | Prompt.FileSource | Optional | |
name | string | Optional | |
description | string | Optional | |
mention | Prompt.Mention | Optional |
PromptInput.SkillAttachmentobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Skill.ID | Required | |
mention | Prompt.Mention | Optional |
Provider.Cacheobject
| Field | Type | Required | Description |
|---|---|---|---|
ttl | Provider.CacheTTL | Optional | |
warming | Provider.CacheWarming | Optional |
Provider.CacheTTLstring
string
Provider.CacheWarmingboolean | object
boolean | object
Provider.Compactionobject | object
object | object
Provider.Compatibilityobject
| Field | Type | Required | Description |
|---|---|---|---|
reasoningField | Model.ReasoningField | Optional | |
requireReasoning | boolean | Optional | |
maxTokensField | Model.MaxTokensField | Optional | |
requireFinishReason | boolean | Optional | |
requireAssistantAfterTool | boolean | Optional | |
supportsPromptCacheKey | boolean | Optional | |
streamUsage | boolean | Optional | |
cacheFormat | Model.CacheFormat | Optional | |
mediaInput | Model.MediaInput | Optional |
Provider.Encoding"zstd" | "gzip" | "none"
"zstd" | "gzip" | "none"
Provider.IDstring
string
Provider.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Provider.ID | Required | |
canonical | Provider.ID | Optional | |
integrationID | Integration.ID | Optional | |
name | string | Required | |
activation | "auto" | "enabled" | "disabled" | Required | |
package | string | Required | |
compatibility | Provider.Compatibility | Optional | |
settings | Provider.Settings | Optional | |
headers | object | Optional | |
body | object | Optional |
Provider.Requestobject
| Field | Type | Required | Description |
|---|---|---|---|
settings | Provider.Settings | Required | |
headers | object | Required | |
body | object | Required |
Provider.Settingsobject
| Field | Type | Required | Description |
|---|---|---|---|
timeout | number | false | Optional | |
headerTimeout | number | false | Optional | |
chunkTimeout | number | false | Optional | |
compaction | Provider.Compaction | Optional | |
cache | Provider.Cache | Optional | |
transport | Provider.Transport | Optional | |
encoding | Provider.Encoding | Optional |
Provider.Transport"http" | "websocket"
"http" | "websocket"
ProviderNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ProviderNotFoundError" | Required | |
providerID | string | Required | |
message | string | Required |
ProviderRequestErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ProviderRequestError" | Required | |
providerID | string | Required | |
reason | "authentication" | "rate_limit" | "content_filter" | "invalid_request" | "overloaded" | "provider" | Required | |
message | string | Required | |
status | integer | null | Optional | |
retryAfterMs | integer | null | Optional |
Ptyobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Pty.ID | Required | |
title | string | Required | |
command | string | Required | |
args | string[] | Required | |
cwd | string | Required | |
status | "running" | "exited" | Required | |
pid | integer | Required | |
exitCode | integer | Optional |
Pty.IDstring
string
PtyFeatureUnsupportedErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "PtyFeatureUnsupportedError" | Required | |
feature | string | Required | |
message | string | Required |
PtyNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "PtyNotFoundError" | Required | |
ptyID | string | Required | |
message | string | Required |
PtyTicket.ConnectTokenobject
| Field | Type | Required | Description |
|---|---|---|---|
ticket | string | Required | |
expires_in | integer | Required |
Reference.GitSourceobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "git" | Required | |
repository | string | Required | |
branch | string | Optional |
Reference.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
path | AbsolutePath | Required | |
description | string | Optional | |
hidden | boolean | Optional | |
source | Reference.Source | Required |
Reference.LocalSourceobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "local" | Required | |
path | AbsolutePath | Required |
Reference.SourceReference.LocalSource | Reference.GitSource
RelativePathstring
string
Rpc.Inputobject
| Field | Type | Required | Description |
|---|---|---|---|
input | object | Optional |
Rpc.Outputobject
| Field | Type | Required | Description |
|---|---|---|---|
output | object | Optional |
RpcErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "RpcError" | Required | |
type | string | Required | |
message | string | Required | |
data | object | null | Optional |
RpcInternalErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "RpcInternalError" | Required | |
type | "rpc.internal" | "rpc.invalid_output" | Required | |
message | string | Required | |
data | object | null | Optional |
Schedule.ActionSchedule.Action.Prompt
Schedule.Action.Promptobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "prompt" | Required | |
prompt | string | Required |
Schedule.ConditionSchedule.Condition.Shell | Schedule.Condition.Code
Schedule.Condition.Codeobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "code" | Required | |
code | string | Required |
Schedule.Condition.Shellobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "shell" | Required | |
run | string | Required | |
is | string | Optional | |
matches | string | Optional | |
changes | boolean | Optional |
Schedule.ConditionInputobject | object
object | object
Schedule.CreatePayloadobject
| Field | Type | Required | Description |
|---|---|---|---|
sessionID | Session.ID | Required | |
name | string | Optional | |
when | Schedule.WhenInput | Optional | |
if | Schedule.ConditionInput | Optional | |
until | Schedule.ConditionInput | Optional | |
ends | Schedule.Ends | Optional | |
prompt | string | Required | The message the Session receives when the schedule wakes. |
Schedule.Durationstring
A duration such as "90 seconds", "5 minutes" or "2 hours".
string
Schedule.Endsobject
| Field | Type | Required | Description |
|---|---|---|---|
after | Schedule.Duration | Optional | |
at | string | Optional | |
times | integer | Optional |
Schedule.IDstring
string
Schedule.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Schedule.ID | Required | |
sessionID | Session.ID | Optional | |
name | string | Optional | |
when | Schedule.When | Required | |
tz | string | Required | |
if | Schedule.Condition | Optional | |
until | Schedule.Condition | Optional | |
action | Schedule.Action | Required | |
status | Schedule.Status | Required | |
nextDueAt | number | Optional | |
endsAt | number | Optional | |
remainingRuns | integer | Optional | |
runCount | integer | Required | |
lastFiredAt | number | Optional | |
lastOutcome | Schedule.Outcome | Optional | |
lastOutput | string | Optional | |
time | object | Required |
Schedule.Outcome"fired" | "late" | "checked" | "expired" | "skipped" | "disabled" | "failed"
"fired" | "late" | "checked" | "expired" | "skipped" | "disabled" | "failed"
Schedule.Status"active" | "paused" | "done"
"active" | "paused" | "done"
Schedule.WhenSchedule.When.In | Schedule.When.At | Schedule.When.Every | Schedule.When.Cron
Schedule.When.Atobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "at" | Required | |
at | string | Required | |
tz | string | Optional |
Schedule.When.Cronobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "cron" | Required | |
cron | string | Required | |
tz | string | Optional |
Schedule.When.Everyobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "every" | Required | |
every | Schedule.Duration | Required | |
tz | string | Optional |
Schedule.When.Inobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "in" | Required | |
in | Schedule.Duration | Required | |
tz | string | Optional |
Schedule.WhenInputobject | object | object | object
object | object | object | object
ScheduleNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ScheduleNotFoundError" | Required | |
scheduleID | string | Required | |
message | string | Required |
ServerInfoobject
| Field | Type | Required | Description |
|---|---|---|---|
version | string | Required | |
pid | integer | Required | |
hostname | string | null | Optional | |
urls | string[] | Required | |
paths | object | Required | |
capabilities | object | null | Optional |
ServiceUnavailableErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ServiceUnavailableError" | Required | |
message | string | Required | |
service | string | null | Optional |
Session.Event.Durablesession.created | session.agent.selected | session.model.selected | session.moved | session.renamed | session.metadata.updated | session.permissions | session.viewed | session.archived | session.unarchived | session.deleted | session.forked | session.inbox.delivered | session.inbox.enqueued | session.inbox.cancelled | session.inbox.delivery.changed | session.execution.started | session.execution.succeeded | session.execution.failed | session.execution.interrupted | session.instructions.updated | session.synthetic | session.skill.activated | session.shell.started | session.shell.ended | session.step.started | session.step.first-token | session.step.streamed | session.step.ended | session.step.failed | session.text.started | session.text.ended | session.reasoning.started | session.reasoning.ended | session.tool.input.started | session.tool.input.ended | session.tool.called | session.tool.success | session.tool.failed | session.retry.scheduled | session.compaction.started | session.compaction.ended | session.compaction.failed | session.revert.staged | session.revert.cleared | session.revert.committed | session.usage.recorded | session.message.content.updated
session.created | session.agent.selected | session.model.selected | session.moved | session.renamed | session.metadata.updated | session.permissions | session.viewed | session.archived | session.unarchived | session.deleted | session.forked | session.inbox.delivered | session.inbox.enqueued | session.inbox.cancelled | session.inbox.delivery.changed | session.execution.started | session.execution.succeeded | session.execution.failed | session.execution.interrupted | session.instructions.updated | session.synthetic | session.skill.activated | session.shell.started | session.shell.ended | session.step.started | session.step.first-token | session.step.streamed | session.step.ended | session.step.failed | session.text.started | session.text.ended | session.reasoning.started | session.reasoning.ended | session.tool.input.started | session.tool.input.ended | session.tool.called | session.tool.success | session.tool.failed | session.retry.scheduled | session.compaction.started | session.compaction.ended | session.compaction.failed | session.revert.staged | session.revert.cleared | session.revert.committed | session.usage.recorded | session.message.content.updated
Session.ForkBoundaryobject | object
object | object
Session.IDstring
string
Session.Inbox.Compactionobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
sessionID | Session.ID | Required | |
time | object | Required | |
type | "compaction" | Required | |
payload | Session.Inbox.CompactionPayload | Required | |
delivery | Session.Inbox.Delivery | Required |
Session.Inbox.CompactionPayloadobject
object
Session.Inbox.Delivery"steer" | "queue"
"steer" | "queue"
Session.Inbox.InfoSession.Inbox.User | Session.Inbox.Synthetic | Session.Inbox.Compaction | Session.Inbox.Move
Session.Inbox.Itemobject | object | object | object
object | object | object | object
Session.Inbox.Moveobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
sessionID | Session.ID | Required | |
time | object | Required | |
type | "move" | Required | |
delivery | Session.Inbox.Delivery | Required | |
payload | Session.Inbox.MovePayload | Required |
Session.Inbox.MovePayloadobject
| Field | Type | Required | Description |
|---|---|---|---|
projectID | Project.ID | Required | |
subpath | RelativePath | Optional | |
location | Location.PublicRef | Required |
Session.Inbox.MovePayload_1object
| Field | Type | Required | Description |
|---|---|---|---|
location | Location.Ref | Required | |
projectID | Project.ID | Required | |
subpath | RelativePath | Optional |
Session.Inbox.Syntheticobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
sessionID | Session.ID | Required | |
time | object | Required | |
type | "synthetic" | Required | |
payload | Session.Inbox.SyntheticPayload | Required | |
delivery | Session.Inbox.Delivery | Required |
Session.Inbox.SyntheticPayloadobject
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Required | |
description | string | Optional | |
metadata | object | Optional |
Session.Inbox.Userobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
sessionID | Session.ID | Required | |
time | object | Required | |
type | "user" | Required | |
payload | Session.Inbox.UserPayload | Required | |
delivery | Session.Inbox.Delivery | Required |
Session.Inbox.UserPayloadobject
| Field | Type | Required | Description |
|---|---|---|---|
text | string | Required | |
files | Prompt.FileAttachment[] | Optional | |
agents | Prompt.AgentAttachment[] | Optional | |
skills | Prompt.SkillAttachment[] | Optional | |
metadata | object | Optional |
Session.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.ID | Required | |
parentID | Session.ID | Optional | |
fork | object | Optional | |
projectID | Project.ID | Required | |
agent | Agent.ID | Optional | |
model | Model.Ref | Optional | |
cost | Money.USD | Required | |
tokens | TokenUsage.Info | Required | |
outcome | "succeeded" | "failed" | "interrupted" | Optional | |
time | object | Required | |
title | string | Optional | |
subpath | RelativePath | Optional | |
metadata | Session.Metadata | Optional | |
permissions | Permission.Ruleset | Optional | |
revert | Session.Revert | Optional | |
location | Location.PublicRef | Required |
Session.Message.AgentSelectedobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "agent-switched" | Required | |
agent | Agent.ID | Required | |
previous | Agent.ID | Optional |
Session.Message.Assistantobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "assistant" | Required | |
agent | Agent.ID | Required | |
model | Model.Ref | Required | |
content | Session.Message.Assistant.Text | Session.Message.Assistant.Reasoning | Session.Message.Assistant.Tool[] | Required | |
snapshot | object | Optional | |
finish | "stop" | "length" | "tool-calls" | "content-filter" | "error" | "unknown" | Optional | |
rawFinish | string | Optional | |
native | Session.Message.Native | Optional | |
cost | Money.USD | Optional | |
tokens | TokenUsage.Info | Optional | |
error | Session.StructuredError | Optional | |
retry | Session.Message.Assistant.Retry | Optional |
Session.Message.Assistant.Reasoningobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "reasoning" | Required | |
text | string | Required | |
native | Session.Message.Native | Optional | |
time | object | Optional |
Session.Message.Assistant.Retryobject
| Field | Type | Required | Description |
|---|---|---|---|
attempt | integer | Required | |
at | number | Required | |
error | Session.StructuredError | Required |
Session.Message.Assistant.Textobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "text" | Required | |
text | string | Required | |
native | Session.Message.Native | Optional |
Session.Message.Assistant.Toolobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "tool" | Required | |
id | string | Required | |
name | string | Required | |
executed | boolean | Optional | |
native | Session.Message.Native | Optional | |
state | Session.Message.ToolState.Streaming | Session.Message.ToolState.Running | Session.Message.ToolState.Completed | Session.Message.ToolState.Error | Required | |
time | object | Required |
Session.Message.AssistantContent.EncodedSession.Message.Assistant.Text | Session.Message.Assistant.Reasoning | Session.Message.Assistant.Tool
Session.Message.CompactionSession.Message.Compaction.Running | Session.Message.Compaction.Completed | Session.Message.Compaction.Failed
Session.Message.Compaction.Completedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "compaction" | Required | |
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
status | "completed" | Required | |
reason | "auto" | "manual" | Required | |
model | Model.Ref | Optional | |
native | Session.Message.Native | Optional | |
summary | string | Required | |
cost | Money.USD | Optional | |
tokens | TokenUsage.Info | Optional |
Session.Message.Compaction.Failedobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "compaction" | Required | |
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
status | "failed" | Required | |
reason | "auto" | "manual" | Required | |
error | Session.StructuredError | Required | |
cost | Money.USD | Optional | |
tokens | TokenUsage.Info | Optional |
Session.Message.Compaction.Runningobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "compaction" | Required | |
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
status | "running" | Required | |
reason | "auto" | "manual" | Required | |
summary | string | Required |
Session.Message.IDstring
string
Session.Message.Idleobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "idle" | Required | |
outcome | "succeeded" | "failed" | "interrupted" | Required | |
error | Session.StructuredError | Optional |
Session.Message.InfoSession.Message.AgentSelected | Session.Message.ModelSelected | Session.Message.LocationSwitched | Session.Message.User | Session.Message.Synthetic | Session.Message.System | Session.Message.Skill | Session.Message.Shell | Session.Message.Assistant | Session.Message.Compaction | Session.Message.Idle
Session.Message.AgentSelected | Session.Message.ModelSelected | Session.Message.LocationSwitched | Session.Message.User | Session.Message.Synthetic | Session.Message.System | Session.Message.Skill | Session.Message.Shell | Session.Message.Assistant | Session.Message.Compaction | Session.Message.Idle
Session.Message.LocationSwitchedobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "location-switched" | Required | |
projectID | Project.ID | Optional | |
subpath | RelativePath | Optional | |
location | Location.PublicRef | Required | |
previous | object | null | Optional |
Session.Message.ModelSelectedobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "model-switched" | Required | |
model | Model.Ref | Required | |
previous | Model.Ref | Optional |
Session.Message.Nativeobject
object
Session.Message.Shellobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "shell" | Required | |
shellID | Shell.ID | Required | |
command | string | Required | |
status | "running" | "exited" | "timeout" | "killed" | Required | |
exit | number | "Infinity" | "-Infinity" | "NaN" | Optional | |
output | object | Optional |
Session.Message.Skillobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "skill" | Required | |
skill | Skill.ID | Required | |
name | Skill.Name | Required | |
text | string | Required |
Session.Message.Syntheticobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
text | string | Required | |
description | string | Optional | |
type | "synthetic" | Required |
Session.Message.Systemobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
type | "system" | Required | |
text | string | Required | |
description | string | Optional |
Session.Message.ToolState.Completedobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "completed" | Required | |
input | object | Required | |
content | Tool.Content[] | Required | |
metadata | object | Optional |
Session.Message.ToolState.Errorobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "error" | Required | |
input | object | Required | |
error | Session.StructuredError | Required | |
content | Tool.Content[] | Optional | |
metadata | object | Optional |
Session.Message.ToolState.Runningobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "running" | Required | |
input | object | Required | |
metadata | object | Required |
Session.Message.ToolState.Streamingobject
| Field | Type | Required | Description |
|---|---|---|---|
status | "streaming" | Required | |
input | string | Required |
Session.Message.Userobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Session.Message.ID | Required | |
metadata | object | Optional | |
time | object | Required | |
text | string | Required | |
files | Prompt.FileAttachment[] | Optional | |
agents | Prompt.AgentAttachment[] | Optional | |
skills | Prompt.SkillAttachment[] | Optional | |
type | "user" | Required |
Session.Metadataobject
object
Session.Revertobject
| Field | Type | Required | Description |
|---|---|---|---|
messageID | Session.Message.ID | Required | |
partID | string | Optional | |
snapshot | Snapshot.ID | Optional | |
files | FileDiff.Info[] | Optional |
Session.StructuredErrorobject
| Field | Type | Required | Description |
|---|---|---|---|
type | string | Required | |
message | string | Required | |
status | integer | Optional | |
response | object | Optional | |
retryAfterMs | integer | Optional |
SessionActiveobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "running" | Required |
SessionBusyErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "SessionBusyError" | Required | |
sessionID | string | Required | |
message | string | Required |
SessionGenerateResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | object | Required |
SessionInterruptResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
interrupted | boolean | Required | Whether an active execution owned by this OpenCode process was interrupted. |
SessionLogItemSession.Event.Durable | EventLog.Synced
SessionLogItemEncodedstring
string
SessionMessagesResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Session.Message.Info[] | Required | |
cursor | object | Required |
SessionNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "SessionNotFoundError" | Required | |
sessionID | string | Required | |
message | string | Required |
SessionStats.Activityobject
| Field | Type | Required | Description |
|---|---|---|---|
date | string | Required | |
steps | integer | Required |
SessionStats.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
range | object | Required | |
sessions | integer | Required | |
subagents | integer | Required | |
prompts | integer | Required | |
steps | integer | Required | |
tokens | TokenUsage.Info | Required | |
cost | Money.USD | Required | |
tools | SessionStats.Tools | Required | |
activeDays | integer | Required | |
streak | integer | Required | |
activity | SessionStats.Activity[] | Required | |
models | SessionStats.ModelUsage[] | Required |
SessionStats.ModelUsageobject
| Field | Type | Required | Description |
|---|---|---|---|
model | Model.Ref | Required | |
steps | integer | Required | |
tokens | TokenUsage.Info | Required | |
cost | Money.USD | Required |
SessionStats.ToolTotalsobject
| Field | Type | Required | Description |
|---|---|---|---|
calls | integer | Required | |
succeeded | integer | Required | |
failed | integer | Required | |
unfinished | integer | Required |
SessionStats.ToolUsageobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
calls | integer | Required | |
succeeded | integer | Required | |
failed | integer | Required | |
unfinished | integer | Required | |
durationP50 | number | Optional |
SessionStats.Toolsobject | object | object
object | object | object
SessionStatusobject | object | object
object | object | object
SessionStatusUpdatedobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Event.ID | Required | |
created | number | Required | |
metadata | object | Optional | |
type | "session.status" | Required | |
location | Location.Ref | Optional | |
data | object | Required |
SessionTransfer.Dataobject
| Field | Type | Required | Description |
|---|---|---|---|
info | Session.Info | Required | |
messages | Session.Message.Info[] | Required |
SessionsCursorstring
Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response.
string
SessionsResponseobject
| Field | Type | Required | Description |
|---|---|---|---|
data | Session.Info[] | Required | |
cursor | object | Required |
Shell.IDstring
string
Shell.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Shell.ID | Required | |
status | "running" | "exited" | "timeout" | "killed" | Required | |
command | string | Required | |
cwd | string | Required | |
shell | string | Required | |
file | string | Required | |
pid | integer | Optional | |
exit | number | Optional | |
signal | string | Optional | |
metadata | object | Required | |
time | object | Required |
ShellNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "ShellNotFoundError" | Required | |
id | string | Required | |
message | string | Required |
Skill.IDstring
string
Skill.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Skill.ID | Required | |
name | Skill.Name | Required | |
description | string | Optional | |
autoinvoke | boolean | Optional | |
path | AbsolutePath | Required | |
content | string | Required |
Skill.Namestring
string
SkillNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "SkillNotFoundError" | Required | |
skill | Skill.ID | Required | |
message | string | Required |
Snapshot.IDstring
string
TokenUsage.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
input | number | Required | |
output | number | Required | |
reasoning | number | Required | |
cache | object | Required |
Tool.ContentTool.TextContent | Tool.FileContent
Tool.FileContentobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "file" | Required | |
uri | string | Required | |
mime | string | Required | |
name | string | null | Optional |
Tool.FreeformFormat"text" | "regex" | "lark"
"text" | "regex" | "lark"
Tool.TextContentobject
| Field | Type | Required | Description |
|---|---|---|---|
type | "text" | Required | |
text | string | Required |
UnauthorizedErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "UnauthorizedError" | Required | |
message | string | Required |
UnknownErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "UnknownError" | Required | |
message | string | Required | |
ref | string | null | Optional |
UnsupportedModelErrorEncodedobject
| Field | Type | Required | Description |
|---|---|---|---|
_tag | "UnsupportedModelError" | Required | |
providerID | string | Required | |
modelID | string | Required | |
capability | string | Required | |
message | string | Required |
UsageLimits.Budgetobject
| Field | Type | Required | Description |
|---|---|---|---|
id | string | Required | |
limit | Money.USD | Required | |
spent | Money.USD | Required | |
scope | "each" | "combined" | Required | |
per | "set" | "model" | Required | |
coverage | "all" | "models" | Required | |
models | UsageLimits.BudgetModel[] | Required | |
vendors | string[] | Required | |
inputPriceAtLeast | Money.USDPerMillionTokens | Optional | |
picked | boolean | Required | |
shared | boolean | Required | |
resetsAt | number | Required | Milliseconds since the Unix epoch |
UsageLimits.BudgetModelobject
| Field | Type | Required | Description |
|---|---|---|---|
providerID | Provider.ID | Required | |
modelID | string | Required | |
name | string | Required | |
spent | Money.USD | Optional |
UsageLimits.Goobject
| Field | Type | Required | Description |
|---|---|---|---|
rolling | UsageLimits.Meter | Required | |
weekly | UsageLimits.Meter | Required | |
monthly | UsageLimits.Meter | Required |
UsageLimits.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
workspace | object | Required | |
go | UsageLimits.Go | Optional | |
budgets | UsageLimits.Budget[] | Required |
UsageLimits.Meterobject
| Field | Type | Required | Description |
|---|---|---|---|
percent | number | Required | |
limited | boolean | Required | |
resetsAt | number | Required | Milliseconds since the Unix epoch |
V2Eventlocation.shutdown | models-dev.refreshed | credential.updated | credential.switched | integration.updated | provider.updated | model.updated | agent.updated | session.created | session.agent.selected | session.model.selected | session.moved | session.renamed | session.metadata.updated | session.permissions | session.viewed | session.archived | session.unarchived | session.usage.updated | session.deleted | session.forked | session.inbox.delivered | session.inbox.enqueued | session.inbox.cancelled | session.inbox.delivery.changed | session.execution.started | session.execution.succeeded | session.execution.failed | session.execution.interrupted | session.instructions.updated | session.synthetic | session.skill.activated | session.shell.started | session.shell.ended | session.step.started | session.step.first-token | session.step.streamed | session.step.ended | session.step.failed | session.text.started | session.text.delta | session.text.ended | session.reasoning.started | session.reasoning.delta | session.reasoning.ended | session.tool.input.started | session.tool.input.delta | session.tool.input.ended | session.tool.called | session.tool.progress | session.tool.success | session.tool.failed | session.retry.scheduled | session.compaction.started | session.compaction.delta | session.compaction.ended | session.compaction.failed | session.revert.staged | session.revert.cleared | session.revert.committed | filesystem.changed | reference.updated | permission.asked | permission.replied | plugin.updated | project.updated | worktree.updated | worktree.resolved | command.updated | config.updated | skill.updated | pty.created | pty.updated | pty.exited | pty.deleted | persistent-pty.added | persistent-pty.removed | persistent-pty.updated | shell.created | shell.exited | shell.deleted | form.created | form.replied | form.cancelled | websearch.updated | artifact.updated | SessionStatusUpdated | session.idle | tui.prompt.append | tui.command.execute | tui.toast.show | tui.session.select | installation.updated | installation.update-available | vcs.branch.updated | mcp.status.changed | mcp.resources.changed | experimental.mcp.event | V2Event.rpc | V2Event.server.connected
location.shutdown | models-dev.refreshed | credential.updated | credential.switched | integration.updated | provider.updated | model.updated | agent.updated | session.created | session.agent.selected | session.model.selected | session.moved | session.renamed | session.metadata.updated | session.permissions | session.viewed | session.archived | session.unarchived | session.usage.updated | session.deleted | session.forked | session.inbox.delivered | session.inbox.enqueued | session.inbox.cancelled | session.inbox.delivery.changed | session.execution.started | session.execution.succeeded | session.execution.failed | session.execution.interrupted | session.instructions.updated | session.synthetic | session.skill.activated | session.shell.started | session.shell.ended | session.step.started | session.step.first-token | session.step.streamed | session.step.ended | session.step.failed | session.text.started | session.text.delta | session.text.ended | session.reasoning.started | session.reasoning.delta | session.reasoning.ended | session.tool.input.started | session.tool.input.delta | session.tool.input.ended | session.tool.called | session.tool.progress | session.tool.success | session.tool.failed | session.retry.scheduled | session.compaction.started | session.compaction.delta | session.compaction.ended | session.compaction.failed | session.revert.staged | session.revert.cleared | session.revert.committed | filesystem.changed | reference.updated | permission.asked | permission.replied | plugin.updated | project.updated | worktree.updated | worktree.resolved | command.updated | config.updated | skill.updated | pty.created | pty.updated | pty.exited | pty.deleted | persistent-pty.added | persistent-pty.removed | persistent-pty.updated | shell.created | shell.exited | shell.deleted | form.created | form.replied | form.cancelled | websearch.updated | artifact.updated | SessionStatusUpdated | session.idle | tui.prompt.append | tui.command.execute | tui.toast.show | tui.session.select | installation.updated | installation.update-available | vcs.branch.updated | mcp.status.changed | mcp.resources.changed | experimental.mcp.event | V2Event.rpc | V2Event.server.connected
V2Event.rpcobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Event.ID | Required | |
created | number | Required | |
metadata | object | null | Optional | |
type | string | Required | |
location | Location.PublicRef | Required | |
data | object | Required |
V2Event.server.connectedobject
| Field | Type | Required | Description |
|---|---|---|---|
id | Event.ID | Required | |
metadata | object | null | Optional | |
location | Location.PublicRef | null | Optional | |
type | "server.connected" | Required | |
data | object | Required |
V2EventEncodedstring
string
Vcs.Baseobject
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
ref | string | Required | |
source | "reflog" | "default" | Required |
Vcs.Branchobject
| Field | Type | Required | Description |
|---|---|---|---|
current | string | Optional | |
default | string | Optional |
Vcs.BranchListstring[]
string[]
Vcs.FileStatusobject
| Field | Type | Required | Description |
|---|---|---|---|
file | string | Required | |
additions | integer | Required | |
deletions | integer | Required | |
status | "added" | "deleted" | "modified" | Required |
Vcs.Infoobject
| Field | Type | Required | Description |
|---|---|---|---|
provider | string | Optional | |
branch | Vcs.Branch | Required |
Vcs.Mode"working" | "branch" | "committed"
"working" | "branch" | "committed"
Vcs.Untracked"files" | "folders"
"files" | "folders"