{"openapi":"3.1.0","info":{"title":"Browser Use Public API v4","summary":"Browser Use agent runs API (v4)","version":"4.0.0"},"servers":[{"url":"https://api.browser-use.com/api/v4","description":"Production server"}],"paths":{"/runs":{"post":{"tags":["Runs"],"summary":"Create Run","operationId":"create_run_runs_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunCreateResponse"}}}},"400":{"description":"Invalid request (bad session/workspace pairing or file path)."},"402":{"description":"The project has no credits available, or the authenticating API key has reached its recorded monthly total-spend soft stop.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySpendLimitError"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"409":{"description":"The session already has an active run."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Runs"],"summary":"List Runs","operationId":"list_runs_runs_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Keyset cursor from a prior response.","title":"Cursor"},"description":"Keyset cursor from a prior response."},{"name":"sessionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunListResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"400":{"description":"Malformed pagination cursor."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/attachments":{"get":{"tags":["Runs"],"summary":"List Run Attachments","description":"The upload files attached to a run, for rendering attachment chips.\nOrdered to match the run's attached_file_ids.","operationId":"list_run_attachments_runs__run_id__attachments_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunAttachmentsResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}":{"get":{"tags":["Runs"],"summary":"Get Run","operationId":"get_run_runs__run_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSummary"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/status":{"get":{"tags":["Runs"],"summary":"Get Run Status","description":"Minimal status poll (see RunStatusResponse). POLL rate bucket: selects\nONLY the status/project columns — a 2s poll never drags the task/result\ntext (TOAST reads) that GET /runs/{id} pays. Poll until terminal, then\nfetch the full summary once.","operationId":"get_run_status_runs__run_id__status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunStatusResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/cancel":{"post":{"tags":["Runs"],"summary":"Cancel Run","description":"Cancel an in-flight run.\n\nIdempotent: a run already in a terminal state (completed / failed /\ncancelled) is returned as-is. Once cancelled, the gateway refuses\nevery subsequent `chat_completions` call from the worker — so the\nproject cannot be billed further regardless of whether the worker\nsubprocess notices the cancel itself.\n\nThe worker keeps running for at most one more bcode step\n(consuming no LLM tokens because CP 409s them) and then exits when\nbcode realizes the next tool call has no model behind it.","operationId":"cancel_run_runs__run_id__cancel_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunSummary"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"502":{"description":"The request could not be forwarded to the control plane."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/runs/{run_id}/events":{"get":{"tags":["Runs"],"summary":"Get Run Events","description":"Paginated event read. `after` is the event id cursor — clients\ndoing periodic polls pass back the highest id they've seen to get only\nthe delta. Default 0 returns from the start.","operationId":"get_run_events_runs__run_id__events_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Run Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":200,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"After"}},{"name":"include_output","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include Output"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunEventsResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions":{"get":{"tags":["Sessions"],"summary":"List Sessions","description":"List the project's V4 sessions — one row per session (its most recent\nrun), most-recent first.\n\nA session is a conversation: follow-up runs reuse the same\npublic_session_id, so GET /api/v4/runs would list one row per RUN. This\ncollapses to one row per SESSION directly in Postgres with DISTINCT ON, so a\nchatty session with 100 runs is still a single row (no scan amplification),\nand selects only the slim columns the session list needs — never the heavy\nper-run text/token/cost fields.\n\nKeyset-paginated on the latest run's (created_at, id): pass `next_cursor`\nback as `cursor` to page. Offset/COUNT was dropped — it doesn't scale on\nprojects with many sessions.","operationId":"list_sessions_sessions_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Max sessions per page (max 100).","default":20,"title":"Limit"},"description":"Max sessions per page (max 100)."},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Keyset cursor from a prior response.","title":"Cursor"},"description":"Keyset cursor from a prior response."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionListResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"400":{"description":"Malformed pagination cursor."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/purge":{"post":{"tags":["Sessions"],"summary":"Purge Session","description":"Immediately purge all data for a V4 session (ZDR projects only).\n\nRedacts DB records and deletes S3 objects (bcode state, workspace files,\nrecordings, downloads, staging uploads) for every run in the session. Same\ncleanup the ZDR cron performs, but on-demand and with no grace period. V4\nanalog of the V2 POST /sessions/{id}/purge. Surfaces shared with a still-live\nsibling run are deferred by the same guards the cron uses.","operationId":"purge_session_sessions__session_id__purge_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Project is not ZDR-enabled."},"404":{"description":"Session not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}":{"get":{"tags":["Sessions"],"summary":"Get Session","description":"Session detail — the same slim shape as one GET /sessions row (its\nlatest run). Doubles as the busy/idle poll for a conversation (POLL rate\nbucket): slim columns only, indexed public_session_id lookup, never the\nheavy result/token fields.","operationId":"get_session_sessions__session_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionInfo"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Sessions"],"summary":"Update Session","description":"Rename a session.\n\n`session_title` is denormalized onto every run in the session (the session\nlist reads the latest run), so a rename writes them all in one UPDATE. Null\nclears the name and the UI falls back to the opening task — it does NOT\nre-run title generation, which only fills rows where the title IS NULL and\nso would silently overwrite the clear.","operationId":"update_session_sessions__session_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionInfo"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Sessions"],"summary":"Delete Session","description":"Delete a session: it disappears from the session lists and can no longer\nbe opened or continued.\n\nSoft delete (mirrors V2's `is_archived`): the runs, events and usage records\nstay in place so billing and analytics keep reconciling, and ZDR purge is the\nonly thing that ever destroys V4 content. Idempotent — deleting twice is a\nno-op 204.\n\nAn in-flight run is cancelled first, and pending queued messages are\ncancelled too; otherwise the drain would dispatch a follow-up run whose\n`session_archived_at` is NULL and resurrect the session. Cancel is forwarded\nto CP before anything is written (and outside the queue lock, per the\nenqueue path's ordering), so a CP failure (502) leaves the session visible\nrather than hiding a run that is still burning credits.","operationId":"delete_session_sessions__session_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"204":{"description":"Successful Response"},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"502":{"description":"The request could not be forwarded to the control plane."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/queue":{"post":{"tags":["Sessions"],"summary":"Queue Session Message","description":"Send a message to a session. If the session is busy it waits on the queue\nand runs as the next turn; if idle it drains immediately.\n\n`interrupt=true` cancels the session's active run so this message takes effect\nnow instead of waiting for the current turn (no-op when the session is idle).","operationId":"queue_session_message_sessions__session_id__queue_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"X-V4-Queue-Deduplicate","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-V4-Queue-Deduplicate"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedMessage"}}}},"402":{"description":"The project has no credits available, or the authenticating API key has reached its recorded monthly total-spend soft stop.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySpendLimitError"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"429":{"description":"The session message queue is full."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Sessions"],"summary":"List Session Queue","description":"List open messages, recently delivered queued messages, and steering cutoffs.\n\nIncludes live dispatch claims so clients can restore an accepted queued\nmessage after a refresh without briefly losing its waiting state.\n\nConsumed QUEUE rows are returned too, capped at the most recent\n_DELIVERED_QUEUE_HISTORY, plus up to _AGENCY_DELIVERED_QUEUE_HISTORY compact\nAgency choice and generation receipts so inbox state survives refresh. A message absorbed mid-run is announced by a\n`queued_input_injected` event carrying only its input id, so the chat has no\nother source for the text to render. The cap bounds this response because\nclients poll it while a run is active; a session with more delivered\nfollow-ups than the cap renders its oldest injected bubbles without text.\n\nThe latest consumed interrupt bridges the primary-write/read-replica gap\nbefore its replacement run appears; clients discard it once that run is\nvisible. Compact per-source cutoffs preserve every historical interrupted\ntranscript boundary without returning every historical steering message and\nits attachments.","operationId":"list_session_queue_sessions__session_id__queue_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueueListResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/queue/{message_id}":{"get":{"tags":["Sessions"],"summary":"Get Session Queue Message","description":"Read one queued message including terminal handoff states.","operationId":"get_session_queue_message_sessions__session_id__queue__message_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedMessage"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Sessions"],"summary":"Cancel Queued Message","description":"Remove a still-pending queued message; 409 once the drain has claimed it.","operationId":"cancel_queued_message_sessions__session_id__queue__message_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"integer","title":"Message Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueuedMessage"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"409":{"description":"The message is no longer pending and cannot be cancelled."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/feedback":{"get":{"tags":["Sessions"],"summary":"Get Session Feedback","description":"Every vote across the session in one query — the run view calls this\nonce per session on load. A session the caller doesn't own returns an\nempty list (not 404), matching what an unshared session with no votes\nreturns. Reads the PRIMARY, not the replica: this hydrates the thumbs the\nuser may have set seconds ago, and replica lag would render a just-cast\nvote as silently lost.","operationId":"get_session_feedback_sessions__session_id__feedback_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeedbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Sessions"],"summary":"Set Session Feedback","description":"Upsert one chat item's thumbs vote; `feedback_type: null` clears it.","operationId":"set_session_feedback_sessions__session_id__feedback_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeedbackUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionFeedbackResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sessions/{session_id}/share":{"get":{"tags":["Sessions"],"summary":"Get Session Share","description":"The session's share link (active or not); null if never shared.","operationId":"get_session_share_sessions__session_id__share_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionShareInfo"},{"type":"null"}],"title":"Response Get Session Share Sessions  Session Id  Share Get"}}}},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Sessions"],"summary":"Create Session Share","description":"Enable sharing: reactivates the session's existing share (stable token,\nso a link that was toggled off keeps working when re-enabled) or creates\none on first use.","operationId":"create_session_share_sessions__session_id__share_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionShareInfo"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Sessions"],"summary":"Update Session Share","description":"Toggle the session's share link on/off.","operationId":"update_session_share_sessions__session_id__share_put","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionShareUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionShareInfo"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces":{"post":{"tags":["Workspaces"],"summary":"Create Workspace","description":"Mint an empty workspace. Lets callers upload input files BEFORE the\nfirst run exists; pass the id as workspaceId on POST /runs.","operationId":"create_workspace_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/workspaces/{workspace_id}/files/upload":{"post":{"tags":["Workspaces"],"summary":"Upload Workspace Files","description":"Presigned PUT URLs for input files, placed under ``uploads/`` in the\nworkspace. The agent pulls them in at the start of every run. URLs are\npinned to the declared Content-Type and exact Content-Length.","operationId":"upload_workspace_files_workspaces__workspace_id__files_upload_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFileUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFileUploadResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"400":{"description":"Invalid request (bad session/workspace pairing or file path)."},"409":{"description":"One or more files would replace existing workspace files."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}":{"get":{"tags":["Workspaces"],"summary":"Get Workspace","operationId":"get_workspace_workspaces__workspace_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Workspaces"],"summary":"Update Workspace","description":"Rename a workspace. Explicit null clears the name; omission is a no-op.","operationId":"update_workspace_workspaces__workspace_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceInfo"}}}},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete Workspace","description":"Archive a workspace. Idempotent for missing, archived, and foreign ids.","operationId":"delete_workspace_workspaces__workspace_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/size":{"get":{"tags":["Workspaces"],"summary":"Get Workspace Size","description":"Return current storage usage and the plan-specific workspace quota.","operationId":"get_workspace_size_workspaces__workspace_id__size_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSizeInfo"}}}},"404":{"description":"Run, session, workspace, or profile not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/files":{"get":{"tags":["Workspaces"],"summary":"List Workspace Files","description":"List files the agent has produced for this workspace, paginated.","operationId":"list_workspace_files_workspaces__workspace_id__files_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string","default":"","title":"Prefix"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"includeUrls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeurls"}},{"name":"contentDisposition","in":"query","required":false,"schema":{"anyOf":[{"const":"attachment","type":"string"},{"type":"null"}],"title":"Contentdisposition"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFileListResponse"}}}},"403":{"description":"Zero Data Retention is enabled on the project (V4 unsupported)."},"404":{"description":"Run, session, workspace, or profile not found."},"400":{"description":"Malformed pagination cursor."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete Workspace File","description":"Delete one exact path from a workspace and remove matching upload metadata.","operationId":"delete_workspace_file_workspaces__workspace_id__files_delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Workspace Id"}},{"name":"path","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Relative file path to delete","title":"Path"},"description":"Relative file path to delete"}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Run, session, workspace, or profile not found."},"400":{"description":"Invalid request (bad session/workspace pairing or file path)."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agentcard/wallets":{"get":{"tags":["Wallets"],"summary":"List Agentcard Wallets","description":"The project's active AgentCard wallets, newest first.\n\nRead-only: funding is admin-only during the beta. The UI uses this to offer\na wallet on the composer, which is how a run opts into spending — the id\nthen rides RunCreateRequest.agentcard_wallet_id and is validated again there\nagainst this same project.","operationId":"list_agentcard_wallets_agentcard_wallets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCardWalletListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/stripe-link":{"get":{"tags":["Wallets"],"summary":"Get Stripe Link Status","description":"The project's active Stripe Link wallet connection, if any.\n\nRead-only: connecting happens in the cloud UI. A run opts into paying with\nit by passing `connection_id` as RunCreateRequest.stripe_link_connection_id,\nwhich is validated again there against this same project.","operationId":"get_stripe_link_status_stripe_link_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeLinkStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/integrations":{"get":{"tags":["Integrations"],"summary":"List Integrations","description":"List available integrations with this project's connection status.\n\n`is_connected` is resolved per integration, so a client can render the whole\ncatalogue and the connected subset from this one call. `connected_only` is\nwhat a \"my integrations\" view reads — including on a restricted project,\nwhich cannot connect anything but can still remove what it already has.","operationId":"list_integrations_integrations_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"Maximum number of results","title":"Limit"},"description":"Maximum number of results"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip","default":0,"title":"Offset"},"description":"Number of results to skip"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by name, description or provider","title":"Search"},"description":"Filter by name, description or provider"},{"name":"popular_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return popular integrations","default":false,"title":"Popular Only"},"description":"Only return popular integrations"},{"name":"connected_only","in":"query","required":false,"schema":{"type":"boolean","description":"Only return integrations this project has connected","default":false,"title":"Connected Only"},"description":"Only return integrations this project has connected"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/categories":{"get":{"tags":["Integrations"],"summary":"List Categories","description":"Get all integration categories, for filtering the list above.","operationId":"list_categories_integrations_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationCategoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]}]}},"/integrations/{provider}/authorize":{"post":{"tags":["Integrations"],"summary":"Authorize Integration","description":"Get the OAuth redirect URL for connecting an integration.\n\nThe client opens the returned URL in a web auth session and polls\n`/integrations/{provider}/status` once the flow lands back on the callback\npath. The URL is Composio-hosted; no redirect URI is registered per client.","operationId":"authorize_integration_integrations__provider__authorize_post","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthorizeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/{provider}/status":{"get":{"tags":["Integrations"],"summary":"Get Connection Status","description":"Check whether this project has connected a specific provider.\n\nPoll this after opening the authorize URL to learn when OAuth completed.","operationId":"get_connection_status_integrations__provider__status_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/integrations/{provider}":{"delete":{"tags":["Integrations"],"summary":"Disconnect Integration","description":"Disconnect an integration for this project.\n\nDeliberately NOT gated like `authorize` above: a restricted project must\nstill be able to tear down a connection it already has.","operationId":"disconnect_integration_integrations__provider__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","title":"Provider"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DisconnectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/share/{share_token}":{"get":{"summary":"Get Shared Session","description":"Public transcript of a shared session (sensitive keys scrubbed).\n\nEvents come back in bounded pages: walk them by passing the previous\nresponse's `nextAfter` back as `since` until `hasMore` is false (the wire\nis camelCase — the Python fields are `next_after`/`has_more`). Run metadata\nrepeats on every page, so only `events` continues across pages.\nPaging exists because this is an unauthenticated read and the whole\ntranscript in one response could occupy the event loop for seconds,\nstarving the shared Redis client's auth and rate-limit calls of their\n50 ms deadline and silently failing them open.\n\nCounts a view per full fetch. `since` makes this a live-tail poll: the\nshare page repeats the request every few seconds while a run is unfinished,\nand each poll must stay cheap and must NOT inflate the view counter — a\nviewer idling on a running session would otherwise register a view every\n10 seconds (the counter's throttle window). Later pages of an initial load\ncarry a cursor too, so one load counts one view, not one per page.","operationId":"get_shared_session_share__share_token__get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[A-Za-z0-9_-]{32}$","title":"Share Token"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Highest event id the viewer already has. Returns only newer events (run metadata is always complete) and does not count a view.","title":"Since"},"description":"Highest event id the viewer already has. Returns only newer events (run metadata is always complete) and does not count a view."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"Maximum events in this page. A page also closes at 1 MiB of event payload, so it can come back shorter. Read `hasMore`/`nextAfter` to page through the rest.","default":100,"title":"Limit"},"description":"Maximum events in this page. A page also closes at 1 MiB of event payload, so it can come back shorter. Read `hasMore`/`nextAfter` to page through the rest."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SharedSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/share/{share_token}/files":{"get":{"summary":"List Shared Session Files","description":"Public listing of a shared session's workspace files. Same shape as the\nauthenticated workspace-files endpoint so the share page can reuse the\nsame components.\n\nScope is FORCED under `outputs/`: the worker contract promises the user\nthat only outputs/ files are deliverables, so working files the agent\nleft at the workspace root (notes, scripts, .env, uploads/) must never\nbecome public through a share link.","operationId":"list_shared_session_files_share__share_token__files_get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[A-Za-z0-9_-]{32}$","title":"Share Token"}},{"name":"prefix","in":"query","required":false,"schema":{"type":"string","default":"","title":"Prefix"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"includeUrls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeurls"}},{"name":"contentDisposition","in":"query","required":false,"schema":{"anyOf":[{"const":"attachment","type":"string"},{"type":"null"}],"title":"Contentdisposition"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceFileListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/share/{share_token}/recording":{"get":{"summary":"Get Shared Session Recording","description":"Presigned URL for the shared session's browser recording (mp4).\n\nRecording ONLY — the live-view URL is an interactive browser and is never\nexposed through a share. Null until the session's browser stops and the\nupload lands (same lag as GET /runs/{run_id}/recording). V4 keeps one\nbrowser across follow-ups, so the newest run with a browser session is\nthe session's recording.","operationId":"get_shared_session_recording_share__share_token__recording_get","parameters":[{"name":"share_token","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"pattern":"^[A-Za-z0-9_-]{32}$","title":"Share Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRecordingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browsers":{"get":{"tags":["Browsers"],"summary":"List Browser Sessions","description":"Get paginated list of browser sessions with optional status filtering.\n\nList responses intentionally omit per-session presigned recording URLs\n(`recording_url` is always `null` here). Each recording URL requires a\nsynchronous boto3 SigV4 signing call (plus an S3 HEAD) that holds the GIL\nand blocks the event loop. With page_size up to the max this CPU-pegs the\nworker and starves the DB pool, cascading into pool exhaustion across the\nfleet. Clients should fetch the recording URL on demand via\n`GET /api/v2/browsers/{id}`, which signs exactly one URL for a single\nsession. Mirrors the v3 sessions list fix (ENG-4904, PR #4621).","operationId":"list_browser_sessions_browsers_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"metadata","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"Only browsers tagged with every one of these terms. `key` matches any value; `key=value` matches exactly. Repeat the param to require more than one (AND).","title":"Metadata"},"description":"Only browsers tagged with every one of these terms. `key` matches any value; `key=value` matches exactly. Repeat the param to require more than one (AND)."},{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Pagesize"}},{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Pagenumber"}},{"name":"filterBy","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/BrowserSessionStatus"},{"type":"null"}],"title":"Filterby"}},{"name":"agentSessionId","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agentsessionid"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSessionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Browsers"],"summary":"Create Browser Session","description":"Create a new browser session.\n\n**Pricing:** Browser sessions are charged at $0.02/hour for all users.\n\nThe full rate is charged upfront when the session starts.\nWhen you stop the session, any unused time is automatically refunded proportionally.\n\nBilling is rounded up to the minute (minimum 1 minute).\nFor example, if you stop a session after 30 minutes, you'll be refunded half the charged amount.\n\n**Session Limits:**\n- All users: Up to 4 hours per session","operationId":"create_browser_session_browsers_post","security":[{"APIKeyHeader":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBrowserSessionRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSessionItemView"}}}},"402":{"description":"Insufficient credits, or the API key reached its monthly spend limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeySpendLimitError"}}}},"403":{"description":"Session timeout limit exceeded (maximum 4 hours)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTimeoutLimitExceededError"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileNotFoundError"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"429":{"description":"Too many concurrent active sessions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TooManyConcurrentActiveSessionsError"}}}}}}},"/browsers/{session_id}":{"get":{"tags":["Browsers"],"summary":"Get Browser Session","description":"Get detailed browser session information including status and URLs.","operationId":"get_browser_session_browsers__session_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSessionView"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Browsers"],"summary":"Update Browser Session","description":"Stop a browser session.\n\n**Refund:** When you stop a session, unused time is automatically refunded.\nIf the session ran for less than 1 hour, you'll receive a proportional refund.\nBilling is ceil to the nearest minute (minimum 1 minute).","operationId":"update_browser_session_browsers__session_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBrowserSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserSessionView"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}}},"/browsers/{session_id}/downloads":{"get":{"tags":["Browsers"],"summary":"List Browser Session Downloads","description":"List files the browser downloaded to S3 during the session.\n\nPass ``includeUrls=true`` to receive presigned download URLs (15 min expiry) inline.\nFiles are stored at ``downloads/projects/{project_id}/sessions/{session_id}/`` in\nthe private bucket.","operationId":"list_browser_session_downloads_browsers__session_id__downloads_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"includeUrls","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Includeurls"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserDownloadListResponse"}}}},"404":{"description":"Session not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionNotFoundError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/profiles":{"get":{"tags":["Profiles"],"summary":"List Profiles","description":"Get paginated list of profiles.\n\nUse the `query` parameter to search profiles by name or user_id.\nThis is useful when you have many profiles and need to find a specific user.\n\nExample: If you set `user_id` to your internal user identifier when creating profiles,\nyou can later search for that user by passing their identifier as the `query` parameter.","operationId":"list_profiles_profiles_get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"pageSize","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Pagesize"}},{"name":"pageNumber","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Pagenumber"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Query"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Profiles"],"summary":"Create Profile","description":"Profiles allow you to preserve the state of the browser between tasks.\n\nThey are most commonly used to allow users to preserve the log-in state in the agent between tasks.\nYou'd normally create one profile per user and then use it for all their tasks.\n\nYou can set a `user_id` when creating a profile to associate it with a user in your system.\nThis allows you to later search for the profile using the GET /profiles endpoint with a query parameter.","operationId":"create_profile_profiles_post","security":[{"APIKeyHeader":[]}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileView"}}}},"402":{"description":"Profile limit reached; delete unused profiles to create new ones","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsufficientCreditsError"}}}},"422":{"description":"Request validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}}}}},"/profiles/{profile_id}":{"get":{"tags":["Profiles"],"summary":"Get Profile","description":"Get profile details.","operationId":"get_profile_profiles__profile_id__get","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileView"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileNotFoundError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Profiles"],"summary":"Update Profile","description":"Update a browser profile's information.","operationId":"update_profile_profiles__profile_id__patch","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileView"}}}},"404":{"description":"Profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileNotFoundError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Profiles"],"summary":"Delete Browser Profile","description":"Permanently delete a browser profile and its configuration.","operationId":"delete_browser_profile_profiles__profile_id__delete","security":[{"APIKeyHeader":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Profile Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeySpendLimitDetail":{"properties":{"code":{"type":"string","title":"Code","default":"api_key_monthly_spend_limit_reached"},"message":{"type":"string","title":"Message"},"cap":{"type":"number","title":"Cap"},"spent":{"type":"number","title":"Spent"}},"type":"object","required":["message","cap","spent"],"title":"APIKeySpendLimitDetail","description":"Machine-readable 402 detail shared by run and browser creation."},"APIKeySpendLimitError":{"properties":{"detail":{"anyOf":[{"type":"string"},{"$ref":"#/components/schemas/APIKeySpendLimitDetail"}],"title":"Detail"}},"type":"object","required":["detail"],"title":"APIKeySpendLimitError","description":"FastAPI wraps endpoint errors in a top-level ``detail`` field."},"AgentCardWalletListResponse":{"properties":{"wallets":{"items":{"$ref":"#/components/schemas/AgentCardWalletSummary"},"type":"array","title":"Wallets"}},"type":"object","required":["wallets"],"title":"AgentCardWalletListResponse"},"AgentCardWalletSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"currency":{"type":"string","title":"Currency"},"availableCents":{"type":"integer","title":"Availablecents"},"activeHoldCents":{"type":"integer","title":"Activeholdcents"}},"type":"object","required":["id","name","currency","availableCents","activeHoldCents"],"title":"AgentCardWalletSummary","description":"A spendable project wallet as the composer needs to show it."},"AuthorizeResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"},"provider":{"type":"string","title":"Provider"}},"type":"object","required":["redirect_url","provider"],"title":"AuthorizeResponse","description":"Response with OAuth redirect URL."},"BrowserDownloadFile":{"properties":{"path":{"type":"string","title":"Path","description":"File name (basename relative to the session downloads prefix)"},"size":{"type":"integer","title":"Size","description":"File size in bytes"},"lastModified":{"type":"string","format":"date-time","title":"Lastmodified","description":"When the file was last modified in S3"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Presigned download URL (15 min expiry). Only included when `includeUrls=true`."}},"type":"object","required":["path","size","lastModified"],"title":"BrowserDownloadFile","description":"A single file the browser downloaded during the session."},"BrowserDownloadListResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/BrowserDownloadFile"},"type":"array","title":"Files","description":"List of files downloaded by the browser"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor","description":"Cursor for the next page. Pass as the `cursor` query parameter to fetch the next page."},"hasMore":{"type":"boolean","title":"Hasmore","description":"Whether there are more files beyond this page.","default":false}},"type":"object","required":["files"],"title":"BrowserDownloadListResponse","description":"Paginated list of browser downloads with optional presigned URLs."},"BrowserSessionItemView":{"properties":{"id":{"type":"string","format":"uuid","title":"ID","description":"Unique identifier for the session"},"status":{"$ref":"#/components/schemas/BrowserSessionStatus","title":"Status","description":"Current status of the session (active/stopped)"},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live URL","description":"URL where the browser can be viewed live in real-time"},"cdpUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"CDP URL","description":"Chrome DevTools Protocol URL for browser automation"},"timeoutAt":{"type":"string","format":"date-time","title":"Timeout At","description":"Timestamp when the session will timeout"},"startedAt":{"type":"string","format":"date-time","title":"Started At","description":"Timestamp when the session was created and started"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"Timestamp when the session was stopped (None if still active)"},"proxyUsedMb":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Proxy Used MB","description":"Amount of proxy data used in MB","default":"0"},"proxyCost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Proxy Cost","description":"Cost of proxy usage in USD","default":"0"},"browserCost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Browser Cost","description":"Cost of browser session hosting in USD","default":"0"},"agentSessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Session ID","description":"ID of the agent session that created this browser (None for standalone BaaS sessions)"},"recordingUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording URL","description":"Presigned URL to download the session recording. Only populated on `GET /api/v2/browsers/{id}`; always `null` in list responses."},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Caller-supplied labels set when the browser was created.","default":{}}},"type":"object","required":["id","status","timeoutAt","startedAt"],"title":"BrowserSessionItemView","description":"View model for representing a browser session in list views."},"BrowserSessionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BrowserSessionItemView"},"type":"array","title":"Items","description":"List of browser session views for the current page"},"totalItems":{"type":"integer","title":"Total Items","description":"Total number of items in the list"},"pageNumber":{"type":"integer","title":"Page Number","description":"Page number"},"pageSize":{"type":"integer","title":"Page Size","description":"Number of items per page"}},"type":"object","required":["items","totalItems","pageNumber","pageSize"],"title":"BrowserSessionListResponse","description":"Response model for paginated browser session list requests."},"BrowserSessionStatus":{"type":"string","enum":["active","stopped"],"title":"BrowserSessionStatus","description":"Enumeration of possible browser session states\n\nAttributes:\n    ACTIVE: Session is currently active and running (browser is running)\n    STOPPED: Session has been stopped and is no longer active (browser is stopped)"},"BrowserSessionUpdateAction":{"type":"string","enum":["stop"],"title":"BrowserSessionUpdateAction","description":"Available actions that can be performed on a browser session\n\nAttributes:\n    STOP: Stop the browser session (cannot be undone)"},"BrowserSessionView":{"properties":{"id":{"type":"string","format":"uuid","title":"ID","description":"Unique identifier for the session"},"status":{"$ref":"#/components/schemas/BrowserSessionStatus","title":"Status","description":"Current status of the session (active/stopped)"},"liveUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Live URL","description":"URL where the browser can be viewed live in real-time"},"cdpUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"CDP URL","description":"Chrome DevTools Protocol URL for browser automation"},"timeoutAt":{"type":"string","format":"date-time","title":"Timeout At","description":"Timestamp when the session will timeout"},"startedAt":{"type":"string","format":"date-time","title":"Started At","description":"Timestamp when the session was created and started"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At","description":"Timestamp when the session was stopped (None if still active)"},"proxyUsedMb":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Proxy Used MB","description":"Amount of proxy data used in MB","default":"0"},"proxyCost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Proxy Cost","description":"Cost of proxy usage in USD","default":"0"},"browserCost":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Browser Cost","description":"Cost of browser session hosting in USD","default":"0"},"agentSessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agent Session ID","description":"ID of the agent session that created this browser (None for standalone BaaS sessions)"},"recordingUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording URL","description":"Presigned URL to download the session recording, if recording was enabled. Only populated on GET /api/v2/browsers/{session_id}: the upload starts when the browser stops, so it is never ready in the stop response."},"recordingAvailable":{"type":"boolean","title":"Recording Available","description":"False when a recording can never appear for this session: recording was disabled, or the browser stopped long enough ago that the upload is not coming. Only ever false from proof, so a failed recording lookup leaves it true. Clients polling for `recordingUrl` must stop when this is false.","default":true},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata","description":"Caller-supplied labels set when the browser was created.","default":{}}},"type":"object","required":["id","status","timeoutAt","startedAt"],"title":"BrowserSessionView","description":"View model for representing a browser session."},"ConnectionStatusResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"is_connected":{"type":"boolean","title":"Is Connected"}},"type":"object","required":["provider","is_connected"],"title":"ConnectionStatusResponse","description":"Response for connection status check."},"CreateBrowserSessionRequest":{"properties":{"profileId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Profile ID","description":"The ID of the profile to use for the session"},"proxyCountryCode":{"anyOf":[{"$ref":"#/components/schemas/ProxyCountryCode"},{"type":"null"}],"title":"Proxy Country Code","description":"Country code for proxy location. Defaults to US. Set to null to disable proxy.","default":"us"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata","description":"Labels for this browser. Up to 10 key-value pairs. Filterable on the browsers list and in the dashboard history."},"timeout":{"type":"integer","title":"Timeout","description":"The timeout for the session in minutes. All users can use up to 240 minutes (4 hours). Browser sessions are charged $0.02/hour.","default":60,"ge":1,"le":240},"browserScreenWidth":{"anyOf":[{"type":"integer","maximum":6144.0,"minimum":320.0},{"type":"null"}],"title":"Browser Screen Width","description":"Custom screen width in pixels for the browser."},"browserScreenHeight":{"anyOf":[{"type":"integer","maximum":3456.0,"minimum":320.0},{"type":"null"}],"title":"Browser Screen Height","description":"Custom screen height in pixels for the browser."},"allowResizing":{"type":"boolean","title":"Allow Resizing","description":"Whether to allow the browser to be resized during the session (not recommended since it reduces stealthiness).","default":false},"pdfRendererEnabled":{"type":"boolean","title":"PDF Renderer Enabled","description":"Whether Chrome renders PDFs in a tab. Set to false to stop the in-tab render; the file is saved to the session's download directory either way.","default":true},"solveCaptchas":{"type":"boolean","title":"Solve Captchas","description":"Whether the browser detects and solves CAPTCHAs on its own. Set to false to handle CAPTCHAs yourself. Defaults to true.","default":true},"customProxy":{"anyOf":[{"$ref":"#/components/schemas/CustomProxy"},{"type":"null"}],"title":"Custom Proxy","description":"Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are available on any active subscription."},"enableRecording":{"type":"boolean","title":"Enable Recording","description":"If True, enables session recording. Defaults to False.","default":false}},"type":"object","title":"CreateBrowserSessionRequest","description":"Request model for creating a browser session."},"CustomProxy":{"properties":{"host":{"type":"string","maxLength":255,"minLength":1,"title":"Host","description":"Host of the proxy."},"port":{"type":"integer","maximum":65535.0,"minimum":1.0,"title":"Port","description":"Port of the proxy."},"username":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Username","description":"Username for proxy authentication."},"password":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Password","description":"Password for proxy authentication."},"ignoreCertErrors":{"type":"boolean","title":"Ignore Certificate Errors","description":"Ignore TLS certificate errors. Enable this if your proxy uses a self-signed or untrusted certificate (e.g. Burp Suite, corporate proxies).","default":false}},"type":"object","required":["host","port"],"title":"CustomProxy","description":"Request model for creating a custom proxy."},"DisconnectResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"provider":{"type":"string","title":"Provider"}},"type":"object","required":["success","provider"],"title":"DisconnectResponse","description":"Response for disconnect action."},"ExternalBrowserAttach":{"properties":{"cdpUrl":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Cdpurl"},"liveViewUrl":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Liveviewurl"}},"type":"object","required":["cdpUrl"],"title":"ExternalBrowserAttach","description":"DEV-ONLY: hand v4 a pre-provisioned browser instead of having CP\ncall UseBrowserService. Gated to env=='development' in the router."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InlineSecretSource":{"properties":{"type":{"type":"string","const":"inline","title":"Type"},"value":{"type":"string","minLength":1,"format":"password","title":"Value","description":"The secret itself. Limited to 4096 bytes once encoded for encryption; non-ASCII characters cost more than one byte each.","writeOnly":true}},"additionalProperties":false,"type":"object","required":["type","value"],"title":"InlineSecretSource","description":"A value the caller supplies directly with the run."},"InsufficientCreditsError":{"properties":{"detail":{"type":"string","title":"Detail","default":"Insufficient credits"}},"type":"object","title":"InsufficientCreditsError","description":"Error response when there are insufficient credits"},"IntegrationCategoryResponse":{"properties":{"categories":{"items":{"type":"string"},"type":"array","title":"Categories"}},"type":"object","required":["categories"],"title":"IntegrationCategoryResponse","description":"Response for integration categories."},"IntegrationListResponse":{"properties":{"integrations":{"items":{"$ref":"#/components/schemas/IntegrationResponse"},"type":"array","title":"Integrations"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["integrations","total","limit","offset"],"title":"IntegrationListResponse","description":"Paginated response for integrations list."},"IntegrationResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","title":"Description"},"icon_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Url"},"category":{"type":"string","title":"Category"},"is_connected":{"type":"boolean","title":"Is Connected"},"auth_type":{"type":"string","title":"Auth Type"},"is_popular":{"type":"boolean","title":"Is Popular","default":false}},"type":"object","required":["provider","display_name","description","icon_url","category","is_connected","auth_type"],"title":"IntegrationResponse","description":"Response for a single integration."},"OnePasswordSecretSource":{"properties":{"type":{"type":"string","const":"onepassword","title":"Type"},"integrationId":{"type":"string","format":"uuid","title":"Integrationid","description":"1Password integration to resolve through. Must belong to this project."},"vaultId":{"type":"string","maxLength":64,"minLength":1,"title":"Vaultid"},"itemId":{"type":"string","maxLength":64,"minLength":1,"title":"Itemid"},"fieldId":{"type":"string","maxLength":64,"minLength":1,"title":"Fieldid","description":"Field id from the item-fields endpoint, e.g. \"password\"."}},"additionalProperties":false,"type":"object","required":["type","integrationId","vaultId","itemId","fieldId"],"title":"OnePasswordSecretSource","description":"One field of a 1Password item, resolved only when the agent asks for it.\n\nNothing here is a secret: the quadruple NAMES a credential without carrying\nit. Creating the binding makes no call to 1Password — a provider outage must\nnot stop a run from being dispatched, and no vault is ever enumerated.\n\nA one-time-password field resolves to its current code; its seed is never\nread, so there is no flag to ask for one."},"ProfileCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"Optional name for the profile"},"userId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"User ID","description":"Your internal user identifier for this profile. Use this to associate a profile with a user in your system."}},"type":"object","title":"ProfileCreateRequest","description":"Request model for creating a new profile."},"ProfileListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ProfileView"},"type":"array","title":"Items","description":"List of profile views for the current page"},"totalItems":{"type":"integer","title":"Total Items","description":"Total number of items in the list"},"pageNumber":{"type":"integer","title":"Page Number","description":"Page number"},"pageSize":{"type":"integer","title":"Page Size","description":"Number of items per page"}},"type":"object","required":["items","totalItems","pageNumber","pageSize"],"title":"ProfileListResponse","description":"Response model for paginated profile list requests."},"ProfileNotFoundError":{"properties":{"detail":{"type":"string","title":"Detail","default":"Profile not found"}},"type":"object","title":"ProfileNotFoundError","description":"Error response when a profile is not found"},"ProfileUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name","description":"Optional name for the profile"},"userId":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"User ID","description":"Your internal user identifier for this profile. Use this to associate a profile with a user in your system."}},"type":"object","title":"ProfileUpdateRequest","description":"Request model for updating a profile."},"ProfileView":{"properties":{"id":{"type":"string","format":"uuid","title":"ID","description":"Unique identifier for the profile"},"userId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User ID","description":"Your internal user identifier for this profile. Use this to associate a profile with a user in your system."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Optional name for the profile"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At","description":"Timestamp when the profile was last used"},"createdAt":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the profile was created"},"updatedAt":{"type":"string","format":"date-time","title":"Updated At","description":"Timestamp when the profile was last updated"},"cookieDomains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Cookie Domains","description":"List of domain URLs that have cookies stored for this profile"}},"type":"object","required":["id","createdAt","updatedAt"],"title":"ProfileView","description":"View model for representing a profile. A profile lets you preserve the login state between sessions.\n\nWe recommend that you create a separate profile for each user of your app.\nYou can assign a user_id to each profile to easily identify which user the profile belongs to."},"ProxyCountryCode":{"type":"string","enum":["ad","ae","af","ag","ai","al","am","an","ao","aq","ar","as","at","au","aw","az","ba","bb","bd","be","bf","bg","bh","bi","bj","bl","bm","bn","bo","bq","br","bs","bt","bv","bw","by","bz","ca","cc","cd","cf","cg","ch","ci","ck","cl","cm","co","cr","cs","cu","cv","cw","cx","cy","cz","de","dj","dk","dm","do","dz","ec","ee","eg","eh","er","es","et","fi","fj","fk","fm","fo","fr","ga","gd","ge","gf","gg","gh","gi","gl","gm","gn","gp","gq","gr","gs","gt","gu","gw","gy","hk","hm","hn","hr","ht","hu","id","ie","il","im","in","iq","ir","is","it","je","jm","jo","jp","ke","kg","kh","ki","km","kn","kp","kr","kw","ky","kz","la","lb","lc","li","lk","lr","ls","lt","lu","lv","ly","ma","mc","md","me","mf","mg","mh","mk","ml","mm","mn","mo","mp","mq","mr","ms","mt","mu","mv","mw","mx","my","mz","na","nc","ne","nf","ng","ni","nl","no","np","nr","nu","nz","om","pa","pe","pf","pg","ph","pk","pl","pm","pn","pr","ps","pt","pw","py","qa","re","ro","rs","ru","rw","sa","sb","sc","sd","se","sg","sh","si","sj","sk","sl","sm","sn","so","sr","ss","st","sv","sx","sy","sz","tc","td","tf","tg","th","tj","tk","tl","tm","tn","to","tr","tt","tv","tw","tz","ua","ug","uk","us","uy","uz","va","vc","ve","vg","vi","vn","vu","wf","ws","xk","ye","yt","za","zm","zw"],"title":"ProxyCountryCode"},"QueueListResponse":{"properties":{"queue":{"items":{"$ref":"#/components/schemas/QueuedMessage"},"type":"array","title":"Queue"},"steeringCutoffs":{"items":{"$ref":"#/components/schemas/SteeringCutoff"},"type":"array","title":"Steeringcutoffs"}},"type":"object","required":["queue"],"title":"QueueListResponse"},"QueueMessageRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"interrupt":{"type":"boolean","title":"Interrupt","default":false},"attachedFileIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20},{"type":"null"}],"title":"Attachedfileids"}},"additionalProperties":false,"type":"object","required":["text"],"title":"QueueMessageRequest","description":"Send a message to a session. If the session is busy the message waits on\nthe queue and runs as the next turn; if idle it runs immediately.\n\nSet `interrupt` to make it take effect now: the session's active run is\ncancelled and this message drains straight after. Interrupt is a no-op when\nthe session is already idle, and BEST-EFFORT when busy — if the cancel can't\nbe delivered, the message stays queued and runs after the current turn."},"QueuedMessage":{"properties":{"id":{"type":"integer","title":"Id"},"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"runId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Runid"},"mode":{"type":"string","enum":["queue","interrupt"],"title":"Mode"},"status":{"type":"string","enum":["pending","dispatching","consumed","cancelled","superseded","failed"],"title":"Status"},"text":{"type":"string","title":"Text"},"attachedFileIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attachedfileids"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["id","sessionId","runId","mode","status","text","createdAt"],"title":"QueuedMessage","description":"One message on a session's queue (a v4_session_input row)."},"RunAttachment":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name","description":"Filename shown to the user, e.g. \"data.csv\"."},"contentType":{"type":"string","title":"Contenttype"},"sizeBytes":{"type":"integer","title":"Sizebytes"},"status":{"type":"string","enum":["pending","uploaded"],"title":"Status","description":"\"pending\" | \"uploaded\"."}},"type":"object","required":["id","name","contentType","sizeBytes","status"],"title":"RunAttachment"},"RunAttachmentsResponse":{"properties":{"attachments":{"items":{"$ref":"#/components/schemas/RunAttachment"},"type":"array","title":"Attachments"}},"type":"object","required":["attachments"],"title":"RunAttachmentsResponse"},"RunBrowserSettings":{"properties":{"profileId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Profileid","description":"ID of a browser profile to load into the session. Profiles persist cookies, local storage, and other browser state across sessions."},"proxyCountryCode":{"anyOf":[{"$ref":"#/components/schemas/ProxyCountryCode"},{"type":"null"}],"description":"ISO country code to proxy the browser through. Defaults to US. Pass null to run without a proxy.","default":"us"},"customProxy":{"anyOf":[{"$ref":"#/components/schemas/CustomProxy"},{"type":"null"}],"description":"Custom proxy for the browser. Overrides proxyCountryCode. Requires an active subscription. Never stored or inherited by follow-up runs; pass it on each run that should use it."},"screenWidth":{"anyOf":[{"type":"integer","maximum":6144.0,"minimum":320.0},{"type":"null"}],"title":"Screenwidth","description":"Custom screen width in pixels for the browser."},"screenHeight":{"anyOf":[{"type":"integer","maximum":3456.0,"minimum":320.0},{"type":"null"}],"title":"Screenheight","description":"Custom screen height in pixels for the browser."},"record":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Record","description":"Record the browser session to an mp4, retrievable via GET /browsers/{id} once the browser stops. API runs default to off; pass true to enable. Like other browser settings, this only applies when a new browser is provisioned: a follow-up that reuses the session's live browser keeps that browser's recording state. Ignored (always off) for Zero Data Retention projects."}},"additionalProperties":false,"type":"object","title":"RunBrowserSettings","description":"Browser config, owned by the browser row (never the run). Follow-ups:\nomitted fields inherit the session's prior browser; explicit values apply\nonly to newly provisioned browsers (a live browser is reused as-is).\nProfile is the exception: a different profile → 400; an explicit value\nmismatching the live browser's profile (incl. null vs a profiled browser)\ndeclines reuse and provisions fresh. A live browser already matching the\nrequested profile is reused."},"RunCreateRequest":{"properties":{"task":{"type":"string","minLength":1,"title":"Task"},"model":{"type":"string","enum":["glm-5.2","grok-4.5","grok-4.6","glm-5.3-flash","deepseek-v4-flash-vision","kimi-k3","minimax-m3","claude-opus-4.7","claude-opus-4.8","claude-opus-5","claude-fable-5","claude-sonnet-5","gpt-5.5","gpt-5.6","gpt-5.6-sol","gpt-5.6-terra","gpt-5.6-luna","gemini-3.6-flash","gemini-3.5-flash","gemini-3.1-pro","gemini-3-flash"],"title":"Model","default":"gpt-5.6-luna"},"modelParams":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Modelparams","description":"Optional provider-native request parameters for the selected model, written with the provider's own field names and values and forwarded unchanged (e.g. {\"reasoning\": {\"effort\": \"high\"}} for OpenAI, {\"thinking\": {\"type\": \"adaptive\"}} for Anthropic, {\"thinkingConfig\": {\"thinkingLevel\": \"high\"}} for Google). Supported paths and values are per-model; an unsupported path, value, or a model that accepts no parameters at all is rejected with 422. Omitting this field applies the model's default parameters (gpt-5.6-luna defaults to {\"reasoning\": {\"effort\": \"xhigh\"}}); passing {} opts out of that default and leaves the provider's own defaults in place."},"sessionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Sessionid"},"workspaceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspaceid"},"browserSettings":{"anyOf":[{"$ref":"#/components/schemas/RunBrowserSettings"},{"type":"null"}]},"agentmail":{"type":"boolean","title":"Agentmail","description":"If true, provisions a persistent temporary email inbox (via AgentMail) for the run workspace. The agent receives the email address in its context and can send, receive, read, and reply to email. Set false to disable AgentMail for this run.","default":false},"agentcardWalletId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Agentcardwalletid"},"stripeLinkConnectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Stripelinkconnectionid"},"attachedFileIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":20},{"type":"null"}],"title":"Attachedfileids"},"secretBindings":{"anyOf":[{"items":{"$ref":"#/components/schemas/SecretBinding"},"type":"array","maxItems":10},{"type":"null"}],"title":"Secretbindings","description":"Credentials this run may use without ever seeing them. The agent can ask the server to type a binding by alias on one of its allowed domains; it cannot read the value. Bindings are not persisted past the run."},"judge":{"anyOf":[{"$ref":"#/components/schemas/RunJudgeSettings"},{"type":"null"}]},"maxCostUsd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Maxcostusd"}},"additionalProperties":false,"type":"object","required":["task"],"title":"RunCreateRequest"},"RunCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"status":{"type":"string","enum":["queued","dispatching","running","completed","failed","cancelled"],"title":"Status"},"model":{"type":"string","title":"Model"},"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"workspaceId":{"type":"string","format":"uuid","title":"Workspaceid"},"eventsUrl":{"type":"string","title":"Eventsurl"},"missingFileIds":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Missingfileids"}},"type":"object","required":["id","status","model","sessionId","workspaceId","eventsUrl"],"title":"RunCreateResponse"},"RunEvent":{"properties":{"runId":{"type":"string","format":"uuid","title":"Runid"},"id":{"type":"integer","title":"Id"},"ts":{"type":"string","format":"date-time","title":"Ts"},"type":{"type":"string","title":"Type"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["runId","id","ts","type","data"],"title":"RunEvent"},"RunEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/RunEvent"},"type":"array","title":"Events"},"nextAfter":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nextafter"},"hasMore":{"type":"boolean","title":"Hasmore","default":false}},"type":"object","required":["events"],"title":"RunEventsResponse"},"RunJudgeSettings":{"properties":{"context":{"anyOf":[{"type":"string","maxLength":10000},{"type":"null"}],"title":"Context"}},"additionalProperties":false,"type":"object","title":"RunJudgeSettings","description":"Opt-in LLM judgement of the finished run. Presence of this object turns\nthe judge on (send {} for defaults); CP judges the run's trajectory after\nit goes terminal and surfaces the verdict as RunSummary.judgement (null\nuntil it lands). The judge's LLM call is billed to the run."},"RunListResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/RunSummary"},"type":"array","title":"Runs"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"},"hasMore":{"type":"boolean","title":"Hasmore","default":false}},"type":"object","required":["runs"],"title":"RunListResponse"},"RunRecordingResponse":{"properties":{"recordingUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recordingurl"},"available":{"type":"boolean","title":"Available","default":true}},"type":"object","required":["recordingUrl"],"title":"RunRecordingResponse"},"RunStatusResponse":{"properties":{"status":{"type":"string","enum":["queued","dispatching","running","completed","failed","cancelled"],"title":"Status"}},"type":"object","required":["status"],"title":"RunStatusResponse","description":"Minimal poll target: just the run's status. Poll this until terminal\n(cheap indexed lookup, tiny payload — never the task/result text), then\nfetch the full RunSummary once via GET /runs/{id}. Mirrors v2's\nGET /tasks/{id}/status."},"RunSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task":{"type":"string","title":"Task"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"model":{"type":"string","title":"Model"},"contextLimit":{"type":"integer","title":"Contextlimit"},"status":{"type":"string","enum":["queued","dispatching","running","completed","failed","cancelled"],"title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"workspaceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspaceid"},"attachedFileIds":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Attachedfileids"},"judgement":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Judgement"},"totalInputTokens":{"type":"integer","title":"Totalinputtokens"},"totalOutputTokens":{"type":"integer","title":"Totaloutputtokens"},"totalCostUsd":{"type":"string","title":"Totalcostusd"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","task","title","model","contextLimit","status","result","error","sessionId","workspaceId","totalInputTokens","totalOutputTokens","totalCostUsd","createdAt","updatedAt"],"title":"RunSummary"},"SecretBinding":{"properties":{"alias":{"type":"string","title":"Alias","description":"Name the agent refers to this secret by, e.g. \"github_password\"."},"source":{"oneOf":[{"$ref":"#/components/schemas/InlineSecretSource"},{"$ref":"#/components/schemas/OnePasswordSecretSource"}],"title":"Source","discriminator":{"propertyName":"type","mapping":{"inline":"#/components/schemas/InlineSecretSource","onepassword":"#/components/schemas/OnePasswordSecretSource"}}},"allowedDomains":{"items":{"type":"string"},"type":"array","maxItems":10,"minItems":1,"title":"Alloweddomains","description":"Hosts the secret may be typed into, e.g. [\"github.com\"]. A host covers its subdomains. Bare hostnames only — no scheme, port, path, or wildcard."}},"additionalProperties":false,"type":"object","required":["alias","source","allowedDomains"],"title":"SecretBinding","description":"One credential this run may have typed into a browser field.\n\nThe value never reaches the agent. It is encrypted at rest, kept out of the\nworker payload, and typed straight into the focused field by the server when\nthe agent asks for the alias by name — and only while the page it is typing\ninto is on one of `allowedDomains`.\n\nRun-scoped: bindings die with the run, so a follow-up run that needs the same\ncredential must send it again."},"SessionFeedbackItem":{"properties":{"itemId":{"type":"string","title":"Itemid"},"feedbackType":{"$ref":"#/components/schemas/UserFeedbackType"}},"type":"object","required":["itemId","feedbackType"],"title":"SessionFeedbackItem"},"SessionFeedbackResponse":{"properties":{"feedback":{"items":{"$ref":"#/components/schemas/SessionFeedbackItem"},"type":"array","title":"Feedback"}},"type":"object","required":["feedback"],"title":"SessionFeedbackResponse","description":"Every vote across a session, in one request — the run view hydrates\nall its turns' thumb states from this once per session on load."},"SessionFeedbackUpsertRequest":{"properties":{"itemId":{"type":"string","maxLength":20,"pattern":"^e[1-9][0-9]{0,18}$","title":"Itemid"},"feedbackType":{"anyOf":[{"$ref":"#/components/schemas/UserFeedbackType"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Comment"}},"type":"object","required":["itemId"],"title":"SessionFeedbackUpsertRequest","description":"Set or clear thumbs feedback on one chat item of a session.\n\n`item_id` is the item's stable ref as the UI renders it (\"e123\" — the\noriginating event's DB id, globally unique across sessions).\n`feedback_type: null` clears the vote."},"SessionInfo":{"properties":{"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"workspaceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspaceid"},"latestRunId":{"type":"string","format":"uuid","title":"Latestrunid"},"task":{"type":"string","title":"Task"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"type":"string","enum":["queued","dispatching","running","completed","failed","cancelled"],"title":"Status"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["sessionId","workspaceId","latestRunId","task","title","status","createdAt","updatedAt"],"title":"SessionInfo","description":"Lightweight metadata for one V4 session (its most recent run).\n\nDeliberately slim — just what a session list needs (open the conversation,\nshow a label + status + time). The heavy per-run fields (result, error,\ntoken/cost totals) live on RunSummary and aren't repeated here."},"SessionListResponse":{"properties":{"sessions":{"items":{"$ref":"#/components/schemas/SessionInfo"},"type":"array","title":"Sessions"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"},"hasMore":{"type":"boolean","title":"Hasmore","default":false}},"type":"object","required":["sessions"],"title":"SessionListResponse","description":"One entry per session (the session's most recent run), most-recent first.\n\nA V4 session is a conversation: every follow-up run reuses the same\npublic_session_id. GET /api/v4/runs returns one row per RUN, so callers that\nwant a list of distinct *sessions* (e.g. the recent-sessions panel) should\nuse this instead of de-duplicating runs client-side."},"SessionNotFoundError":{"properties":{"detail":{"type":"string","title":"Detail","default":"Session not found"}},"type":"object","title":"SessionNotFoundError","description":"Error response when a session is not found"},"SessionShareInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"shareToken":{"type":"string","title":"Sharetoken"},"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"isActive":{"type":"boolean","title":"Isactive"},"viewCount":{"type":"integer","title":"Viewcount"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"shareUrl":{"type":"string","title":"Shareurl"}},"type":"object","required":["id","shareToken","sessionId","isActive","viewCount","createdAt","shareUrl"],"title":"SessionShareInfo","description":"A session's public share-link state (share modal reads/writes this)."},"SessionShareUpdateRequest":{"properties":{"isActive":{"type":"boolean","title":"Isactive"}},"type":"object","required":["isActive"],"title":"SessionShareUpdateRequest"},"SessionTimeoutLimitExceededError":{"properties":{"detail":{"type":"string","title":"Detail","default":"Maximum session timeout is 4 hours (240 minutes)."}},"type":"object","title":"SessionTimeoutLimitExceededError","description":"Error response when session timeout exceeds the maximum allowed limit"},"SessionUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"}},"type":"object","title":"SessionUpdateRequest","description":"Rename a session. Null clears the user-set name, so the UI falls back to\nthe session's opening task."},"SharedRun":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task":{"type":"string","title":"Task"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"model":{"type":"string","title":"Model"},"status":{"type":"string","title":"Status"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"attachmentCount":{"type":"integer","title":"Attachmentcount","default":0},"events":{"items":{"$ref":"#/components/schemas/RunEvent"},"type":"array","title":"Events"}},"type":"object","required":["id","task","createdAt","model","status","result","error","events"],"title":"SharedRun","description":"One run of a publicly shared session — the read-only subset the share\npage needs to render a turn (no cost/token/browser internals)."},"SharedSessionResponse":{"properties":{"sessionId":{"type":"string","format":"uuid","title":"Sessionid"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"viewCount":{"type":"integer","title":"Viewcount"},"workspaceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Workspaceid"},"runs":{"items":{"$ref":"#/components/schemas/SharedRun"},"type":"array","title":"Runs"},"nextAfter":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Nextafter"},"hasMore":{"type":"boolean","title":"Hasmore","default":false}},"type":"object","required":["sessionId","title","createdAt","viewCount","workspaceId","runs"],"title":"SharedSessionResponse","description":"Public payload for GET /share/{token}: the session transcript with\nsensitive keys scrubbed. Files are listed via the separate\n/share/{token}/files endpoint so download URLs can be minted fresh."},"SteeringCutoff":{"properties":{"sourceRunId":{"type":"string","format":"uuid","title":"Sourcerunid"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"}},"type":"object","required":["sourceRunId","createdAt"],"title":"SteeringCutoff","description":"Earliest accepted steer for one interrupted source run.\n\nThe queue endpoint returns these compact boundaries separately from message\nrows so a remount can keep every interrupted transcript frozen without\nre-sending the full historical steering-message payload."},"StripeLinkStatusResponse":{"properties":{"isConnected":{"type":"boolean","title":"Isconnected"},"connectionId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Connectionid"},"linkEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linkemail"},"mode":{"anyOf":[{"type":"string","enum":["test","live"]},{"type":"null"}],"title":"Mode"}},"type":"object","required":["isConnected"],"title":"StripeLinkStatusResponse","description":"The project's active Stripe Link connection, if any."},"TooManyConcurrentActiveSessionsError":{"properties":{"detail":{"type":"string","title":"Detail","default":"Too many concurrent active sessions. Please wait for one to finish, kill one, or upgrade your plan."}},"type":"object","title":"TooManyConcurrentActiveSessionsError","description":"Error response when user has too many concurrent active sessions"},"UpdateBrowserSessionRequest":{"properties":{"action":{"$ref":"#/components/schemas/BrowserSessionUpdateAction","title":"Action","description":"The action to perform on the session"}},"type":"object","required":["action"],"title":"UpdateBrowserSessionRequest","description":"Request model for updating browser session state."},"UserFeedbackType":{"type":"string","enum":["up","down"],"title":"UserFeedbackType"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkspaceCreateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"}},"type":"object","title":"WorkspaceCreateRequest"},"WorkspaceFileInfo":{"properties":{"path":{"type":"string","title":"Path","description":"File path relative to the workspace root"},"size":{"type":"integer","title":"Size","description":"File size in bytes"},"lastModified":{"type":"string","format":"date-time","title":"Lastmodified","description":"When the file was last modified"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Presigned download URL (60s expiry). Only included when `includeUrls=true`."}},"type":"object","required":["path","size","lastModified"],"title":"WorkspaceFileInfo","description":"A file the agent has produced for the workspace. Shape mirrors V3\nfiles (FileInfo) so a single UI component can render both."},"WorkspaceFileListResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/WorkspaceFileInfo"},"type":"array","title":"Files"},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nextcursor"},"hasMore":{"type":"boolean","title":"Hasmore","default":false}},"type":"object","required":["files"],"title":"WorkspaceFileListResponse"},"WorkspaceFileUploadItem":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Filename, e.g. \"data.csv\""},"contentType":{"type":"string","maxLength":255,"title":"Contenttype","description":"MIME type, e.g. \"text/csv\"","default":"application/octet-stream"},"size":{"type":"integer","maximum":52428800.0,"minimum":1.0,"title":"Size","description":"Exact file size in bytes; the presigned URL is pinned to it."}},"type":"object","required":["name","size"],"title":"WorkspaceFileUploadItem"},"WorkspaceFileUploadRequest":{"properties":{"files":{"items":{"$ref":"#/components/schemas/WorkspaceFileUploadItem"},"type":"array","maxItems":10,"minItems":1,"title":"Files"},"allowOverrides":{"type":"boolean","title":"Allowoverrides","description":"When false, return 409 before reserving storage if any uploaded filename would replace an existing workspace file.","default":true}},"type":"object","required":["files"],"title":"WorkspaceFileUploadRequest"},"WorkspaceFileUploadResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/WorkspaceFileUploadResponseItem"},"type":"array","title":"Files"}},"type":"object","required":["files"],"title":"WorkspaceFileUploadResponse"},"WorkspaceFileUploadResponseItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Upload id. Pass THIS in RunCreateRequest.attachedFileIds to attach the file to a run."},"name":{"type":"string","title":"Name","description":"Original filename from the request"},"storedName":{"type":"string","title":"Storedname","description":"Sanitized filename the object is stored under, e.g. \"data.csv\"."},"path":{"type":"string","title":"Path","description":"Path within the workspace, e.g. \"uploads/data.csv\""},"willOverride":{"type":"boolean","title":"Willoverride","description":"True if a file with this stored_name already exists in the workspace and uploading will replace it. Surface a warning to the user."},"uploadUrl":{"type":"string","title":"Uploadurl","description":"Presigned PUT URL (5 min expiry). PUT the file bytes with the matching Content-Type and Content-Length headers."}},"type":"object","required":["id","name","storedName","path","willOverride","uploadUrl"],"title":"WorkspaceFileUploadResponseItem"},"WorkspaceInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"archived":{"type":"boolean","title":"Archived"},"createdAt":{"type":"string","format":"date-time","title":"Createdat"},"updatedAt":{"type":"string","format":"date-time","title":"Updatedat"}},"type":"object","required":["id","archived","createdAt","updatedAt"],"title":"WorkspaceInfo"},"WorkspaceSizeInfo":{"properties":{"usedBytes":{"type":"integer","minimum":0.0,"title":"Usedbytes","description":"Current workspace storage usage in bytes."},"maxBytes":{"type":"integer","exclusiveMinimum":0.0,"title":"Maxbytes","description":"Maximum workspace storage allowed in bytes."}},"type":"object","required":["usedBytes","maxBytes"],"title":"WorkspaceSizeInfo"},"WorkspaceUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name"}},"type":"object","title":"WorkspaceUpdateRequest"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"X-Browser-Use-API-Key"}}}}