GeezerVison is showing opencode.ai (truncated) — API | OpenCode 此页面尚未翻译,当前显示英文版本。 APIExperimental HttpApi surface for selected instance routes. The reference covers 195 operations and 558 schemas from the OpenAPI 3.1.0 document.
get/api/infoGet server infoReturn the server identity, connection URLs, paths, and readiness status. Operation ID server.info post/api/pairCreate pairing codeCreate a short-lived, single-use code for a /auth/connect/:code pairing link. Operation ID server.pair get/auth/connect/{code}Redeem pairing codeRedeem 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 | |
Operation ID server.connect
get/api/locationGet locationResolve the requested location or the server default location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID location.get post/api/location/reloadReload configurationShut 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. Operation ID location.reload
get/api/agentList agentsRetrieve currently registered agents. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID agent.list get/api/agent/{agentID}Get agentRetrieve a single currently registered agent. | Parameter | In | Type | Required | Description |
|---|
agentID | path | Agent.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID agent.get
Experimental plugin routes. get/api/pluginList pluginsRetrieve enabled server plugins and their current status. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID plugin.list get/api/plugin/guiRead plugin GUI bundleRead 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | id | query | Plugin.ID | Required | |
Operation ID plugin.gui post/api/plugin/checkCheck plugin updatesCheck one or all package plugins for available updates. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID plugin.check post/api/plugin/updateUpdate pluginsUpdate 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID plugin.update
Experimental session routes. get/api/sessionList sessionsRetrieve 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 | Maximum number of sessions to return. Defaults to the newest 50 sessions. | order | query | "asc" | "desc" | Optional | Session order for the first page. Use desc for newest first or asc for oldest first. | search | query | string | Optional | Only sessions whose title contains this text, ignoring case. % and _ act as wildcards. | parentID | query | Session.ID | "null" | Optional | Filter by parent session. Use null to return only root sessions. | archived | query | "true" | "false" | Optional | Filter by archive state. Use true to return only archived sessions or false to exclude them. Omit to include both. | directory | query | AbsolutePath | Optional | Only sessions whose directory is exactly this absolute path. | project | query | Project.ID | Optional | | subpath | query | RelativePath | Optional | With project, only sessions at this path relative to the project directory. | cursor | query | SessionsCursor | Optional | Opaque cursor from a previous page's cursor.next or cursor.previous. It carries that page's filters and order, so other filters are ignored. |
Operation ID session.list post/api/sessionCreate sessionCreate 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 | |
Operation ID session.create get/api/experimental/session/statsGet session statisticsAggregate local session activity, usage, and tool reliability for a time range. | Parameter | In | Type | Required | Description |
|---|
from | query | string | Optional | Start of the range in Unix milliseconds, inclusive. Defaults to the earliest recorded message. | to | query | string | Optional | End of the range in Unix milliseconds, exclusive. Defaults to now. | project | query | Project.ID | Optional | | timezone | query | string | Optional | IANA time zone used to group activity by day. Defaults to UTC. | tools | query | "none" | "summary" | "detail" | Optional | How much tool usage to report: none, summary totals, or per-tool detail. Defaults to summary. |
Operation ID experimental.session.stats post/api/experimental/session/importImport sessionImport 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 | |
Operation ID experimental.session.import get/api/experimental/session/{sessionID}/exportExport sessionExport a complete projected session transcript. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | | sanitize | query | "true" | "false" | Optional | Set to true to redact titles, message text, file data, paths and metadata from the export. |
Operation ID experimental.session.export get/api/session/activeList active sessionsList the sessions whose agent is running right now in this server process. Sessions missing from the result are idle. Operation ID session.active get/api/session/{sessionID}Get sessionRetrieve a session by ID. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.get patch/api/session/{sessionID}Update sessionUpdate mutable session properties. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.update delete/api/session/{sessionID}Delete sessionDelete a session and its child sessions. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.remove post/api/session/{sessionID}/forkFork sessionCreate a child session with this session's 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 | |
Operation ID session.fork post/api/session/{sessionID}/agentSwitch session agentChange the agent the session uses from its next model call on. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.switchAgent post/api/session/{sessionID}/modelSwitch session modelChange the model the session uses from its next model call on. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.switchModel post/api/session/{sessionID}/moveMove sessionMove 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 | |
Operation ID session.move post/api/session/{sessionID}/promptSend messageSend a user message and start the agent unless resume is false. Returns once the message is queued, not when the agent finishes: wait with POST /api/experimental/session/:sessionID/wait or the session.execution.* events, then read the reply with GET /api/session/:sessionID/message. An archived session is unarchived. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.prompt post/api/session/{sessionID}/commandRun commandRun a named command in the session. Most commands send a prompt, so like session.prompt this returns before the agent finishes. An archived session is unarchived. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.command post/api/experimental/session/{sessionID}/skillActivate skillActivate a skill for a session by appending a skill message and resuming execution. An archived session is unarchived. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.session.skill post/api/session/{sessionID}/syntheticAdd synthetic messageAdd a message the model reads as user input but the user didn't type, such as a notification. Starts the agent unless resume is false or the session has a staged revert. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.synthetic post/api/session/{sessionID}/shellRun shell commandExecute 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. An archived session is unarchived. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.shell post/api/session/{sessionID}/compactCompact sessionQueue a summary of the session's history. Steers by default: it runs before the next model call, ahead of queued messages. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.compact post/api/experimental/session/{sessionID}/waitWait for sessionWait until the session's agent stops running in this server process. Returns at once when idle. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID experimental.session.wait post/api/session/{sessionID}/revert/stageStage session revertStage 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 | |
Operation ID session.revert.stage delete/api/session/{sessionID}/revertClear staged revert| Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.revert.clear post/api/session/{sessionID}/revert/commitCommit staged revert| Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.revert.commit get/api/session/{sessionID}/contextGet session contextRetrieve the active context messages for a session (all messages after the last compaction). | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.context get/api/session/{sessionID}/diffDiff session turnsStructured 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 | User message whose turn to diff. Defaults to the turn of the newest user message. | to | query | Session.Message.ID | Optional | Later user message whose turn ends the range. Defaults to the turn of `from` alone. | context | query | string | Optional | Unchanged lines around each hunk. Omit for full-file patches. |
Operation ID session.diff get/api/session/{sessionID}/inboxList session inboxList user, synthetic, compaction and move items not yet delivered to the agent, oldest first. Delivered user and synthetic items move to session.message.list. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.inbox.list patch/api/session/{sessionID}/inbox/{inboxID}Update inbox itemChange a pending inbox item's delivery mode. Steering wakes session execution. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.inbox.update delete/api/session/{sessionID}/inbox/{inboxID}Cancel inbox inputCancel an inbox item that has not yet been delivered. Unavailable items are a no-op. Operation ID session.inbox.cancel get/api/experimental/session/{sessionID}/instructions/entriesList instruction entriesList API-managed instruction entries attached to the session. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID experimental.session.instructions.entry.list put/api/experimental/session/{sessionID}/instructions/entries/{key}Put instruction entryAttach or replace one durable instruction entry. Changes announce as updates at the next step boundary. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.session.instructions.entry.put delete/api/experimental/session/{sessionID}/instructions/entries/{key}Remove instruction entryRemove one instruction entry; the removal is announced to the model at the next step boundary. Operation ID experimental.session.instructions.entry.remove post/api/session/{sessionID}/generateGenerate text from session contextGenerate 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 | |
Operation ID session.generate get/api/experimental/session/{sessionID}/logRead the session logExperimental 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 | Only return events after this sequence number. | follow | query | "true" | "false" | Optional | Set to true to keep the stream open and send live events after the stored ones. |
Operation ID experimental.session.log post/api/session/{sessionID}/interruptInterrupt session executionStop the session's agent if it is running in this server process; interrupted=false means nothing was running. With resume=true it continues with pending steer items, compaction and moves, while queued messages keep waiting. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | | resume | query | "true" | "false" | Optional | Set to true to resume pending steering input and next-in-line control items after interrupting. |
Operation ID session.interrupt post/api/session/{sessionID}/backgroundBackground blocking session toolsMove 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 | |
Operation ID session.background get/api/session/{sessionID}/message/{messageID}Get session messageRetrieve one message of the session by ID. Operation ID session.message.get get/api/session/{sessionID}/formList session formsRetrieve pending forms for a session. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | string | Required | |
Operation ID session.form.list post/api/session/{sessionID}/formCreate session formCreate a form for a session. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | string | Required | |
Operation ID session.form.create get/api/session/{sessionID}/form/{formID}Get session formRetrieve a form and its current state for a session. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | string | Required | | formID | path | Form.ID | Required | |
Operation ID session.form.get delete/api/session/{sessionID}/form/{formID}Cancel formCancel 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 | Why the form was not answered, passed on to the asker. |
Operation ID session.form.cancel post/api/session/{sessionID}/form/{formID}/replyReply to formSubmit 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 | |
Operation ID session.form.reply put/api/session/{sessionID}/environmentSet session environmentReplace 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 | |
Operation ID session.environment post/api/session/{sessionID}/viewView sessionMark 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 | |
Operation ID session.view get/api/session/{sessionID}/messageGet session messagesList a session's messages, optionally filtered by type. Follow cursor.next or cursor.previous with the same type filter. Items still in the inbox aren't included. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | | limit | query | string | Optional | Maximum number of messages to return. When omitted, the endpoint returns its default page size. | order | query | "asc" | "desc" | Optional | Message order for the first page. Use desc for newest first or asc for oldest first. | cursor | query | string | Optional | Opaque pagination cursor returned as cursor.previous or cursor.next in the previous response. Do not combine with order. | type | query | "agent-switched" | "model-switched" | "location-switched" | "user" | "synthetic" | "system" | "skill" | "shell" | "assistant" | "compaction" | "idle" | Optional | Filter by message type before pagination. When omitted, all message types are returned. Pass the same type when following cursors. |
Operation ID session.message.list
Experimental model routes. get/api/modelList modelsRetrieve 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | types | query | Model.Type | Model.Type[] | Optional | Only list models of these types. Defaults to chat, the only type offered for sessions. |
Operation ID model.list get/api/model/defaultGet default modelRetrieve the model used when a session has no explicit model selection. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID model.default
Experimental one-shot generation routes. post/api/experimental/generate/textGenerate textRun 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 | |
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 | |
Operation ID experimental.generate.textLegacy post/api/experimental/generate/imageGenerate imagesGenerate or edit images with an image model using the server's base configuration and return them as base64. Stateless: nothing is stored. Operation ID experimental.generate.image post/api/experimental/generate/videoCreate a video generationSubmit a video job to a video model using the server's base configuration and return its ID once the provider accepted it. The server polls the job and stores the finished videos as blobs; read the job with GET /api/experimental/generate/video/:id and the video with GET /api/experimental/blob/:id. Experimental: may change without compatibility guarantees. Operation ID experimental.generate.video.create get/api/experimental/generate/video/{id}Read a video generationRead a video job: running, completed with its videos' blobs, or error with a reason. Jobs survive a server restart, which resumes polling running ones. A job is not found 24 hours after it finished, or once none of its blobs remain. Experimental: may change without compatibility guarantees. Operation ID experimental.generate.video.get post/api/experimental/generate/decisionsGenerate decisionsAsk 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. Operation ID experimental.generate.decisions
Experimental server-brokered voice session routes. get/api/experimental/voice/modelsList voice modelsList supported voice models, their transports, and whether the server has a usable API key for each provider. Operation ID experimental.voice.models post/api/experimental/voice/sessionCreate voice sessionCreate 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 | |
Operation ID experimental.voice.session
Experimental provider routes. get/api/providerList providersRetrieve active AI providers so clients can show provider availability and configuration. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID provider.list get/api/provider/{providerID}Get providerRetrieve 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID provider.get
Integration discovery and authentication routes. get/api/integrationList integrationsRetrieve available integrations and their authentication methods. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.list get/api/integration/{integrationID}Get integrationRetrieve one integration and its authentication methods. | Parameter | In | Type | Required | Description |
|---|
integrationID | path | Integration.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.get post/api/experimental/integration/wellknownAdd wellknown integrationDiscover and persist an experimental wellknown integration source. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.integration.wellknown.add post/api/integration/{integrationID}/connect/keyConnect with keyRun a key authentication method and store the resulting credential. | Parameter | In | Type | Required | Description |
|---|
integrationID | path | Integration.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID integration.connect.key post/api/integration/{integrationID}/connect/externalConnect with external credentialsRun 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID integration.connect.external post/api/integration/{integrationID}/connect/oauthBegin OAuth connectionStart an OAuth attempt and return the authorization details. | Parameter | In | Type | Required | Description |
|---|
integrationID | path | Integration.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID integration.oauth.connect get/api/integration/{integrationID}/connect/oauth/{attemptID}Get OAuth attempt statusPoll 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.oauth.status delete/api/integration/{integrationID}/connect/oauth/{attemptID}Cancel OAuth connectionCancel 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.oauth.cancel post/api/integration/{integrationID}/connect/oauth/{attemptID}/completeComplete OAuth connectionComplete 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID integration.oauth.complete post/api/integration/{integrationID}/connect/commandBegin command connectionStart a command authentication attempt. | Parameter | In | Type | Required | Description |
|---|
integrationID | path | Integration.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID integration.command.connect get/api/integration/{integrationID}/connect/command/{attemptID}Get command attempt statusPoll 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.command.status delete/api/integration/{integrationID}/connect/command/{attemptID}Cancel command connectionCancel 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID integration.command.cancel
MCP server and resource routes. get/api/mcpList MCP serversRetrieve configured MCP servers and their connection status. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID mcp.list put/api/experimental/mcp/{server}Add MCP serverAdd 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.mcp.add delete/api/experimental/mcp/{server}Remove MCP serverStop 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.mcp.remove post/api/experimental/mcp/{server}/connectConnect MCP serverConnect an MCP server at runtime, overriding a disabled configuration until restart. | Parameter | In | Type | Required | Description |
|---|
server | path | string | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.mcp.connect post/api/experimental/mcp/{server}/disconnectDisconnect MCP serverDisconnect an MCP server at runtime, removing its tools until reconnected. | Parameter | In | Type | Required | Description |
|---|
server | path | string | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.mcp.disconnect get/api/mcp/resourceList MCP resourcesRetrieve resources and resource templates from connected MCP servers. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID mcp.resource.catalog post/api/experimental/client-mcp/tokenCreate client MCP WebSocket tokenCreate 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 | Must be 1; requests without it are refused. | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | name | query | string | Required | Name of the MCP server the client hosts. |
Operation ID experimental.mcp.client.token get/api/experimental/client-mcpAttach client MCP serverUpgrade 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | name | query | string | Required | Name of the MCP server the client hosts. | ticket | query | string | Optional | Single-use ticket from experimental.mcp.client.token, which authorizes the connection without the usual credentials. |
Operation ID experimental.mcp.client
get/api/credentialList credentialsList every stored integration credential, including its secret value. Operation ID credential.list post/api/credentialCreate credentialStore 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. Operation ID credential.create patch/api/credential/{credentialID}Update credentialUpdate a stored credential label. | Parameter | In | Type | Required | Description |
|---|
credentialID | path | Credential.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID credential.update delete/api/credential/{credentialID}Remove credentialRemove a stored integration credential. | Parameter | In | Type | Required | Description |
|---|
credentialID | path | Credential.ID | Required | |
Operation ID credential.remove post/api/credential/{credentialID}/activateActivate credentialActivate a stored integration credential. | Parameter | In | Type | Required | Description |
|---|
credentialID | path | Credential.ID | Required | |
Operation ID credential.activate
Project routes. get/api/projectList projectsList known projects. Archived projects are excluded unless archived=true. | Parameter | In | Type | Required | Description |
|---|
archived | query | "true" | "false" | Optional | Set to true to include archived projects. |
Operation ID project.list patch/api/project/{projectID}Update projectUpdate 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 | |
Operation ID project.update
Location form routes. get/api/formList pending formsRetrieve pending forms for a location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID form.list
Experimental permission routes. get/api/permission/requestList pending permission requestsRetrieve pending permission requests for a location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID permission.request.list get/api/permission/savedList saved permissionsRetrieve saved permissions, optionally filtered by project. | Parameter | In | Type | Required | Description |
|---|
projectID | query | Project.ID | Optional | Project whose saved permissions to list. Defaults to the project of the requested location. |
Operation ID permission.saved.list patch/api/permission/saved/{id}Update saved permissionChange 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. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID permission.saved.update delete/api/permission/saved/{id}Remove saved permissionRemove a saved permission by ID. Operation ID permission.saved.remove get/api/session/{sessionID}/permissionList session permission requestsRetrieve pending permission requests owned by a session. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID session.permission.list post/api/session/{sessionID}/permissionCreate permission requestEvaluate 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 | |
Operation ID session.permission.create get/api/session/{sessionID}/permission/{requestID}Get permission requestRetrieve a pending permission request owned by a session. Operation ID session.permission.get post/api/session/{sessionID}/permission/{requestID}/replyReply to pending permission requestRespond to a pending permission request owned by a session. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID session.permission.reply
Experimental location-scoped filesystem routes. get/api/fs/read/*Read fileStream 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID fs.read get/api/fs/listList directoryList 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | path | query | string | Optional | An absolute path or a path relative to the requested location. Defaults to the location directory. |
Operation ID fs.list get/api/fs/findFind filesFind recursively ranked filesystem entries relative to the requested location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | query | query | string | Required | | type | query | "file" | "directory" | Optional | | limit | query | string | Optional | |
Operation ID fs.find post/api/experimental/fs/writeWrite fileWrite 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | path | query | string | Required | An absolute path or a path relative to the requested location. Missing parent directories are created. |
| Request body | Type | Required | Description |
|---|
application/octet-stream | string<binary> | Required | |
Operation ID experimental.fs.write post/api/experimental/fs/watchWatch fileWatch 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.fs.watch delete/api/experimental/fs/watchUnwatch fileStop watching one file relative to the requested location. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.fs.unwatch
Experimental command routes. get/api/commandList commandsRetrieve currently registered commands. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID command.list
Experimental skill routes. get/api/skillList skillsRetrieve currently registered skills. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID skill.list
get/api/experimental/skill/{skillID}/file/*Read skill fileRead one file of a skill, loading it when the skill serves it on demand. SKILL.md returns the body without frontmatter. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
skillID | path | Skill.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.skill.file get/api/experimental/media/{hash}Read media blobRead 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 | |
Operation ID experimental.media.get get/api/experimental/blob/{id}Read a blobStream a stored blob's bytes, such as a generated video, with single byte Range, ETag and 304 Not Modified support. A blob is deleted a week after it was stored. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
id | path | Blob.ID | Required | |
Operation ID experimental.blob.get get/api/experimental/browser/tunnelOpen a browser attachment binary stream tunnelUpgrade to a binary WebSocket carrying multiplexed TCP streams for one live desktop browser attachment. Requires a short-lived, single-use attachment-bound ticket in the x-opencode-browser-ticket header minted through authenticated browser RPC. Never accepts a session ID or browser cookie alone. Experimental: may change without compatibility guarantees. Operation ID experimental.browser.tunnel get/api/experimental/automationList automationsList automations, oldest first. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. | Parameter | In | Type | Required | Description |
|---|
sessionID | query | Session.ID | Optional | Only automations created by this Session. | directory | query | string | Optional | Only automations in the project that owns this directory. |
Operation ID experimental.automation.list post/api/experimental/automationCreate automationCreate an automation that sends a prompt, runs a Code Mode program, or runs a shell command at a time, every interval, or on a cron. Creating an MCP event watch requires the automation_create tool in a local session; a session ID over HTTP is not a watch authorization. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. Operation ID experimental.automation.create get/api/experimental/automation/{automationID}Get automationRead one automation. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. | Parameter | In | Type | Required | Description |
|---|
automationID | path | Automation.ID | Required | |
Operation ID experimental.automation.get delete/api/experimental/automation/{automationID}Delete automationDelete an automation. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. | Parameter | In | Type | Required | Description |
|---|
automationID | path | Automation.ID | Required | |
Operation ID experimental.automation.delete post/api/experimental/automation/{automationID}/pausePause automationStop an automation from running until it is resumed. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. | Parameter | In | Type | Required | Description |
|---|
automationID | path | Automation.ID | Required | |
Operation ID experimental.automation.pause post/api/experimental/automation/{automationID}/resumeResume automationResume a paused automation. A missed `at` runs once; repeating timers resume at their next slot. Event watches request replay from their saved cursor. Experimental: may change without compatibility guarantees. Set automations to false in the directory's config to disable access. | Parameter | In | Type | Required | Description |
|---|
automationID | path | Automation.ID | Required | |
Operation ID experimental.automation.resume get/api/experimental/artifacts/providersList artifact providersReturn 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.providers get/api/experimental/artifactsList artifactsList 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | sessionID | query | Session.ID | Optional | | provider | query | string | Optional | |
Operation ID experimental.artifacts.list post/api/experimental/artifactsCreate artifactPublish 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.create get/api/experimental/artifacts/{artifactID}Read artifactRead 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.get patch/api/experimental/artifacts/{artifactID}Update artifactReplace 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.update delete/api/experimental/artifacts/{artifactID}Delete artifactRemove 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.delete get/api/experimental/artifacts/{artifactID}/view/*View local artifactServe 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.artifacts.view get/api/experimental/jobList background jobsList 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 | Filter to background jobs owned by this session. | kind | query | Job.Kind | Optional | Filter by background job kind. | status | query | Job.Status | Optional | Filter by job status (running, completed, error, or cancelled). | descendants | query | "true" | "false" | Optional | When sessionID is set, also include background jobs owned by child and nested subagent sessions. |
Operation ID experimental.job.list post/api/experimental/job/{id}/cancelCancel background jobCancel a running background job, interrupting the work it started. Cancelling a job that already finished does nothing. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
id | path | string | Required | |
Operation ID experimental.job.cancel get/api/experimental/machine/linkConnect a machineUpgrade to a WebSocket that carries a machine's link to this server: binary messages only, each at most 65,535 bytes. It takes no server password. The link's own handshake, which starts with the machine's first message, is the only way in: it admits a key this server has paired or a valid join string, and closes the socket on anything else without saying why. Behind the machines flag; without it the route does not exist. Experimental: may change without compatibility guarantees. Operation ID experimental.machine.link get/api/experimental/machineList machinesList known machines and whether each is paired and online. Behind the machines flag. Experimental: may change without compatibility guarantees. Operation ID experimental.machine.list post/api/experimental/machineAdd or invite a machineAdd a machine by name if it does not exist, then create a single-use join string carrying the given reach addresses. Behind the machines flag. Experimental: may change without compatibility guarantees. Operation ID experimental.machine.add delete/api/experimental/machine/{name}Remove a machineForget a machine by name, closing any live link and revoking its key. Behind the machines flag. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
name | path | string | Required | |
Operation ID experimental.machine.remove get/api/experimental/pushGet push settingsList the registered phones with their choices, bells and pauses, the server-wide pause and the shared session bells. Never returns callback URLs or keys. Experimental: may change without compatibility guarantees. Operation ID experimental.push.get put/api/experimental/push/device/{deviceID}Register a phoneRegister or renew a phone's relay callback URL and public key, and answer with the server's public key for it. Keeps the phone's pause, session bells and, unless given, its level. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
deviceID | path | Push.DeviceID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | Push.Register | Required | |
Operation ID experimental.push.device.register patch/api/experimental/push/device/{deviceID}Update a phonePause or resume notifications to one phone, or change the level it gets by default. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
deviceID | path | Push.DeviceID | Required | |
Operation ID experimental.push.device.update delete/api/experimental/push/device/{deviceID}Remove a phoneStop sending notifications to a phone. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
deviceID | path | Push.DeviceID | Required | |
Operation ID experimental.push.device.remove put/api/experimental/push/device/{deviceID}/session/{sessionID}Set a phone's session bellChoose what one phone gets for one session. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | Push.Bell | Required | |
Operation ID experimental.push.device.session.set delete/api/experimental/push/device/{deviceID}/session/{sessionID}Clear a phone's session bellLet one phone follow the shared bell or its default for one session again. Experimental: may change without compatibility guarantees. Operation ID experimental.push.device.session.remove put/api/experimental/push/session/{sessionID}Set a session bellChoose what every phone gets for one session. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
| Request body | Type | Required | Description |
|---|
application/json | Push.Bell | Required | |
Operation ID experimental.push.session.set delete/api/experimental/push/session/{sessionID}Clear a session bellLet every phone follow its default for one session again. Experimental: may change without compatibility guarantees. | Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID experimental.push.session.remove put/api/experimental/push/settingsPause all notificationsPause or resume notifications to every phone. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | Push.Settings | Required | |
Operation ID experimental.push.settings.set post/api/experimental/space/writeWrite valuesCommit 1 to 1024 changes, across any spaces, in one transaction, their values at most 1 MiB of UTF-8 in total. A string value sets the space's key, replacing any previous value; null deletes it, and deleting an unset key changes nothing. In request order, each change that changes a key takes its space's next revision and goes to that space's subscribers as its own experimental.space.updated or experimental.space.deleted event, so a key that appears twice keeps its last value. Values are client-defined, such as JSON text, and sent back unchanged. Returns each space's revision after the write, in the order the spaces first appear. To follow a space, a client opens /api/event and reads its stream ID from server.connected, syncs with experimental.space.sync until no space has a `next` or is left without a page, then subscribes the stream with the saved cursor through experimental.space.subscribe and applies the stream's events in order. On experimental.space.resync it syncs and subscribes that space again; after a reconnect it subscribes again with its latest cursor. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.space.write post/api/experimental/space/syncSync spacesRead one page for each of 1 to 100 distinct spaces, in request order, with at most 500 keys across all pages: a snapshot page, or a delta of the keys changed and deleted since the cursor. A delta whose deletions were purged comes back as a snapshot. Apply a delta page at once; apply a snapshot page's entries at once, and remove the keys none of the snapshot's pages held after its last one, the page without `next` or the one before a delta. Once the 500 keys are used up, the remaining spaces get no page: sync them again with the same cursor, together with the `next` of the pages that have one. To follow a space, a client opens /api/event and reads its stream ID from server.connected, syncs with experimental.space.sync until no space has a `next` or is left without a page, then subscribes the stream with the saved cursor through experimental.space.subscribe and applies the stream's events in order. On experimental.space.resync it syncs and subscribes that space again; after a reconnect it subscribes again with its latest cursor. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.space.sync post/api/experimental/space/subscribeSubscribe streamSend 1 to 100 distinct spaces' changes to an open event stream, replacing any earlier subscription of those spaces on it: first the changes since each cursor as experimental.space.updated and experimental.space.deleted events in revision order, then every later change the same way, none missed or repeated. The catch-ups read at most 500 changes together, in request order: a space whose changes do not fit what is left, every space after they are used up, and one whose cursor is unusable get experimental.space.resync instead. To follow a space, a client opens /api/event and reads its stream ID from server.connected, syncs with experimental.space.sync until no space has a `next` or is left without a page, then subscribes the stream with the saved cursor through experimental.space.subscribe and applies the stream's events in order. On experimental.space.resync it syncs and subscribes that space again; after a reconnect it subscribes again with its latest cursor. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.space.subscribe post/api/experimental/space/unsubscribeUnsubscribe streamStop sending these 1 to 100 distinct spaces' changes to an open event stream, including a catch-up still going out. Spaces it does not follow are ignored. To follow a space, a client opens /api/event and reads its stream ID from server.connected, syncs with experimental.space.sync until no space has a `next` or is left without a page, then subscribes the stream with the saved cursor through experimental.space.subscribe and applies the stream's events in order. On experimental.space.resync it syncs and subscribes that space again; after a reconnect it subscribes again with its latest cursor. Experimental: may change without compatibility guarantees. | Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID experimental.space.unsubscribe post/api/experimental/space/resetReset revisionsReplace the epoch, so every client's saved cursor becomes unusable and its next sync starts from a snapshot. A restored backup brings back its old epoch, and cursors issued after the backup would then get wrong deltas: after restoring one, call this before clients reconnect, and do not serve writes or subscribers until it has run. To follow a space, a client opens /api/event and reads its stream ID from server.connected, syncs with experimental.space.sync until no space has a `next` or is left without a page, then subscribes the stream with the saved cursor through experimental.space.subscribe and applies the stream's events in order. On experimental.space.resync it syncs and subscribes that space again; after a reconnect it subscribes again with its latest cursor. Experimental: may change without compatibility guarantees. Operation ID experimental.space.reset
Plugin RPC routes. post/api/rpc/{rpcID}/{method}Call a plugin RPCDispatch 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | Rpc.Input | Required | |
Operation ID rpc.call
Experimental event stream routes. get/api/eventSubscribe to eventsSubscribe 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" | "experimental.job.updated" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "experimental.push.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" | "experimental.job.updated" | "form.created" | "form.replied" | "form.cancelled" | "websearch.updated" | "experimental.push.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 | Only send events of these types, plus the initial server.connected event. When omitted, all events are sent. |
Operation ID event.subscribe
Experimental location-scoped PTY routes. get/api/ptyList PTY sessionsList PTY sessions for a location, including exited sessions retained until removal. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID pty.list post/api/ptyCreate PTY sessionCreate a pseudo-terminal session for a location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID pty.create get/api/pty/{ptyID}Get PTY sessionGet one PTY session, including its exit code once exited. | Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID pty.get put/api/pty/{ptyID}Update PTY sessionUpdate the title or viewport size of one PTY session. | Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID pty.update delete/api/pty/{ptyID}Remove PTY sessionTerminate and remove one PTY session. | Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID pty.remove post/api/pty/{ptyID}/connect-tokenCreate PTY WebSocket tokenCreate 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 | Must be 1; requests without it are refused. | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID pty.connect.token get/api/pty/{ptyID}/connectConnect to PTY sessionEstablish 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 | Absolute path of the location directory. Omit to use the server's default location. | cursor | query | string | Optional | Output offset to replay from. Use -1 to start at the current end; omit to replay all retained output. | ticket | query | string | Optional | Single-use ticket from pty.connect.token, which authorizes the connection without the usual credentials. |
Operation ID pty.connect
Prototype persistent PTY routes. get/api/experimental/session/{sessionID}/terminal/readRead the session's most recently controlled terminalRead 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 | Number of trailing rows to read, up to 65535. Defaults to the live terminal height; larger counts include retained history. |
Operation ID experimental.persistentPty.read get/api/experimental/session/{sessionID}/terminal| Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID experimental.persistentPty.list post/api/experimental/session/{sessionID}/terminal| Parameter | In | Type | Required | Description |
|---|
sessionID | path | Session.ID | Required | |
Operation ID experimental.persistentPty.create post/api/experimental/persistent-pty/shutdownOperation ID experimental.persistentPty.shutdown post/api/experimental/persistent-pty/handoffOperation ID experimental.persistentPty.handoff get/api/experimental/persistent-pty/{ptyID}| Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | |
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 | |
Operation ID experimental.persistentPty.update delete/api/experimental/persistent-pty/{ptyID}| Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | |
Operation ID experimental.persistentPty.remove get/api/experimental/persistent-pty/{ptyID}/snapshot| Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | |
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 | Must be 1; requests without it are refused. |
Operation ID experimental.persistentPty.connectToken get/api/experimental/persistent-pty/{ptyID}/connectConnect to a persistent PTYStream persistent PTY output through the OpenCode server. | Parameter | In | Type | Required | Description |
|---|
ptyID | path | Pty.ID | Required | | attachment_id | query | string | Optional | | cursor | query | string | Optional | Output offset to replay from. Defaults to 0. | role | query | string | Optional | Attach as controller (the default) or observer. | takeover | query | string | Optional | Set to true to take over control of the terminal. | input_protocol | query | string | Optional | Set to 1 to send framed input messages instead of raw terminal input. | ticket | query | string | Optional | Single-use ticket from experimental.persistentPty.connectToken, which authorizes the connection without the usual credentials. |
Operation ID experimental.persistentPty.connect
Location-scoped shell command routes. get/api/shellList running shell commandsList currently running shell commands for a location. Exited commands are not included. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID shell.list post/api/shellRun shell commandSpawn 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID shell.create get/api/shell/{id}Get shell commandGet 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID shell.get delete/api/shell/{id}Remove shell commandTerminate and remove one shell command and its retained output. | Parameter | In | Type | Required | Description |
|---|
id | path | Shell.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID shell.remove get/api/shell/{id}/outputRead shell outputPage through captured combined output by absolute byte cursor. | Parameter | In | Type | Required | Description |
|---|
id | path | Shell.ID | Required | | location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | cursor | query | string | Optional | Byte offset to read from, such as the cursor of the previous page. Defaults to 0. | limit | query | string | Optional | Maximum number of bytes to return. Defaults to 65536. |
Operation ID shell.output
Location-scoped project references. get/api/referenceList referencesList references available in the requested location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID reference.list
Project-based worktree management routes. get/api/worktreeList worktreesReturn the project's saved worktree inventory without loading configuration or running discovery. | Parameter | In | Type | Required | Description |
|---|
projectID | query | Project.ID | Required | |
Operation ID worktree.list post/api/worktreeCreate worktreeLoad the project's canonical configuration, create a local worktree using its selected strategy, then run the project's setup script. Operation ID worktree.create delete/api/worktreeRemove worktreeLoad the project's canonical configuration and remove a saved worktree using its recorded strategy. Operation ID worktree.remove post/api/worktree/refreshRefresh worktreesLoad 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 | |
Operation ID worktree.refresh
Location-scoped version control routes. post/api/vcs/initInitialize VCS repositoryInitialize 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | provider | query | string | Optional | VCS provider to initialize. Defaults to git. |
Operation ID vcs.init get/api/vcsVCS infoGet current and default branch information for the requested location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID vcs.get get/api/vcs/baseVCS review baseInfer 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID vcs.base get/api/vcs/statusVCS statusList uncommitted working-copy changes relative to the requested location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID vcs.status get/api/vcs/branchVCS branchesList local and remote branches available at the requested location. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | search | query | string | Optional | | limit | query | string | Optional | |
Operation ID vcs.branch.list get/api/vcs/diffVCS diffDiff 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. | mode | query | Vcs.Mode | Required | | base | query | string | Optional | | context | query | string | Optional | | untracked | query | Vcs.Untracked | Optional | |
Operation ID vcs.diff
post/api/debug/heap-dumpWrite a heap snapshotWrite 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 | Absolute server-local directory to write the snapshot into, created when missing. Defaults to the server's log directory. |
Operation ID debug.heapDump get/api/debug/locationList loaded locationsList locations currently loaded by the server. Operation ID debug.location.list delete/api/debug/locationEvict a loaded locationDispose the requested location's cached services so its next use boots them fresh. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID debug.location.evict
get/api/experimental/migration/v1Get V1 migration statusReturn the progress of the V1 to V2 session history migration. Operation ID experimental.migration.v1.status
Location-scoped web search routes. get/api/websearch/providerList web search providersReturn the registered web search providers. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID websearch.providers post/api/websearchSearch the webRun one web search through the selected provider. Specify a provider to override the configured default. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
| Request body | Type | Required | Description |
|---|
application/json | object | Required | |
Operation ID websearch.query
Experimental usage limit routes. get/api/experimental/usage/limitsGet usage limitsReturn 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 | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.usage.limits
Experimental feature flag routes. get/api/experimental/flagGet feature flagsExperimental. Return the resolved feature flags the location's clients may act on, keyed by flag name. Flags not listed are off. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID experimental.flag.get
Location-scoped configuration routes. get/api/configGet configurationReturn configuration documents and discovery sources for the requested location, from lowest to highest priority. | Parameter | In | Type | Required | Description |
|---|
location | query | object | Optional | Location to run the request in, sent as location[directory]. Omit to use the server's default location. |
Operation ID config.get get/api/config/shellList available shellsReturn shells available to terminal and agent execution. Operation ID config.shells patch/api/experimental/configUpdate global configurationPatch supported fields in the highest-precedence global configuration document. | Request body | Type | Required | Description |
|---|
application/json | Config.Patch | Required | |
Operation ID experimental.config.update
The data types the operations above refer to. AbsolutePathstring
Agent.Colorstring
Agent.IDstring
Agent.Infoobject
| Field | Type | Required | Description |
|---|
id | Agent.ID | Required | | name | string | Required | | model | Model.Ref | Optional | | request | Provider.Request | Required | | system | string | Optional | | instructions | string | object | 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
Artifact.Infoobject
Artifact.Providerobject
Artifact.ProviderIDEncodedstring
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 | |
Automation.ActionAutomation.Action.Prompt | Automation.Action.Code | Automation.Action.Shell
Automation.Action.Codeobject
| Field | Type | Required | Description |
|---|
type | "code" | Required | | code | string | Required | | args | object | Optional | |
Automation.Action.Promptobject
| Field | Type | Required | Description |
|---|
type | "prompt" | Required | | prompt | string | Required | | to | Automation.Target | Required | |
Automation.Action.Shellobject
| Field | Type | Required | Description |
|---|
type | "shell" | Required | | command | string | Required | |
Automation.ActionInputAutomation.PromptActionInput | Automation.CodeActionInput | Automation.ShellActionInput
Automation.CodeActionInputobject
| Field | Type | Required | Description |
|---|
type | "code" | Required | | code | string | Required | Code Mode JavaScript run on each trigger with no model (32 KB output cap). Call tools statically as tools.<ns>.<tool>(...) or tools["ns-name"].tool(...); each is authorized once at creation to run unattended. A shell command still running at its timeout is stopped and the call throws; it never moves to the background. Receives input = { state, now, runs, args } (also globals): state starts null, now is epoch ms, runs counts earlier runs. Event triggers also receive input.event = { id, timestamp, data }; data follows the event type's payloadSchema. Return nothing, or { state?, done?, send? }. JSON state is kept for the next run; done: true stops. lastOutput shows the delivery target and any logs. Return at most one send per run. { send: { prompt } } steers the creating session; { send: { prompt, to: { subagent } } } starts a permitted child that does not report back. No session IDs. Omit send to stay quiet. A rejected send commits neither state nor done. Example code string: if (runs < 2) return; return { done: true, send: { prompt: "Three checks elapsed. Review the build." } } | args | object | Optional | |
Automation.CreatePayloadobject
| Field | Type | Required | Description |
|---|
sessionID | Session.ID | Optional | | directory | string | Optional | Where it runs when there is no Session. Defaults to the server user's home folder. | name | string | Required | A short label shown in lists. | trigger | Automation.Trigger | Required | | action | Automation.ActionInput | Required | | expires | string | Optional | |
Automation.Durationstring
A duration such as "90 seconds", "5 minutes" or "2 hours". string Automation.IDstring
Automation.Infoobject
Automation.Outcome"fired" | "late" | "skipped" | "disabled" | "failed" | "expired"
"fired" | "late" | "skipped" | "disabled" | "failed" | "expired"
Automation.PromptActionInputobject
| Field | Type | Required | Description |
|---|
type | "prompt" | Required | | prompt | string | Required | The message the target Session receives, with enough context to act on it without this conversation. | to | Automation.Target | Optional | |
Automation.ShellActionInputobject
| Field | Type | Required | Description |
|---|
type | "shell" | Required | | command | string | Required | The fixed shell command to run on each trigger without a model. |
Automation.Status"active" | "paused" | "done"
"active" | "paused" | "done"
Automation.Targetobject | object
Automation.TriggerAutomation.Trigger.At | Automation.Trigger.Every | Automation.Trigger.Cron | Automation.Trigger.Event
Automation.Trigger.Atobject
| Field | Type | Required | Description |
|---|
type | "at" | Required | | at | string | Required | An instant with an offset, a wall-clock time in tz such as "2026-10-27T09:00", or "in 10 minutes". | tz | string | Optional | |
Automation.Trigger.Cronobject
| Field | Type | Required | Description |
|---|
type | "cron" | Required | | cron | string | Required | | tz | string | Optional | |
Automation.Trigger.Eventobject
| Field | Type | Required | Description |
|---|
type | "event" | Required | | server | string | Required | | event | string | Required | | args | object | Optional | |
Automation.Trigger.Everyobject
| Field | Type | Required | Description |
|---|
type | "every" | Required | | every | Automation.Duration | Required | | tz | string | Optional | |
Automation.Trigger_1Automation.Trigger.At | Automation.Trigger.Every | Automation.Trigger.Cron | Automation.Trigger.Event
AutomationNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "AutomationNotFoundError" | Required | | automationID | string | Required | | message | string | Required | |
Blob.IDstring
A stored blob, such as a generated video, which outlives the job that made it string Blob.Infoobject
| Field | Type | Required | Description |
|---|
id | Blob.ID | Required | | mime | string | Required | | bytes | number | Required | |
BlobNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "BlobNotFoundError" | Required | | blobID | 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
Config.DirectoryEncodedobject
| Field | Type | Required | Description |
|---|
type | "directory" | Required | | path | AbsolutePath | Required | |
Config.DocumentEncodedobject
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 | | automations | boolean | 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
Config.Model.CostEncodedobject
Config.Model.Reasoningobject | object
Config.Model.Settingsobject
Config.Model.VariantSettingsobject
Config.ModelEncodedobject
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
Config.ProviderEncodedobject
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
Credential.Entryobject
Credential.Externalobject
| Field | Type | Required | Description |
|---|
type | "external" | Required | | methodID | Integration.MethodID | Required | | metadata | object | Optional | |
Credential.IDstring
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
Event.Seqinteger
Event.VersionEncoded_c3ea984aceae2
Event.VersionEncoded_c77c5abcb68d1
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
ForbiddenErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "ForbiddenError" | Required | | message | string | Required | |
Form.Answerobject
Form.Answer_1object
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
Form.Detailobject
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
Form.Infoobject
Form.Info_1object
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
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
Form.Stateobject | 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
Generate.DecisionResultobject
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.ImageFileobject
| Field | Type | Required | Description |
|---|
data | Prompt.Base64 | Required | | mime | string | Required | | name | string | Optional | |
Generate.ImageOutputobject
| Field | Type | Required | Description |
|---|
type | "image" | Required | | data | Prompt.Base64 | Required | | mime | string | Required | | name | string | Optional | |
Generate.ImageRequestobject
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
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 | |
Generate.VideoAspectGenerate.ImageAspect | "auto"
Generate.VideoCompletedobject
| Field | Type | Required | Description |
|---|
id | Generate.VideoID | Required | | status | "completed" | Required | | blobs | Blob.Info[] | Required | The finished videos, usually one. Read each with GET /api/experimental/blob/:id |
Generate.VideoErrorobject
Generate.VideoErrorReason"failed" | "cancelled" | "expired" | "unknown"
failed: the provider failed the job. cancelled: the provider cancelled it. expired: the provider expired it. unknown: the provider gave no result in time "failed" | "cancelled" | "expired" | "unknown"
Generate.VideoIDstring
Generate.VideoJobGenerate.VideoRunning | Generate.VideoCompleted | Generate.VideoError
Generate.VideoRequestobject
Generate.VideoResolution"480p" | "720p" | "1080p" | "4k" | string
"480p" | "720p" | "1080p" | "4k" | string Generate.VideoRunningobject
GenerateDecisionsResponseobject
GenerateImageResponseobject
GenerateTextResponseobject
| Field | Type | Required | Description |
|---|
data | object | Required | |
GenerateVideoCreateResponseobject
GenerateVideoGetResponseobject
Instruction.Hashstring
Instruction.Keystring
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[]
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
Integration.AttemptStatusobject | object | object | object
object | object | object | object Integration.CommandAttemptobject
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
Integration.IDstring
Integration.Infoobject
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
Integration.OAuthMethodobject
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.CodeModeobject
| Field | Type | Required | Description |
|---|
kind | "codemode" | Required | | id | string | Required | | sessionID | Session.ID | Required | | status | Job.Status | Required | | title | string | Optional | | time | Job.Time | Required | |
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.Video | Job.CodeMode
Job.Kind"shell" | "subagent" | "image" | "video" | "codemode"
"shell" | "subagent" | "image" | "video" | "codemode"
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 | |
Job.Videoobject
| Field | Type | Required | Description |
|---|
kind | "video" | Required | | id | string | Required | | sessionID | Session.ID | Required | | status | Job.Status | Required | | title | string | Optional | | time | Job.Time | Required | | path | string | Required | |
Location.PublicInfoobject
| Field | Type | Required | Description |
|---|
directory | AbsolutePath | Required | | project | object | Required | |
Location.PublicRefobject
Location.Refobject
LocationNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "LocationNotFoundError" | Required | | location | Location.PublicRef | Required | | message | string | Required | |
Machine.AddPayloadobject
| Field | Type | Required | Description |
|---|
name | string | Required | | reach | Machine.Reach[] | Required | | replace | boolean | null | Optional | |
Machine.Infoobject
| Field | Type | Required | Description |
|---|
id | string | Required | | online | boolean | Required | | paired | boolean | Required | | os | string | Optional | | arch | string | Optional | | connection | object | Optional | |
Machine.Inviteobject
| Field | Type | Required | Description |
|---|
name | string | Required | | join | string | Required | | expires | integer | Required | | reach | Machine.Reach | object[] | Required | |
Machine.Reachobject
| Field | Type | Required | Description |
|---|
type | "url" | Required | | url | string | Required | |
MachineNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "MachineNotFoundError" | Required | | machine | string | 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. "auto" (default) probes for the 2026-07-28 revision and falls back to legacy when the server does not support it. "legacy" opens with the initialize handshake and speaks protocol revisions up to 2025-11-25. "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
Mcp.ResourceTemplateobject
| Field | Type | Required | Description |
|---|
server | string | Required | | name | string | Required | | uriTemplate | string | Required | | description | string | Optional | | mimeType | string | Optional | |
Mcp.Serverobject
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
MessageNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "MessageNotFoundError" | Required | | sessionID | string | Required | | messageID | string | Required | | message | string | Required | |
Model.CacheFormat"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 | | supportsSystemUpdates | boolean | Optional | | mediaInput | Model.MediaInput | Optional | |
Model.Costobject
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 | | experimental | object | Optional | | 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
Model.Speedobject
| Field | Type | Required | Description |
|---|
base | string | Required | | id | string | Required | | faster | boolean | Required | |
Model.Type"chat" | "decision" | "image" | "video" | "realtime" | "embedding" | "transcription" | string
"chat" | "decision" | "image" | "video" | "realtime" | "embedding" | "transcription" | string Model.Variantobject
| Field | Type | Required | Description |
|---|
id | string | Required | | settings | Model.VariantSettings | Optional | | headers | object | Optional | | body | object | Optional | |
Model.VariantSettingsobject
ModelNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "ModelNotFoundError" | Required | | providerID | string | Required | | modelID | string | Required | | message | string | Required | |
Money.USDnumber
Money.USDPerMillionTokensnumber
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"
Permission.IDstring
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
PermissionNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "PermissionNotFoundError" | Required | | requestID | string | Required | | message | string | Required | |
PermissionSaved.IDstring
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
Plugin.Infoobject
Plugin.Sourceobject | object | object | object
object | object | object | object Plugin.Stateobject | object
PluginNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "PluginNotFoundError" | Required | | pluginID | string | Required | | message | string | Required | |
Projectobject
Project.Commandsobject
| Field | Type | Required | Description |
|---|
start | string | Optional | Startup script to run when creating a new workspace (worktree) |
Project.IDstring
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
ProjectNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "ProjectNotFoundError" | Required | | projectID | string | Required | | message | string | Required | |
Prompt.AgentAttachmentobject
An agent @-mentioned in the prompt, such as @explore, to suggest the model use it. Only the @name in text reaches the model; this records which agent it names and doesn't change the session's own agent. | Field | Type | Required | Description |
|---|
name | string | Required | | mention | Prompt.Mention | Optional | |
Prompt.Base64string
Prompt.FileAttachmentobject
Prompt.FileSourceobject | object
Prompt.Mentionobject
| Field | Type | Required | Description |
|---|
start | number | Required | | end | number | Required | | text | string | Required | |
Prompt.SkillAttachmentobject
PromptInput.FileAttachmentobject
| Field | Type | Required | Description |
|---|
uri | string | Required | A file: URL on the server (a file, a directory, or ?start=N&end=M for lines of a text file), a data: URL, or a media: ref from a message. Up to 20 MB. | source | Prompt.FileSource | Optional | | name | string | Optional | | description | string | Optional | | mention | Prompt.Mention | Optional | |
PromptInput.SkillAttachmentobject
Provider.Cacheobject
Provider.CacheTTLstring
Provider.CacheWarmingboolean | object
Provider.Compactionobject | object
Provider.Compatibilityobject
Provider.Encoding"zstd" | "gzip" | "none"
Provider.IDstring
Provider.Infoobject
Provider.Requestobject
| Field | Type | Required | Description |
|---|
settings | Provider.Settings | Required | | headers | object | Required | | body | object | Required | |
Provider.Settingsobject
Provider.Tlsobject
| Field | Type | Required | Description |
|---|
cert | string | Required | PEM client certificate, usually `{file:/path/to/client.pem}` | key | string | Required | PEM private key, usually `{file:/path/to/client.key}` | passphrase | string | Optional | |
Provider.Transport"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
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 | |
Push.Bellobject
| Field | Type | Required | Description |
|---|
level | Push.Level | Required | | until | integer | Optional | Milliseconds since the Unix epoch |
Push.Deviceobject
| Field | Type | Required | Description |
|---|
id | Push.DeviceID | Required | | name | string | Required | | platform | Push.Platform | Required | | expiresAt | integer | Required | Milliseconds since the Unix epoch | settings | Push.DeviceSettings | Required | | paused | boolean | Required | | sessions | object | Required | | time | object | Required | |
Push.DeviceIDstring
A lowercase canonical UUID chosen by the phone string Push.DevicePatchobject
Push.DeviceSettingsobject
| Field | Type | Required | Description |
|---|
default | Push.Level | Required | |
Push.Infoobject
Push.Level"all" | "attention" | "none"
"all" | "attention" | "none"
Push.Platform"android" | "ios"
Push.Registerobject
| Field | Type | Required | Description |
|---|
callbackURL | string | Required | | expiresAt | integer | Required | Milliseconds since the Unix epoch | publicKey | string | Required | | platform | Push.Platform | Required | | name | string | Required | | settings | Push.DeviceSettings | Optional | |
Push.Registeredobject
| Field | Type | Required | Description |
|---|
publicKey | string | Required | |
Push.Settingsobject
| Field | Type | Required | Description |
|---|
paused | boolean | Required | | until | integer | Optional | Milliseconds since the Unix epoch |
PushDeviceNotFoundErrorEncodedobject
| Field | Type | Required | Description |
|---|
_tag | "PushDeviceNotFoundError" | Required | | deviceID | string | Required | | message | string | 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
Rpc.Inputobject
| Field | Type | Required | Description |
|---|
input | object | Op [Page truncated to keep GeezerVison snappy.] | |
|