{"openapi":"3.1.0","info":{"title":"OpenCharts API","version":"1.0.0","description":"The OpenCharts public REST API — create and manage projects, sheets, boards, personas, agents, and generate media (images, video, music, code, and walkable 3D spaces from one photo) with Theo. Available on the Pro and Teams plans. Authenticate with an API key: `Authorization: Bearer oc_...`."},"servers":[{"url":"https://www.opencharts.com/api/v1","description":"Production"}],"tags":[{"name":"Meta"},{"name":"Account"},{"name":"Personas"},{"name":"Projects"},{"name":"Creation"},{"name":"Sheets"},{"name":"Boards"},{"name":"Chat"},{"name":"Conversations"},{"name":"Media"},{"name":"Jobs"},{"name":"Voice"},{"name":"Agents"},{"name":"Research"},{"name":"Drive"},{"name":"Webhooks"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API key (oc_...)","description":"Pass an OpenCharts API key as a Bearer token. Create keys in the Developers hub. Keys carry `read` / `write` / `ai` scopes for the platform, plus the opt-in `drive:read` / `drive:write` scopes for the user's Drive (optionally pinned to specific folders)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"not_found"},"message":{"type":"string"},"requestId":{"type":"string"}},"required":["code","message","requestId"]}},"required":["error"]},"ListEnvelope":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":true}},"total":{"type":"integer"},"cursor":{"type":"string","nullable":true}},"required":["data","total"]},"JobEnvelope":{"type":"object","properties":{"jobId":{"type":"string","description":"Type-prefixed public id (vid_/song_/code_/res_/space_/deck_)."},"type":{"type":"string","enum":["video","song","code","research","space","deck"]},"status":{"type":"string","enum":["queued","processing","complete","failed"]},"rawStatus":{"type":"string"},"pollUrl":{"type":"string"},"progressMessage":{"type":"string"},"result":{"type":"object","additionalProperties":true,"nullable":true,"description":"The finished output, shaped per job type. Present on `complete`. A `space` job is the one type that ALSO carries a result while `processing`: its first tier lands about a minute and a half in (`RealWorldSpaceResult` with `stage: preview`: a room's walkable quick room, or a one-photo space's 360 preview and dimensions), before the final tier completes the job."},"error":{"type":"string","nullable":true}},"required":["jobId","status","pollUrl"]},"PresentationCreate":{"type":"object","description":"Provide `brief` (preferred: Theo writes the outline from it) or a non-empty `outline`. An `Idempotency-Key` header makes a retry return the original deck and job instead of creating and billing a second one.","properties":{"name":{"type":"string","maxLength":255,"description":"Deck title."},"description":{"type":"string"},"brief":{"type":"string","description":"Plain-language brief: audience, goal, key points. Theo authors the outline from it."},"outline":{"type":"array","description":"Explicit slides, used as written. Omit when passing `brief`.","items":{"type":"object","properties":{"title":{"type":"string"},"bullets":{"type":"array","items":{"type":"string"}}},"required":["title","bullets"]}},"slideCount":{"type":"integer","minimum":3,"maximum":30,"description":"Target slide count for a brief-authored outline (default 8). Ignored with `outline`."},"themeId":{"type":"string","description":"Built-in theme id (for example `modern-dark`)."},"visualStyle":{"type":"string","description":"Image art style for the slides (default `illustration`)."},"slideMode":{"type":"string","enum":["creator","content"],"description":"`creator` (default): every slide is a fully designed image. `content`: editable text slides with image backgrounds."},"brandUrl":{"type":"string","description":"The brand's homepage; the deck theme is extracted from it."},"companyName":{"type":"string","description":"The brand's display name (used with `brandUrl`)."},"tags":{"type":"array","items":{"type":"string"}}},"required":["name"]},"PresentationCreateResult":{"type":"object","description":"The created project summary, plus the background build that turns its outline into designed slides.","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"projectType":{"type":"string","enum":["presentation"]},"canvasMode":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"isStarred":{"type":"boolean"},"createdAt":{"type":"string","nullable":true},"updatedAt":{"type":"string","nullable":true},"generationStatus":{"type":"string","enum":["generating","pending_editor_open"],"description":"`generating`: the slides are building now; poll `job`. `pending_editor_open`: background generation is unavailable, so the slides build when the deck is opened in the editor (`job` is null)."},"openUrl":{"type":"string","description":"Absolute editor link for the deck."},"job":{"allOf":[{"$ref":"#/components/schemas/JobEnvelope"}],"nullable":true,"description":"The deck build (`type: deck`). Poll its `pollUrl`; on `complete` the result names the deck and how many slides built (`partial: true` when some did not)."}},"required":["id","name","generationStatus","openUrl","job"]},"ChatArtifact":{"type":"object","description":"A tool output surfaced on a chat turn: a created project, generated media, a search result, or an async job handle. Non-streaming responses carry artifacts on `message.artifacts`; streams deliver each one as the `output` of a `tool-output-available` SSE event.","properties":{"type":{"type":"string","description":"Artifact kind. Creation/media kinds reachable via the API tool set include: flowchart | whiteboard | notes | presentation | document | table | sheet | social_board | image | video | song | podcast | web_search | brand_theme | platform_action | error."},"title":{"type":"string"},"projectId":{"type":"string","description":"Set on project-backed artifacts (the created project's id; for social_board it is the board id)."},"projectType":{"type":"string","enum":["chart","notes","presentation","code","sheet","simulation"],"description":"Editor route family for project-backed artifacts (flowcharts + whiteboards are `chart`)."},"openUrl":{"type":"string","format":"uri","description":"Absolute OpenCharts editor deep link for project-backed artifacts. URL formats: /editor/{projectId} (flowchart + whiteboard), /notes/{projectId}, /presentations/{projectId}, /sheets/{projectId}, /simulations/{projectId}, /code-editor/{projectId}, /boards/{boardId}."},"data":{"type":"object","description":"Type-specific payload. Async media artifacts (video / song) carry `apiJobId` (type-prefixed) + `pollUrl` — poll at GET /jobs/{id}. Image artifacts carry the image URL. Board artifacts carry `boardId` + card counts.","properties":{"apiJobId":{"type":"string","description":"Type-prefixed job id (vid_/song_) for async media artifacts."},"pollUrl":{"type":"string","description":"Poll path for async media artifacts (`/api/v1/jobs/{apiJobId}`)."}},"additionalProperties":true}},"required":["type","title"]},"ChatJsonResponse":{"type":"object","description":"The assembled non-streaming chat result (`stream: false`).","properties":{"conversationId":{"type":"string"},"mode":{"type":"string","enum":["fast","think"]},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ChatArtifact"}},"engine":{"type":"object","nullable":true,"description":"Which lab engine Theo orchestrated for this reply — the Theo tier plus the public lab and model name of the engine that actually answered (Theo walks a fallback chain; this is the one that succeeded). Public names only. `null` for white-label tenants.","properties":{"theoName":{"type":"string","description":"Theo tier name, e.g. `Theo Think`."},"lab":{"type":"string","description":"Lab key, e.g. `anthropic`, `google`, `openai`, `theovex`."},"labName":{"type":"string","description":"Public lab name, e.g. `Anthropic`."},"model":{"type":"string","description":"Public model name, e.g. `Claude Sonnet 5`."}},"required":["theoName","lab","labName","model"]}},"required":["role","content","artifacts"]},"usage":{"type":"object","properties":{"inputTokens":{"type":"integer","nullable":true},"outputTokens":{"type":"integer","nullable":true}}}},"required":["conversationId","message"]},"ChatRequest":{"type":"object","properties":{"conversationId":{"type":"string","description":"Continue an existing conversation (prior history loads server-side)."},"message":{"type":"string","description":"The prompt (shorthand for a single user message)."},"messages":{"type":"array","maxItems":40,"items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}},"required":["role","content"]}},"mode":{"type":"string","enum":["fast","think"],"description":"v1 launch modes."},"stream":{"type":"boolean","default":true,"description":"true = AI SDK UI-message SSE stream; false = assembled JSON message + artifacts."}}},"AgentMessageRequest":{"type":"object","description":"One message to a goal-driven Theo Agent. Reuse `threadId` to continue a conversation the agent remembers; omit it to start a new thread (the response carries the minted id).","properties":{"message":{"type":"string","maxLength":20000},"threadId":{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9_.:-]{1,64}$","description":"Caller-chosen conversation handle (letters, digits, `_ . : -`)."}},"required":["message"]},"AgentMessageAccepted":{"type":"object","properties":{"runId":{"type":"string"},"threadId":{"type":"string"},"agentId":{"type":"string"},"status":{"type":"string","enum":["queued"]},"resultUrl":{"type":"string","description":"Poll here for the reply (`GET /agents/{id}/runs/{runId}/result`)."}},"required":["runId","threadId","agentId","status","resultUrl"]},"AgentRunArtifact":{"type":"object","description":"Something the agent made: an OpenCharts project (editor or public link) or a downloadable file.","properties":{"kind":{"type":"string","enum":["project","file"]},"title":{"type":"string"},"url":{"type":"string","format":"uri"},"projectId":{"type":"string"},"fileId":{"type":"string"}},"required":["kind","title","url"]},"AgentRunResult":{"type":"object","description":"What a run produced. `queued` / `running` while the agent works; `paused` when an action needs the owner's approval (`pendingApproval` names it); `completed` with `reply` + `artifacts`; `failed` with `error`.","properties":{"runId":{"type":"string"},"agentId":{"type":"string"},"threadId":{"type":"string","nullable":true},"status":{"type":"string","enum":["queued","running","paused","completed","failed"]},"reply":{"type":"string","nullable":true,"description":"The agent's reply (markdown) once completed."},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/AgentRunArtifact"}},"pendingApproval":{"type":"object","nullable":true,"properties":{"runId":{"type":"string","description":"The exact paused segment being reviewed."},"actionSlug":{"type":"string"},"actionArgs":{"type":"object","additionalProperties":true},"plan":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"args":{"type":"object","additionalProperties":true}},"required":["slug","args"]}},"reviewToken":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Return this fingerprint unchanged with the decision."},"availableScopes":{"type":"array","items":{"type":"string","enum":["once","task","always"]}},"decisionRecorded":{"type":"boolean"},"approveUrl":{"type":"string"}},"required":["actionSlug","approveUrl"]},"error":{"type":"string","nullable":true},"creditsUsed":{"type":"integer"},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true},"pollUrl":{"type":"string"}},"required":["runId","agentId","status","reply","artifacts","pendingApproval","error","creditsUsed","pollUrl"]},"AgentRunApproveRequest":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reviewToken":{"type":"string","pattern":"^[a-f0-9]{64}$"},"scope":{"type":"string","enum":["once","task","always"],"default":"once","description":"Use only a scope offered in the review. Reject always uses once."}},"required":["decision","reviewToken"]},"AgentRunApproveAccepted":{"type":"object","properties":{"runId":{"type":"string"},"decision":{"type":"string","enum":["approve","reject"]},"status":{"type":"string","enum":["resuming","already_recorded"]}},"required":["runId","decision","status"]},"AgentUsage":{"type":"object","description":"The agent's own run + credit usage over the window (the same numbers it reports when asked what it cost).","properties":{"agentId":{"type":"string"},"days":{"type":"integer"},"since":{"type":"string"},"runs":{"type":"integer"},"creditsUsed":{"type":"integer"},"byStatus":{"type":"object","additionalProperties":{"type":"integer"}},"byTrigger":{"type":"object","additionalProperties":{"type":"integer"}},"avgDurationMs":{"type":"integer","nullable":true},"lastRunAt":{"type":"string","nullable":true},"truncated":{"type":"boolean"}},"required":["agentId","days","since","runs","creditsUsed","byStatus","byTrigger","truncated"]},"AgentCompletionRequest":{"type":"object","description":"An OpenAI chat-completions request aimed at a Theo Agent. Only the last `user` message is sent; the agent remembers the conversation by `metadata.thread_id` (or `user`). `stream: true` returns a protocol-compatible SSE stream that delivers the whole reply as one final chunk.","properties":{"model":{"type":"string","pattern":"^agent:[A-Za-z0-9_-]{1,64}$","description":"`agent:<agentId>`."},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant"]},"content":{"description":"A string, or OpenAI text content parts."}},"required":["role","content"]}},"stream":{"type":"boolean","default":false,"description":"false (default): the assembled JSON. true: an SSE stream with keepalive comments while the agent works, then one `chat.completion.chunk` with the full reply and `[DONE]`."},"user":{"type":"string","description":"Optional end-user id; doubles as the thread when `metadata.thread_id` is absent."},"metadata":{"type":"object","properties":{"thread_id":{"type":"string"}},"additionalProperties":true}},"required":["model","messages"]},"AgentCompletionResponse":{"type":"object","description":"A standard `chat.completion` object plus an `opencharts` extension.","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"}},"required":["role","content"]},"finish_reason":{"type":"string","enum":["stop"]}},"required":["index","message","finish_reason"]}},"usage":{"type":"object","description":"Raw engine tokens across the agent's turns (credits are billed separately at each engine's rate).","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}},"required":["prompt_tokens","completion_tokens","total_tokens"]},"opencharts":{"type":"object","properties":{"agentId":{"type":"string"},"runId":{"type":"string"},"threadId":{"type":"string"},"status":{"type":"string","enum":["completed","paused"]},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/AgentRunArtifact"}},"pendingApproval":{"type":"object","nullable":true,"properties":{"actionSlug":{"type":"string"},"approveUrl":{"type":"string"}}},"resultUrl":{"type":"string"}},"required":["agentId","runId","threadId","status","artifacts","resultUrl"]}},"required":["id","object","created","model","choices","opencharts"]},"ConversationCreate":{"type":"object","properties":{"title":{"type":"string","maxLength":256},"mode":{"type":"string","description":"Chat mode preference (e.g. `fast`, `think`)."}}},"ConversationUpdate":{"type":"object","properties":{"title":{"type":"string","maxLength":256},"mode":{"type":"string","description":"Chat mode preference (e.g. `fast`, `think`)."}}},"ExtractFlowchartRequest":{"type":"object","properties":{"documentBase64":{"type":"string","description":"Base64-encoded document content (no `data:` prefix). Max 10MB decoded."},"mimeType":{"type":"string","enum":["application/pdf","application/vnd.openxmlformats-officedocument.presentationml.presentation","image/png","image/jpeg","image/webp"]},"fileName":{"type":"string","description":"Original file name (used as a title fallback)."}},"required":["documentBase64","mimeType"]},"ImageRequest":{"type":"object","properties":{"prompt":{"type":"string"},"engine":{"type":"string","enum":["auto","theo-creative","theo-imagine","theo-photo","theo-rapid","theo-design","theo-studio","theo-type","theo-ultra","grok-theo"],"description":"Defaults to theo-ultra (highest fidelity) on paid plans; a Free-plan call falls back to theo-creative and the response carries a `notes` entry saying so. An explicit theo-ultra on Free returns 403. grok-theo (Grok + Theo, the xAI co-brand) is accepted only on workspaces that enable it; elsewhere it resolves to the default."},"aspectRatio":{"type":"string","enum":["1:1","16:9","9:16","4:3","3:4"]},"style":{"type":"string"},"referenceImageUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":5},"includeBase64":{"type":"boolean"}},"required":["prompt"]},"MoonlightImageRequest":{"type":"object","description":"A render on Theo Moonlight, the first-party image model OpenCharts serves on its own hardware. Safe-for-work only: a prompt describing adult content is refused (400), and a finished render the safety check scores as adult is refused (403) and not charged. Nothing is stored for the caller; the response carries the PNG bytes. With only a prompt the endpoint renders at its published defaults: 1024x1024, 8 steps, guidance 1, a random seed. Pass the same seed and prompt to reproduce a render.","properties":{"prompt":{"type":"string","maxLength":1500,"description":"The scene: subject, composition, lighting, style."},"negativePrompt":{"type":"string","maxLength":1000,"description":"Not used by this model: leave it out or send an empty string. A non-empty value is refused with a 400. Every render still goes through the endpoint's safety checks; they are not a knob."},"aspectRatio":{"type":"string","enum":["1:1","3:4","4:3","2:3","3:2","9:16","16:9"],"default":"1:1","description":"Frame shape. Every shape renders at about one megapixel; the response reports the exact width and height."},"seed":{"type":"integer","minimum":0,"maximum":999999999,"description":"Fix the seed to reproduce a render. Omit for a random one; the response echoes the seed used."}},"required":["prompt"]},"MoonlightImageResult":{"type":"object","properties":{"engine":{"type":"string","description":"The Theo model name that rendered it."},"base64":{"type":"string","description":"The PNG as a data URL (`data:image/png;base64,...`). Nothing is stored server-side."},"mimeType":{"type":"string","enum":["image/png"]},"width":{"type":"integer"},"height":{"type":"integer"},"aspectRatio":{"type":"string","enum":["1:1","3:4","4:3","2:3","3:2","9:16","16:9"]},"seed":{"type":"integer","description":"The seed actually used. Pass it back with the same prompt to reproduce the image."},"steps":{"type":"integer"},"cfg":{"type":"number","description":"Classifier-free guidance scale."},"prompt":{"type":"string"},"negativePrompt":{"type":"string","description":"The caller's own negative prompt (empty when none was sent)."},"renderMs":{"type":"integer","description":"Wall-clock time of the render itself, in milliseconds."}},"required":["engine","base64","mimeType","width","height","aspectRatio","seed","steps","cfg","prompt","negativePrompt","renderMs"]},"VideoRequest":{"type":"object","description":"A Theo Reel render. `modelTier` picks the engine: `fast` / `max` render a fixed ~8s 1080p clip (cheap, quick), while `cinema` / `cinema-ultra` are the premium tiers, offering longer takes, a selectable quality and length, six frame shapes, and many reference images. A premium render costs several times a standard one, so pick deliberately. Any knob the resolved tier cannot serve steps DOWN to its ceiling and the 202 response reports why in `notes`. Nothing is silently ignored, and nothing is refused for asking too much.","properties":{"prompt":{"type":"string","description":"The scene: subject, action, camera, setting, mood."},"aspectRatio":{"type":"string","enum":["21:9","16:9","4:3","1:1","3:4","9:16"],"description":"Frame shape. Default 16:9. The standard tiers render 16:9 and 9:16 only; another shape resolves to the NEAREST ratio they do render."},"modelTier":{"type":"string","enum":["fast","max","cinema","cinema-ultra"],"default":"max","description":"Which tier renders the clip. A premium tier on a workspace that has not enabled it lands on `max` with a note saying so."},"resolution":{"type":"string","enum":["480p","720p","1080p","4k"],"description":"Output quality. Premium tiers only; the standard tiers always render 1080p. `cinema` reaches 4k, and `cinema-ultra` tops out at 720p (it trades quality for length)."},"clipSeconds":{"type":"integer","minimum":4,"maximum":30,"description":"Clip length in seconds. Premium tiers only; the standard tiers render a fixed ~8s clip. `cinema` reaches 15s and `cinema-ultra` 30s; over a tier's ceiling clamps to its longest."},"referenceImageUrls":{"type":"array","items":{"type":"string","format":"uri"},"maxItems":30,"description":"ONE url = the opening frame to animate (image-to-video). SEVERAL = how the subject should look. Trimmed to the resolved tier's own budget (1 on the standard tiers, 9 on Cinema, 30 on Cinema Ultra); when only one survives it becomes the opening frame."},"referenceImageUrl":{"type":"string","format":"uri","description":"Single first-frame anchor. Kept for compatibility; prefer `referenceImageUrls`. Passing both puts this one first."}},"required":["prompt"]},"SongRequest":{"type":"object","properties":{"style":{"type":"string"},"title":{"type":"string"},"lyrics":{"type":"string"},"autoLyrics":{"type":"boolean"},"instrumental":{"type":"boolean"},"tier":{"type":"string","enum":["auto","premium","fast"]}},"required":["style"]},"CodeBuildRequest":{"type":"object","properties":{"prompt":{"type":"string"},"name":{"type":"string"},"framework":{"type":"string","enum":["html","react","auto"]},"planFirst":{"type":"boolean"}},"required":["prompt"]},"RealWorldSpaceRequest":{"type":"object","description":"A Theo Real World SPACE, from exactly ONE of three inputs. `imageUrls`: one to 8 photos of ONE room, taken from one spot and turning between shots so each overlaps the last. `videoUrl`: one video of the room, 30 seconds and 100 MB or less. Either builds a ROOM: Theo works out where each photo was taken, builds the room and imagines every wall, floor and corner the photos did not show; a walkable quick room lands on the poll in about a minute, the full room at real scale (with `metricScale`, a 360 panorama and a collider mesh) completes the job a few minutes later. `imageUrl`: one photo alone; on a deployment without the room engine it becomes a measured, imagined, walkable space instead (Theo measures the room from the photo with a metric depth model, the 360 preview and the dimensions land first, the walkable shell after). Everything the photos did not show is generated and every result says so (`imagined: true`); dimensions, when present, are estimates (monocular scale is typically within 5 to 15 percent). Returns a `space_`-prefixed job; poll it at GET /jobs/{id}. Credits are charged once at dispatch. Photos of two different rooms in one request confuse the build: another room is another request. Not the right tool for an object or a person (those are captures, not on this API).","properties":{"imageUrl":{"type":"string","format":"uri","maxLength":2048,"description":"ONE photo, as an http(s) URL the server can fetch (JPEG, PNG or WebP). Wide and level, with the floor and a wall in view. Send this OR `imageUrls` OR `videoUrl`."},"imageUrls":{"type":"array","items":{"type":"string","format":"uri","maxLength":2048},"minItems":1,"maxItems":8,"description":"One to 8 photos of ONE room (JPEG, PNG or WebP), http(s) URLs the server can fetch, in the order they were taken: stand in one spot and turn between shots so each overlaps the last. Needs the room engine; a deployment without it answers 503."},"videoUrl":{"type":"string","format":"uri","maxLength":2048,"description":"One video of the room (MP4, MOV or WebM; 30 seconds and 100 MB or less), an http(s) URL the server can fetch: one slow, level sweep from one spot. The whole input; do not send photos beside it. Needs the room engine; a deployment without it answers 503."},"quality":{"type":"string","enum":["preview","full"],"default":"full","description":"`preview` stops at the first tier: the quick room (about 90 seconds; walkable in its own units), or the 360 panorama plus the dimensions on a one-photo space. `full` (default) continues to the final tier: the full room at real scale (about 8 minutes in total) or the walkable space (about 3 minutes), and costs more."},"title":{"type":"string","maxLength":80,"description":"Optional label for the job; a room also reads it as a short description of the room."}}},"RealWorldSpaceResult":{"type":"object","description":"The `result` of a `space` job (GET /jobs/{id}). Arrives in two tiers on the same job: `stage: preview` (the first tier, while the job is still processing) and `stage: space` (the final tier landed, the job is complete). On a ROOM (several photos or a video) the preview is already a walkable quick room: `spaceUrl` is set, in the room's own units, `metricScale` null; the `space` stage is the full room at real scale, with `metricScale`, the 360 panorama and the collider. On a one-photo space the preview is the 360 panorama plus the dimensions (`spaceUrl` null) and the `space` stage is the walkable shell. A completed job may stay at `preview` when only the preview was asked for, or when the final tier did not finish; `notes` then says so. File URLs are absolute and public.","properties":{"stage":{"type":"string","enum":["preview","space"]},"imagined":{"type":"boolean","description":"Always true: everything the photos did not show was generated."},"source":{"type":"string","enum":["photo","photos","video"],"description":"What the space was built from."},"photoCount":{"type":"integer","description":"How many photos went in (0 for a video)."},"panoramaUrl":{"type":"string","format":"uri","nullable":true,"description":"The 360 panorama (equirectangular; JPEG on a one-photo space, PNG on a room), when it has landed. A room's quick tier has none yet."},"spaceUrl":{"type":"string","format":"uri","nullable":true,"description":"The walkable space as a Gaussian splat (.spz). Null until a walkable tier lands: from the preview stage on for a room, from the space stage on for a one-photo space. On a room this is the 500k-Gaussian build (about 7 MB), the file to stream first."},"spaceFullUrl":{"type":"string","format":"uri","nullable":true,"description":"A room's full-resolution splat (about 2M Gaussians, about 28 MB) once the full room has landed: the file to show when detail matters. Null on the quick room and on a one-photo space."},"format":{"type":"string","enum":["spz"],"nullable":true},"metricScale":{"type":"number","nullable":true,"description":"Multiply the splat's coordinates by this to get metres. 1 on a one-photo space (its splat is written in metres); on a room, null while only the quick tier is there (walk it in its own units) and the engine's factor once the full room lands."},"floorOffsetM":{"type":"number","nullable":true,"description":"A room: after scaling, the floor sits this far down the Y axis, in metres. Null on a one-photo space."},"colliderUrl":{"type":"string","format":"uri","nullable":true,"description":"A room: the collider mesh (GLB) for walking and placement, when the engine gave one."},"depthUrl":{"type":"string","format":"uri","nullable":true,"description":"The 360 distance map (16-bit PNG, millimetres), when available (a one-photo space)."},"posterUrl":{"type":"string","format":"uri","nullable":true},"gaussians":{"type":"integer","nullable":true,"description":"How many Gaussians the walkable space carries."},"dimensions":{"type":"object","nullable":true,"description":"The room as measured from ONE photo (the one-photo space engine). Null on a room built from several photos or a video: its scale is the engine's (`metricScale`), not an estimate. Every value is an estimate with a confidence; `lowerBound: true` means a wall the photo did not show makes the number a floor (at least this much).","properties":{"widthM":{"$ref":"#/components/schemas/RealWorldMeasurement"},"depthM":{"$ref":"#/components/schemas/RealWorldMeasurement"},"ceilingM":{"$ref":"#/components/schemas/RealWorldMeasurement"},"cameraHeightM":{"$ref":"#/components/schemas/RealWorldMeasurement"},"floorAreaM2":{"$ref":"#/components/schemas/RealWorldMeasurement"},"fovDeg":{"type":"object","nullable":true,"properties":{"x":{"type":"number"},"y":{"type":"number"}}},"wallsSeen":{"type":"integer","description":"How many walls the photo showed (the far wall counts)."},"summary":{"type":"string","description":"The one-line reading the product shows, e.g. `About 3.6 m wide x 5.6 m deep, ceiling about 3.0 m, estimated from your photo`."}}},"engine":{"type":"string","description":"The engine's public name (Theo Real World)."},"notes":{"type":"array","items":{"type":"string"},"description":"Plain-language notes, e.g. the final tier did not finish and the preview stands."}},"required":["stage","imagined","source","panoramaUrl","spaceUrl","spaceFullUrl","metricScale","engine"]},"RealWorldMeasurement":{"type":"object","nullable":true,"properties":{"value":{"type":"number","description":"Metres (square metres for the floor area)."},"confidence":{"type":"number","minimum":0,"maximum":1},"lowerBound":{"type":"boolean","description":"True when the value is a floor rather than a measurement."}},"required":["value","confidence","lowerBound"]},"ResearchRequest":{"type":"object","properties":{"query":{"type":"string"}},"required":["query"],"additionalProperties":true},"ResearchJobStatus":{"type":"object","description":"LEGACY research poll shape (GET /research/{jobId} only). The canonical poll is GET /jobs/{id} with the res_-prefixed id, which returns the neutral JobEnvelope.","properties":{"jobId":{"type":"string","description":"The raw pipeline job id (no res_ prefix)."},"status":{"type":"string","description":"The pipeline's raw status token. `complete`, `partial`, and `failed` are terminal."},"isComplete":{"type":"boolean","description":"True once the job reached a terminal, non-failed state (`complete` or `partial`)."},"content":{"type":"string","nullable":true,"description":"The markdown report (terminal states)."},"sources":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"domain":{"type":"string"}}}},"searchCount":{"type":"integer"},"readCount":{"type":"integer"},"totalTokens":{"type":"integer"},"errorMessage":{"type":"string","nullable":true},"startedAt":{"type":"string","nullable":true},"completedAt":{"type":"string","nullable":true}},"required":["jobId","status","isComplete"]},"SheetOpsRequest":{"type":"object","properties":{"ops":{"type":"array","items":{"type":"object","additionalProperties":true}},"propose":{"type":"boolean"},"summary":{"type":"string"}},"required":["ops"]},"SheetEditRequest":{"type":"object","properties":{"instruction":{"type":"string"},"propose":{"type":"boolean"}},"required":["instruction"]},"WebhookCreate":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["project.created","project.updated","project.shared","project.deleted","team.member_added","team.member_removed","export.completed","meeting.completed","code_canvas.iteration_complete","code_canvas.iteration_failed","code_canvas.published","podcast.completed","podcast.failed","notes_movie.completed","notes_movie.failed","skill.installed","evi.run_completed","evi.run_failed","video.completed","video.failed","song.completed","song.failed","code_build.completed","code_build.failed","research.completed","research.failed","space.completed","space.failed","presentation.completed","presentation.failed","email.received","form.submitted"]},"minItems":1,"description":"Event names to subscribe to. The enum lists every currently emitted event (generated from the same registry the dispatcher validates against); unknown or not-yet-emitted events return a 400 naming them. Naming note: the `code` job type (job ids `code_...`) emits `code_build.*`, and Theo Agent runs emit `evi.run_*`."}},"required":["name","url","events"]},"WebhookUpdate":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["project.created","project.updated","project.shared","project.deleted","team.member_added","team.member_removed","export.completed","meeting.completed","code_canvas.iteration_complete","code_canvas.iteration_failed","code_canvas.published","podcast.completed","podcast.failed","notes_movie.completed","notes_movie.failed","skill.installed","evi.run_completed","evi.run_failed","video.completed","video.failed","song.completed","song.failed","code_build.completed","code_build.failed","research.completed","research.failed","space.completed","space.failed","presentation.completed","presentation.failed","email.received","form.submitted"]}},"isActive":{"type":"boolean"}}},"DriveFile":{"type":"object","description":"A Drive file. Storage internals are never exposed; use GET /drive/files/{id} for a downloadUrl and /drive/files/{id}/text for the extracted text.","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["image","video","audio","pdf","document","spreadsheet","presentation","text","code","archive","other"]},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"ext":{"type":"string","description":"Lowercased extension without the dot; empty when none."},"folderId":{"type":"string","nullable":true,"description":"Drive folder id; null for the Drive root."},"isStarred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"trashedAt":{"type":"string","nullable":true,"description":"Set while the file is in the trash (30-day restore window)."},"lastAccessedAt":{"type":"string","nullable":true},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"previewPath":{"type":"string","description":"In-app preview page (relative)."},"previewUrl":{"type":"string","nullable":true,"description":"Absolute in-app preview URL (returned on create)."}},"required":["id","name","kind","mimeType","sizeBytes","folderId","isStarred","tags","createdAt","updatedAt"]},"DriveFileHandle":{"type":"object","description":"A Drive file's metadata plus a time-limited handle for its raw bytes.","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string"},"mimeType":{"type":"string"},"sizeBytes":{"type":"integer"},"folderId":{"type":"string","nullable":true},"trashedAt":{"type":"string","nullable":true},"downloadUrl":{"type":"string","nullable":true,"description":"Absolute URL that streams the raw bytes with a plain GET (no headers). Valid for about 15 minutes; null for trashed files. Access is re-checked on every request, so revoking the key stops it immediately."},"downloadExpiresAt":{"type":"string","nullable":true},"previewUrl":{"type":"string","nullable":true}},"required":["id","name","kind","mimeType","sizeBytes","folderId","downloadUrl","downloadExpiresAt"]},"DriveFileText":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/DriveFile"},"content":{"type":"string","description":"Extracted text (UTF-8 for text and code; parsed for PDF and Office documents)."},"truncated":{"type":"boolean","description":"True when the tail was dropped at the character cap."}},"required":["file","content","truncated"]},"DriveFileList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/DriveFile"}},"total":{"type":"integer"},"hasMore":{"type":"boolean"},"folders":{"type":"array","items":{"$ref":"#/components/schemas/DriveFolder"}},"storage":{"type":"object","nullable":true,"properties":{"bytesUsed":{"type":"integer"},"quotaBytes":{"type":"integer"},"fileCount":{"type":"integer"}}},"scope":{"type":"object","description":"Which Drive this listing is: the caller's own, or a Team Drive (read-only over the API).","properties":{"type":{"type":"string","enum":["personal","team"]},"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}}},"teams":{"type":"array","description":"Team Drives the caller can browse read-only via teamId (empty when none).","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}}}}},"required":["data","total","hasMore","folders","scope","teams"]},"DriveFolder":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parentFolderId":{"type":"string","nullable":true},"fileCount":{"type":"integer"}},"required":["id","name","parentFolderId","fileCount"]},"DriveFileCreate":{"type":"object","description":"Provide exactly one of `content` (text formats: md, txt, csv, html, json; up to 2 MB) or `contentBase64` (any format, up to 4 MB decoded). Larger files must be uploaded from the Drive page or the desktop app.","properties":{"name":{"type":"string","description":"File name WITH extension (e.g. `Q3 summary.md`, `chart.png`).","maxLength":255},"content":{"type":"string","description":"UTF-8 text content (text formats only)."},"contentBase64":{"type":"string","description":"Base64-encoded bytes for any format, no `data:` prefix (4 MB decoded max)."},"folderId":{"type":"string","nullable":true,"description":"Destination Drive folder id; omit or `root` for the Drive root."},"description":{"type":"string","maxLength":2000},"tags":{"type":"array","items":{"type":"string"},"maxItems":20}},"required":["name"]},"DriveFileUpdate":{"type":"object","description":"Only the fields you pass change.","properties":{"name":{"type":"string","maxLength":255},"folderId":{"type":"string","nullable":true,"description":"Destination Drive folder id, or `root`."},"isStarred":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"},"maxItems":20},"description":{"type":"string","maxLength":2000}}},"DriveBulkRequest":{"type":"object","properties":{"fileIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":100},"action":{"type":"string","enum":["move","star","unstar","trash","restore"],"description":"trash is the destructive floor (30-day restore); there is no permanent delete."},"folderId":{"type":"string","nullable":true,"description":"For move: the destination Drive folder id, or `root`."}},"required":["fileIds","action"]},"DriveBulkResult":{"type":"object","properties":{"action":{"type":"string"},"succeeded":{"type":"array","items":{"type":"string"}},"failed":{"type":"array","items":{"type":"object","properties":{"fileId":{"type":"string"},"reason":{"type":"string"}},"required":["fileId","reason"]}}},"required":["action","succeeded","failed"]},"DriveSearchResult":{"type":"object","properties":{"query":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"file":{"$ref":"#/components/schemas/DriveFile"},"source":{"type":"string","enum":["owned","shared"]},"sharedByName":{"type":"string"},"excerpt":{"type":"string","description":"Excerpt from INSIDE the file when content search matched it."},"matchedContent":{"type":"boolean"}},"required":["file","source"]}},"total":{"type":"integer"},"note":{"type":"string","description":"Present on an empty result: content indexing is lazy, so a file may exist but not be indexed yet."}},"required":["query","data","total"]},"DriveFolderCreate":{"type":"object","properties":{"name":{"type":"string","maxLength":128},"parentFolderId":{"type":"string","nullable":true,"description":"Parent Drive folder id; omit for the Drive root."},"color":{"type":"string","description":"Optional hex color."},"sticker":{"type":"string","description":"Optional single emoji."}},"required":["name"]},"SpeechRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000,"description":"One sentence or short line to speak. Speak a longer reply one sentence per call."},"voice":{"type":"string","description":"A voice name from GET /speech/voices, such as `lucius`. Omit (or send `default`) for Theo's default voice."}},"required":["text"]},"SpeechVoiceList":{"type":"object","properties":{"voices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The name to pass as `voice`."},"label":{"type":"string"},"description":{"type":"string"},"default":{"type":"boolean"}},"required":["id","label","description","default"]}},"default":{"type":"string","nullable":true,"description":"The id of the default voice."}},"required":["voices","default"]},"LiveSessionRequest":{"type":"object","description":"Everything is optional. The persona, tools, turn detection and transcription are fixed by the server and locked into the token.","properties":{"persona":{"type":"string","enum":["aibi"],"description":"Who Theo is in the conversation. `aibi` (the default) is Theo talking through the AIBI desk robot."},"voice":{"type":"string","description":"A voice name from GET /speech/voices, such as `lucius`. Omit (or send `default`) for Theo's default voice."},"resumptionHandle":{"type":"string","maxLength":2048,"description":"The latest resumption handle a dropped session sent. The new token continues that conversation and is not charged again."},"deviceName":{"type":"string","maxLength":60,"description":"The robot's own name (for example `AIBI-133E`), so Theo can refer to it."},"ambient":{"type":"boolean","description":"An always-listening session: Theo stays quiet unless someone speaks to him. Needs `features.proactiveAudio`; refused with a 400 when the deployment's engine lacks it."}}},"LiveSession":{"type":"object","description":"Connect to the realtime engine with `token` as the API key, `model` as the model and `apiVersion` as the API version, all exactly as returned. Stream 16 kHz mono PCM16 up; Theo's voice arrives as 24 kHz mono PCM16.","properties":{"token":{"type":"string","description":"The short-lived token. It opens one session."},"expiresAt":{"type":"string","format":"date-time","description":"After this the session's messages are refused; resume with a fresh token."},"newSessionExpiresAt":{"type":"string","format":"date-time","description":"Connect before this."},"model":{"type":"string","description":"The realtime model id the token is locked to. Connect with exactly this value."},"apiVersion":{"type":"string","description":"The realtime API version the token works with."},"persona":{"type":"string","enum":["aibi"]},"voice":{"type":"string","description":"The voice the token is locked to, by name."},"features":{"type":"object","description":"What the deployment's realtime engine can do. Adapt to it.","properties":{"asyncTools":{"type":"boolean","description":"Tool calls run in the background while Theo keeps talking; send each result back with a scheduling hint. When false, a tool call pauses the conversation until you answer it."},"proactiveAudio":{"type":"boolean","description":"Theo can stay silent when speech is not meant for him. Required for `ambient`."}},"required":["asyncTools","proactiveAudio"]},"resumed":{"type":"boolean","description":"True when the token continues a session (no charge)."}},"required":["token","expiresAt","newSessionExpiresAt","model","apiVersion","persona","voice","features","resumed"]},"LiveActionRequest":{"type":"object","properties":{"action":{"type":"string","enum":["search_web","create_presentation","create_notes","create_flowchart","create_whiteboard","generate_image","list_projects","get_account_status","save_memory"],"description":"The server tool the conversation called. Tools the caller runs itself (the robot's own) never come here."},"params":{"type":"object","additionalProperties":true,"description":"The call's arguments, exactly as the conversation produced them."}},"required":["action"]},"LiveActionResult":{"type":"object","description":"A tool that ran and failed is still a 200, with `success: false` and a line the conversation can say.","properties":{"success":{"type":"boolean"},"summary":{"type":"string","description":"Hand this back to the conversation as the tool's result."},"artifact":{"type":"object","nullable":true,"description":"What the tool made, when it made something.","properties":{"type":{"type":"string","description":"For example presentation, notes, flowchart, whiteboard, image, web_search."},"title":{"type":"string","nullable":true},"projectId":{"type":"string","nullable":true},"openUrl":{"type":"string","nullable":true,"description":"Absolute link that opens it in OpenCharts."},"imageUrl":{"type":"string","nullable":true,"description":"A generated image."},"links":{"type":"array","description":"A web search's sources (at most five).","items":{"type":"object","properties":{"title":{"type":"string"},"url":{"type":"string"},"domain":{"type":"string","nullable":true}},"required":["title","url","domain"]}},"job":{"allOf":[{"$ref":"#/components/schemas/JobEnvelope"}],"nullable":true,"description":"A presentation's background build (`type: deck`). Poll its `pollUrl`."}},"required":["type","title","projectId","openUrl","imageUrl","links","job"]}},"required":["success","summary","artifact"]}},"responses":{"BadRequest":{"description":"Invalid request (validation error).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key lacks the required scope, or the plan lacks API access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"The resource was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/openapi":{"get":{"operationId":"get_openapi","summary":"Fetch this OpenAPI document.","tags":["Meta"],"x-required-scope":"public","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"security":[]}},"/account":{"get":{"operationId":"get_account","summary":"Get the authenticated account (whoami).","tags":["Account"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/account/credits":{"get":{"operationId":"get_account_credits","summary":"Get the plan + AI credit balance.","tags":["Account"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/personas":{"get":{"operationId":"get_personas","summary":"List personas.","tags":["Personas"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_personas","summary":"Create a persona.","tags":["Personas"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/personas/{id}":{"get":{"operationId":"get_personas_id","summary":"Get a persona.","tags":["Personas"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_personas_id","summary":"Update a persona.","tags":["Personas"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"delete":{"operationId":"delete_personas_id","summary":"Delete a persona.","tags":["Personas"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/personas/{id}/publish":{"post":{"operationId":"post_personas_id_publish","summary":"Publish a persona.","tags":["Personas"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/personas/{id}/deployments":{"get":{"operationId":"get_personas_id_deployments","summary":"List a persona's deployments.","tags":["Personas"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"post":{"operationId":"post_personas_id_deployments","summary":"Create a persona deployment.","tags":["Personas"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/personas/{id}/conversations":{"post":{"operationId":"post_personas_id_conversations","summary":"Start a persona conversation.","tags":["Personas"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/personas/{id}/conversations/{cid}/end":{"post":{"operationId":"post_personas_id_conversations_cid_end","summary":"End a persona conversation.","tags":["Personas"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"},"description":"The `cid` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/personas/{id}/conversations/{cid}/events":{"get":{"operationId":"get_personas_id_conversations_cid_events","summary":"List conversation events.","tags":["Personas"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"cid","in":"path","required":true,"schema":{"type":"string"},"description":"The `cid` path parameter."}]}},"/personas/faces":{"get":{"operationId":"get_personas_faces","summary":"List available persona faces.","tags":["Personas"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/projects":{"get":{"operationId":"get_projects","summary":"List projects.","tags":["Projects"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/projects/{id}":{"get":{"operationId":"get_projects_id","summary":"Get a project.","tags":["Projects"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_projects_id","summary":"Update a project's metadata or content.","tags":["Projects"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"delete":{"operationId":"delete_projects_id","summary":"Delete a project.","tags":["Projects"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/flowcharts":{"post":{"operationId":"post_flowcharts","summary":"Create a flowchart project.","tags":["Creation"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/whiteboards":{"post":{"operationId":"post_whiteboards","summary":"Create a whiteboard project.","tags":["Creation"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/notes":{"post":{"operationId":"post_notes","summary":"Create a notes project.","tags":["Creation"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/presentations":{"post":{"operationId":"post_presentations","summary":"Create a presentation from a brief or outline. The slides generate in the background: poll the returned `job` (a deck_-prefixed id) at GET /jobs/{id} until it completes. Send an Idempotency-Key header to make retries safe.","tags":["Creation"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresentationCreateResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresentationCreate"}}}}}},"/templates":{"get":{"operationId":"get_templates","summary":"List templates.","tags":["Creation"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/templates/{id}/use":{"post":{"operationId":"post_templates_id_use","summary":"Create a project from a template.","tags":["Creation"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/sheets":{"get":{"operationId":"get_sheets","summary":"List sheets.","tags":["Sheets"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_sheets","summary":"Create a sheet.","tags":["Sheets"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/sheets/{id}":{"get":{"operationId":"get_sheets_id","summary":"Read a sheet's rows.","tags":["Sheets"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/sheets/{id}/range":{"get":{"operationId":"get_sheets_id_range","summary":"Read a sheet range.","tags":["Sheets"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/sheets/{id}/ops":{"post":{"operationId":"post_sheets_id_ops","summary":"Apply or propose structured sheet ops.","tags":["Sheets"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SheetOpsRequest"}}}}}},"/sheets/{id}/edit":{"post":{"operationId":"post_sheets_id_edit","summary":"Edit a sheet with a natural-language instruction.","tags":["Sheets"],"x-required-scope":"ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SheetEditRequest"}}}}}},"/sheets/{id}/commits":{"get":{"operationId":"get_sheets_id_commits","summary":"List a sheet's commits.","tags":["Sheets"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/sheets/{id}/commits/{commitId}":{"get":{"operationId":"get_sheets_id_commits_commitId","summary":"Get a commit diff.","tags":["Sheets"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"commitId","in":"path","required":true,"schema":{"type":"string"},"description":"The `commitId` path parameter."}]}},"/sheets/{id}/commits/{commitId}/resolve":{"post":{"operationId":"post_sheets_id_commits_commitId_resolve","summary":"Merge or reject a proposed commit.","tags":["Sheets"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"commitId","in":"path","required":true,"schema":{"type":"string"},"description":"The `commitId` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/sheets/{id}/rollback":{"post":{"operationId":"post_sheets_id_rollback","summary":"Roll a sheet back to a commit.","tags":["Sheets"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/boards":{"get":{"operationId":"get_boards","summary":"List boards.","tags":["Boards"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_boards","summary":"Create a board.","tags":["Boards"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/boards/{id}":{"get":{"operationId":"get_boards_id","summary":"Get a board.","tags":["Boards"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_boards_id","summary":"Update a board.","tags":["Boards"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"delete":{"operationId":"delete_boards_id","summary":"Delete a board.","tags":["Boards"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/boards/{id}/duplicate":{"post":{"operationId":"post_boards_id_duplicate","summary":"Duplicate a board.","tags":["Boards"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/boards/{id}/cards":{"get":{"operationId":"get_boards_id_cards","summary":"List a board's cards.","tags":["Boards"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"post":{"operationId":"post_boards_id_cards","summary":"Create a card.","tags":["Boards"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/boards/{id}/cards/{cardId}":{"patch":{"operationId":"patch_boards_id_cards_cardId","summary":"Update a card.","tags":["Boards"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"cardId","in":"path","required":true,"schema":{"type":"string"},"description":"The `cardId` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}},"delete":{"operationId":"delete_boards_id_cards_cardId","summary":"Delete a card.","tags":["Boards"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"cardId","in":"path","required":true,"schema":{"type":"string"},"description":"The `cardId` path parameter."}]}},"/chat":{"post":{"operationId":"post_chat","summary":"Run a Theo chat turn (UI-message SSE stream by default; `stream: false` for the assembled message + artifacts).","tags":["Chat"],"x-required-scope":"ai","responses":{"200":{"description":"Default (`stream: true`): a Server-Sent Events stream in the AI SDK UI-message protocol (`Content-Type: text/event-stream`; protocol marker header `x-vercel-ai-ui-message-stream: v1`). Each event is `data: <json>` with a `type` discriminator (`start`, `start-step`, `text-start`, `text-delta`, `text-end`, `reasoning-*`, `tool-input-start`, `tool-input-delta`, `tool-input-available`, `tool-output-available`, `finish-step`, `finish`, `error`), terminated by `data: [DONE]`. Tool artifacts arrive as the `output` of `tool-output-available` events. With `stream: false`: the assembled JSON message + artifacts.","content":{"text/event-stream":{"schema":{"type":"string","description":"AI SDK UI-message SSE chunks (`data: <json>` per event, `data: [DONE]` terminator)."}},"application/json":{"schema":{"$ref":"#/components/schemas/ChatJsonResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatRequest"}}}}}},"/chat/completions":{"post":{"operationId":"post_chat_completions","summary":"OpenAI-compatible chat completion over a Theo Agent (`model: \"agent:<agentId>\"`; the agent runs inline and replies, as JSON or as a single-chunk SSE stream when `stream: true`).","tags":["Agents"],"x-required-scope":"ai","responses":{"200":{"description":"Default (`stream` false or omitted): the assembled `chat.completion` JSON. With `stream: true`: a Server-Sent Events stream (`Content-Type: text/event-stream`) that sends SSE comments as keepalives while the agent works, then ONE `chat.completion.chunk` event carrying the whole assistant message (`delta.role`, `delta.content`, `finish_reason: stop`, plus the `opencharts` extension), a usage-only chunk, and `data: [DONE]`. No token-level streaming.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCompletionResponse"}},"text/event-stream":{"schema":{"type":"string","description":"OpenAI `chat.completion.chunk` SSE events (`data: <json>` per event, `data: [DONE]` terminator)."}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCompletionRequest"}}}}}},"/conversations":{"get":{"operationId":"get_conversations","summary":"List conversations.","tags":["Conversations"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_conversations","summary":"Create a conversation.","tags":["Conversations"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}}}},"/conversations/{id}":{"get":{"operationId":"get_conversations_id","summary":"Get a conversation.","tags":["Conversations"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_conversations_id","summary":"Update a conversation's title or mode.","tags":["Conversations"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}}},"delete":{"operationId":"delete_conversations_id","summary":"Delete a conversation and its messages.","tags":["Conversations"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/conversations/{id}/messages":{"get":{"operationId":"get_conversations_id_messages","summary":"List a conversation's messages (oldest first).","tags":["Conversations"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/extract-flowchart":{"post":{"operationId":"post_extract_flowchart","summary":"Extract a flowchart project from a document (PDF, PPTX, or image).","tags":["Media"],"x-required-scope":"ai","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractFlowchartRequest"}}}}}},"/images":{"post":{"operationId":"post_images","summary":"Generate an image synchronously.","tags":["Media"],"x-required-scope":"ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageRequest"}}}}}},"/images/moonlight":{"post":{"operationId":"post_images_moonlight","summary":"Generate an image on Theo Moonlight, our own image model, synchronously (safe-for-work only; seedable; renders at the published defaults unless told otherwise).","tags":["Media"],"x-required-scope":"ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoonlightImageResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoonlightImageRequest"}}}}}},"/videos":{"post":{"operationId":"post_videos","summary":"Start a video generation job (pick a tier: Fast, Max, Cinema, or Cinema Ultra).","tags":["Media"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"}}}}}},"/songs":{"post":{"operationId":"post_songs","summary":"Start a song generation job.","tags":["Media"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SongRequest"}}}}}},"/code-builds":{"post":{"operationId":"post_code_builds","summary":"Start a Code Canvas build job.","tags":["Media"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CodeBuildRequest"}}}}}},"/real-world/spaces":{"post":{"operationId":"post_real_world_spaces","summary":"Start a Theo Real World space job: photos of ONE room (up to 8, or one short video of it) become an imagined, walkable 3D room at real scale (a quick room in about a minute, the full room a few minutes later); a single photo alone becomes a measured, imagined, walkable space (a 360 preview with the room's dimensions, then a walkable .spz).","tags":["Media"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RealWorldSpaceRequest"}}}}}},"/jobs/{id}":{"get":{"operationId":"get_jobs_id","summary":"Poll any async job by its type-prefixed id.","tags":["Jobs"],"x-required-scope":"read | ai","responses":{"200":{"description":"The job's current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/speech":{"post":{"operationId":"post_speech","summary":"Speak one short line in one of Theo's voices, streamed back as raw 24 kHz mono PCM while it is produced. Send a longer reply one sentence per call. Charged per character spoken.","tags":["Voice"],"x-required-scope":"ai","responses":{"200":{"description":"Raw PCM audio, streamed as it is produced: signed 16-bit little-endian, mono, 24 kHz (`Content-Type: audio/pcm; rate=24000; channels=1; encoding=s16le`, also announced in the `X-Theo-Audio-Rate` header). Play the bytes as they arrive; nothing is stored.","content":{"audio/pcm":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechRequest"}}}}}},"/speech/voices":{"get":{"operationId":"get_speech_voices","summary":"List Theo's voices by name (pass one as `voice` to POST /speech).","tags":["Voice"],"x-required-scope":"read | ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeechVoiceList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/live/session":{"post":{"operationId":"post_live_session","summary":"Open a real-time voice conversation with Theo. Returns a short-lived token, locked to the persona, tools, voice and turn detection, that you connect to the realtime engine with to stream microphone audio up and Theo's voice back. A new session is charged once; resuming a dropped one with its handle is free.","tags":["Voice"],"x-required-scope":"ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSession"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveSessionRequest"}}}}}},"/live/action":{"post":{"operationId":"post_live_action","summary":"Run one of a live conversation's server tools (search, presentations, notes, flowcharts, whiteboards, images, projects, account, memory). Returns the line to hand back to the conversation and what was made. Charged per tool, only when it succeeds.","tags":["Voice"],"x-required-scope":"ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveActionResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LiveActionRequest"}}}}}},"/agents/{id}/run":{"post":{"operationId":"post_agents_id_run","summary":"Dispatch a Theo Agent.","tags":["Agents"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}},"/agents/{id}/messages":{"post":{"operationId":"post_agents_id_messages","summary":"Send a message to a goal-driven agent on a conversation thread (returns the run id to poll for the reply).","tags":["Agents"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted: the work continues in the background.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentMessageRequest"}}}}}},"/agents/{id}/runs":{"get":{"operationId":"get_agents_id_runs","summary":"List an agent's runs.","tags":["Agents"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/agents/{id}/runs/{runId}":{"get":{"operationId":"get_agents_id_runs_runId","summary":"Get an agent run's status.","tags":["Agents"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"runId","in":"path","required":true,"schema":{"type":"string"},"description":"The `runId` path parameter."}]}},"/agents/{id}/runs/{runId}/result":{"get":{"operationId":"get_agents_id_runs_runId_result","summary":"Get an agent run's result: the reply, artifacts, pending approval, credits.","tags":["Agents"],"x-required-scope":"read | ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"runId","in":"path","required":true,"schema":{"type":"string"},"description":"The `runId` path parameter."}]}},"/agents/{id}/runs/{runId}/approve":{"post":{"operationId":"post_agents_id_runs_runId_approve","summary":"Approve or reject the action a paused agent run is waiting on (owner only).","tags":["Agents"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted: the work continues in the background.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunApproveAccepted"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."},{"name":"runId","in":"path","required":true,"schema":{"type":"string"},"description":"The `runId` path parameter."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRunApproveRequest"}}}}}},"/agents/{id}/usage":{"get":{"operationId":"get_agents_id_usage","summary":"Get an agent's run + credit usage over a window (`?days=7`, 1 to 90).","tags":["Agents"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentUsage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/research":{"post":{"operationId":"post_research","summary":"Start a deep-research job (returns a res_-prefixed job id; poll it at GET /jobs/{id}).","tags":["Research"],"x-required-scope":"ai","responses":{"202":{"description":"Accepted — an async job was started.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchRequest"}}}}}},"/research/{jobId}":{"get":{"operationId":"get_research_jobId","summary":"Poll a deep-research job (legacy alias of GET /jobs/{id}; accepts raw or res_-prefixed ids).","tags":["Research"],"x-required-scope":"read | ai","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResearchJobStatus"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string"},"description":"The `jobId` path parameter."}]}},"/drive/files":{"get":{"operationId":"get_drive_files","summary":"List Drive files plus the folder tree and storage meter (filters: folderId, kind, starred, trash, teamId, limit).","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_drive_files","summary":"Save a new file into Drive as text (content) or any format as base64 (contentBase64, up to 4 MB).","tags":["Drive"],"x-required-scope":"drive:write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileCreate"}}}}}},"/drive/files/{id}":{"get":{"operationId":"get_drive_files_id","summary":"Get a Drive file's metadata plus a time-limited downloadUrl for its raw bytes.","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileHandle"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_drive_files_id","summary":"Rename, move, star, tag or describe a Drive file.","tags":["Drive"],"x-required-scope":"drive:write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileUpdate"}}}}}},"/drive/files/{id}/content":{"get":{"operationId":"get_drive_files_id_content","summary":"Redirect (302) to a signed, time-limited stream of the file's raw bytes; follow redirects to download.","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/drive/files/{id}/text":{"get":{"operationId":"get_drive_files_id_text","summary":"Read a Drive file as text (PDF and Office documents are parsed), capped at about 12K characters.","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFileText"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/drive/files/bulk":{"post":{"operationId":"post_drive_files_bulk","summary":"Move, star, unstar, trash (30-day restore) or restore many Drive files at once.","tags":["Drive"],"x-required-scope":"drive:write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBulkResult"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveBulkRequest"}}}}}},"/drive/search":{"get":{"operationId":"get_drive_search","summary":"Search Drive by name, tag, description, shared files and the text inside documents (q, kind, limit, teamId).","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveSearchResult"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}},"/drive/folders":{"get":{"operationId":"get_drive_folders","summary":"List the Drive folder tree.","tags":["Drive"],"x-required-scope":"drive:read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_drive_folders","summary":"Create a Drive folder, optionally inside another Drive folder.","tags":["Drive"],"x-required-scope":"drive:write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriveFolderCreate"}}}}}},"/webhooks":{"get":{"operationId":"get_webhooks","summary":"List webhooks.","tags":["Webhooks"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}}},"post":{"operationId":"post_webhooks","summary":"Register a webhook (secret returned once).","tags":["Webhooks"],"x-required-scope":"write","responses":{"201":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}}}},"/webhooks/{id}":{"get":{"operationId":"get_webhooks_id","summary":"Get a webhook.","tags":["Webhooks"],"x-required-scope":"read","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]},"patch":{"operationId":"patch_webhooks_id","summary":"Update a webhook.","tags":["Webhooks"],"x-required-scope":"write","responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdate"}}}}},"delete":{"operationId":"delete_webhooks_id","summary":"Delete a webhook.","tags":["Webhooks"],"x-required-scope":"write","responses":{"204":{"description":"No content."},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}},"/webhooks/{id}/deliveries":{"get":{"operationId":"get_webhooks_id_deliveries","summary":"List a webhook's recent deliveries.","tags":["Webhooks"],"x-required-scope":"read","responses":{"200":{"description":"A paginated list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnvelope"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The `id` path parameter."}]}}}}