Skip to main content
POST
Describe a browser task in plain English; OneShot runs it and returns the result. Pass output_schema to get structured JSON back. The first call returns a quote (402); the second, with payment, runs the task and returns a request_id to poll.

Request body

string
required
The task, 10 to 50,000 characters. For example: “Go to example.com/pricing and extract all plan names, prices, and features into a table”.
object
JSON schema for the output.
string
Starting URL. If omitted, picked from the task.
string[]
Domains to stay within, subdomains included. Checked after each recorded navigation, not a network block; one outside them ends the task with browser_domain_not_allowed.
string
Persistent browser profile: cookies, local storage and session state reused across tasks.
object
Unsupported; rejected before payment. Import cookies or storage_state into a profile instead.
string
UUID of a previous browser session to resume; keeps its cookies and login state.
integer
25 to 100, default 50. Not an exact action limit. Under 25 is rejected before payment. The SDK’s maxCost limits quote and payment approval separately.

Quote response (402)

context.quote_id, context.task_summary, context.estimated_steps, context.max_steps, context.estimated_cost (USDC), context.complexity_score (0-1) and context.expires_at (30 minutes).

Execution response (202)

request_id (poll /v1/requests/{id}), status (processing), idempotency_key, browser.estimated_steps and browser.estimated_cost from the quote.

Retrying safely

Replay, never re-attempt: resend a lost response with the same X-Quote-ID; the original 202 returns with Idempotent-Replay: true, nothing settles or reruns. Keys answer only the wallet that proved them (signed payment, x-agent-proof or access token). 409 quote_claim_unresolved: unclaimed quote after settlement, payment credited back, request a new quote. Idempotency-Key and other retry errors: as for Purchase.

Completed job result

string | object
Extracted data; JSON when output_schema was passed.
array
[{ number, goal, url }]. Goals are safe action categories. URLs omit credentials, query strings and fragments; an empty string means unavailable. step_count counts actions taken and can differ from the list length; steps_incomplete flags missing activity.
number
Usage cost before OneShot fees, also returned as total_cost_usd. Zero is valid; null means unavailable. A reused session reports the incremental cost.
number | null
What you were charged, after any amount credited back. Null means the final charge is not ready; poll again.
string[]
Downloaded files and screenshots
A failed job still returns partial output, steps, costs and session ID in result. TypeScript throws JobError with code and partialResult; Python exposes code and partial_result. Codes distinguish timeout, stall, cost limit, navigation block, detached frame and unknown failure. Keep error_ref for support. Failed tasks are not replayed.
Charged per step, with a per-session minimum. See Pricing.