Skip to main content

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-api
pip install predev-api
Node.js / TypeScriptPython
Importimport { PredevAPI } from 'predev-api'from predev_api import PredevAPI
RuntimeNode.js 18+Python 3.8+
HTTP behaviorPromises; async generator for browser streamsBlocking requests; iterator for browser streams
Specification and browser resultsJavaScript objectsDictionaries
Credit balanceJavaScript objectCreditsBalanceResponse object
OperationNodePython
Generate a specfastSpec, deepSpecfast_spec, deep_spec
Submit a spec and pollfastSpecAsync, getSpecStatusfast_spec_async, get_spec_status
List or search specslistSpecs, findSpecslist_specs, find_specs
Read the credit balancegetCreditsBalance()get_credits_balance()
Run browser tasksbrowserAgent(tasks, options)browser_agent(tasks, ...)
Submit browser tasks asynchronously{ async: true }run_async=True
Stream a new browser submission{ stream: true } → async generatorstream=True → iterator
Retrieve a browser rungetBrowserAgent(id, options)get_browser_agent(id, include_events=False)
List browser runslistBrowserAgents(params)list_browser_agents(...)
Read your browser queuebrowserAgentStatus()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?