
ALT A code example titled "Access OpenCode using the TS SDK" with the subtitle "Full TypeScript SDK for building on top of OpenCode." The image shows a TypeScript file (index.ts) demonstrating how to import createOpencode, initialize a client within a sandbox using an Anthropic configuration, create a new session titled "My Session," send a prompt asking the model (claude-sonnet-4) to "Summarize the README," and log the resulting text output to the console.

ALT A code snippet titled "Connect OpenCode desktop web to sandbox" with the subtitle "One Worker, zero config." The image displays a TypeScript file (index.ts) that imports getSandbox, createOpenCodeServer, and proxyToOpencode from the Cloudflare Sandbox package. The code defines a default export function that initializes a sandbox, starts an OpenCode server within a specific directory using an Anthropic provider configuration, and finally returns a proxy request to the OpenCode web UI.














