Drex

Start a browser run

- Banking, payment, identity, large social and government sites answer 422 with code origin_blocked, as do hosts that are not public. - An account's runs have a $20 resource limit in any 24 hours unless support raised it; failed and cancelled runs count their measured work without a customer charge. Past that, 429 with code daily_spend_limit. - A run's task, URLs, answer and steps stay until you delete your account. - Accounts with zero retention cannot create runs (422, code zero_retention_unsupported).

POST
/v1/browser/runs
  • Banking, payment, identity, large social and government sites answer 422 with code origin_blocked, as do hosts that are not public.
  • An account's runs have a $20 resource limit in any 24 hours unless support raised it; failed and cancelled runs count their measured work without a customer charge. Past that, 429 with code daily_spend_limit.
  • A run's task, URLs, answer and steps stay until you delete your account.
  • Accounts with zero retention cannot create runs (422, code zero_retention_unsupported).

Authorization

bearerAuth
AuthorizationBearer <token>

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

Idempotency-Keystring

Same as idempotency_key in the body; both must match when both are sent. A retried key returns the same run.

Lengthlength <= 200

Request Body

application/json

taskstringrequired

What the agent should do, in plain language.

Length1 <= length <= 4000
start_urlstringrequired

An http or https page on a public host, on the default port, whose origin is in allowed_origins.

Formaturi
Lengthlength <= 2048
allowed_originsarray<string>required

The origins (https://shop.example.com, no path) the run may load. Everything else is blocked.

Items1 <= items <= 20
answer_schemaobject | null

A 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, uncharged.

Show variants
risky_actions"deny"

The agent never submits payments, sends messages, or makes other irreversible changes.

Default"deny"
Value in"deny"
limitsBrowserRunLimits
Show child attributes
model"default"
Default"default"
Value in"default"
artifactsBrowserRunArtifactOptions
Show child attributes
idempotency_keystring

A retried key returns the same run; the same key with a different body answers 409.

Length1 <= length <= 200
metadataobject

Up to 20 key-value pairs of your own, as an object of strings (keys up to 64 characters, values up to 500), returned with the run.

Propertiesproperties <= 20
Show 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": "Find the cheapest SSD of at least 1 TB and return its name and price",    "start_url": "https://shop.example.com/",    "allowed_origins": [      "https://shop.example.com"    ],    "limits": {      "max_cost_usd": 0.05,      "max_seconds": 300    }  }'
{  "id": "string",  "object": "browser_run",  "status": "queued",  "created_at": "2019-08-24T14:15:22Z"}