Skip to content

Developers

Getting started with the API

Start a research job from your own code, poll it, and read the result.

Step 1

Get an API key

Generate it in the playground or in Settings.

API PLAYGROUND in the left sidebar is the fastest way in. Without a key it says so plainly — "You'll need an API key with research access" — and offers GENERATE KEY, or a link to manage your keys in Settings → API Keys.

  • Do not paste keys into chat, email or screenshots.
  • Do not commit them to source control.
  • Do keep them in a secrets manager or environment variable, and rotate when someone leaves or a key may be exposed.

Checked against the product on October 15, 2026

Step 2

Start a job and poll it

Three endpoints: submit, poll, tail.

The playground writes the calls for you and shows them as CURL, PYTHON or JS. Authorization accepts either a Grep API key or an OAuth access token minted for /api/v2.

CallEndpoint
Submit a runPOST /api/v2/runs
Poll until it is terminalGET /api/v2/runs/{job_id}
Tail the live timeline, newest firstGET /api/v2/runs/{job_id}/timeline?limit=20

The body of the submit call is a question, an effort level and a runtime — for example question, effort "low", runtime "claude_agents". effort takes low, medium, high or build; the older ultra_fast, deep and ultra_deep names are still accepted. runtime is claude_agents or agentrun.

Checked against the product on October 15, 2026

Step 3

Poll politely

Fast at first, then back off.

  • Poll every few seconds at first, then back off as the job runs longer.
  • Stop polling once the job reaches a final state.
  • Handle failures and timeouts rather than retrying forever.
  • Store the job ID against your own workflow record.

Step 4

What it costs, and retrying safely

Same billing as the app; duplicates are real jobs.

API jobs bill exactly like jobs started in the app: a minimum reservation by effort level when the job starts, reconciled to real usage when it finishes.

  • Use idempotency keys or your own request IDs when retrying job creation.
  • Avoid creating duplicate jobs on network retries — each one is charged.
  • Log the final status and cost so you can reconcile later.
  • Start at medium effort unless you know the question is simple or genuinely high-stakes.