SDKs
SDKs
The official Node.js and Python SDKs for specifications and browser tasks.
Both SDKs use the package name predev-api and cover specification generation and Browser Agents.
npm install predev-apipip install predev-api| Node.js / TypeScript | Python | |
|---|---|---|
| Import | import { PredevAPI } from 'predev-api' | from predev_api import PredevAPI |
| Runtime | Node.js 18+ | Python 3.8+ |
| HTTP behavior | Promises; async generator for browser streams | Blocking requests; iterator for browser streams |
| Specification and browser results | JavaScript objects | Dictionaries |
| Credit balance | JavaScript object | CreditsBalanceResponse object |
| Operation | Node | Python |
|---|---|---|
| Generate a spec | fastSpec, deepSpec | fast_spec, deep_spec |
| Submit a spec and poll | fastSpecAsync, getSpecStatus | fast_spec_async, get_spec_status |
| List or search specs | listSpecs, findSpecs | list_specs, find_specs |
| Read the credit balance | getCreditsBalance() | get_credits_balance() |
| Run browser tasks | browserAgent(tasks, options) | browser_agent(tasks, ...) |
| Submit browser tasks asynchronously | { async: true } | run_async=True |
| Stream a new browser submission | { stream: true } → async generator | stream=True → iterator |
| Retrieve a browser run | getBrowserAgent(id, options) | get_browser_agent(id, include_events=False) |
| List browser runs | listBrowserAgents(params) | list_browser_agents(...) |
| Read your browser queue | browserAgentStatus() | browser_agent_status() |
Both clients accept an API key and optional base URL. Neither exposes a client-wide timeout, retry, or arbitrary-header option. Use direct REST for live browser URLs, existing-run SSE, capacity statistics, and idempotency keys.
Was this page helpful?