Skip to main content
REST paths are mounted at the root: use /browser-agent, not /api/v1/browser-agents. The AI Gateway is the one API under a prefix, /v1. Copy your pre.dev API key from Integrations → Built-in in the dashboard: pre.dev/projects/integrations for your personal workspace, or the Integrations page of a team workspace. Workspace keys start with pdk_. Read authentication and errors before building an integration.

Specifications

Browser Agents

AI Gateway

The AI Gateway is an OpenAI-compatible API for hundreds of models from every major lab, with the same key and credits. It covers chat completions, the Anthropic Messages shape, embeddings, images, video, audio, files, and a model catalog with credit prices. Point the stock OpenAI, Vercel AI, or Anthropic SDK at that base URL; see the quickstart and pricing.

Long-running jobs

Specifications, browser runs, and video generation run as jobs. All three follow one pattern: submit the job, save the ID it returns, poll or stream that ID, and read the result once the status is terminal. The async job pattern in four steps for specs, browser runs, and video jobs: submit the job, save the ID it returns, poll or stream it, and stop at a terminal status to read the result. The async job pattern in four steps for specs, browser runs, and video jobs: submit the job, save the ID it returns, poll or stream it, and stop at a terminal status to read the result.

SDKs and MCP

The Node SDK and Python SDK wrap specification and browser operations. Use direct HTTP for endpoints or headers without a wrapper, including live browser URLs, existing-run SSE, and browser idempotency keys. The MCP server exposes eight primary tools and three deprecated browser aliases. MCP uses JSON-RPC over HTTP; its parameter names and result envelopes differ from REST. See the tool reference. Two OpenAPI 3.1 files describe the public API, for code generation or agent ingestion: openapi.json covers specifications, browser tasks, and the credit balance, and ai-gateway.openapi.json covers every AI Gateway /v1 operation.