Drex
Start a browser run
Admits a task for a cloud browser agent and answers at once with the queued run; poll GET /v1/browser/runs/{id} for its result. The run browses only allowed_origins, in a sandbox of its own, and is billed once when it ends: its Drex Max and LLM tokens and its browser seconds at the published prices, never more than limits.max_cost_usd. Runs that never start, time out, or fail on Drex's side are not charged; a run cancelled while it runs is charged its browser seconds so far.
- Banking, payment, identity, large social and government sites answer
422with codeorigin_blocked, as do hosts that are not public. - An account's runs may cost at most $20 in any 24 hours unless support raised it; past that,
429with codedaily_spend_limit. - A run's task, URLs, answer and steps are erased 48 hours after it ends.
- Accounts with zero retention cannot create runs (
422, codezero_retention_unsupported).
Authorization
bearerAuth Your API key, sent as Authorization: Bearer nace_sk_...
- Where: the dashboard's API Keys page. It is shown once, when you create it.
- Format:
nace_sk_followed by 43 URL-safe characters (A-Z,a-z,0-9,_and-). - Limit: an account can hold at most 3 active keys.
- Wrong or missing key: returns
401 authentication_error.
In: header
Header Parameters
Same as idempotency_key in the body; both must match when both are sent. A retried key returns the same run.
length <= 200Request Body
application/json
What the agent should do, in plain language.
1 <= length <= 4000An http or https page on a public host, on the default port, whose origin is in allowed_origins.
urilength <= 2048The origins (https://shop.example.com, no path) the run may load. Everything else is blocked.
1 <= items <= 20A JSON Schema (at most 16 KB, without pattern or patternProperties) the answer must match. With one, answer holds the structured answer; a completed answer that does not match fails the run as answer_invalid, charged.
Show variants
The agent never submits payments, sends messages, or makes other irreversible changes.
"deny""deny"Show child attributes
"default""default"Show child attributes
A retried key returns the same run; the same key with a different body answers 409.
1 <= length <= 200Your own strings, returned with the run.
properties <= 20Show child attributes
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/browser/runs" \ -H "Content-Type: application/json" \ -d '{ "task": "string", "start_url": "http://example.com", "allowed_origins": [ "string" ] }'{ "id": "string", "object": "browser_run", "status": "queued", "created_at": "2019-08-24T14:15:22Z"}