twoHelixestwoHelixes Start free

API

Every chart is one HTTP call away

JSON in, JSON out. Authenticate with a bearer API key from the billing page, or with a session cookie if you are calling from a browser already signed in.

POST /v1/query

Get a chart

Runs the whole pipeline and returns the finished figure, the chart config, the row count and every warning it raised on the way. It returns a figure even when a stage had to fall back.

curl -X POST https://twohelixes.com/v1/query \
  -H "Authorization: Bearer $TWOHELIXES_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"revenue by region this quarter","source_id":"..."}'
POST /v1/query/stream

Stream the run

The same call as server-sent events, so a long run can show its progress and its partial chart as it goes. Event names: stage, thought, warning, partial, result, done.

curl -N -X POST https://twohelixes.com/v1/query/stream \
  -H "Authorization: Bearer $TWOHELIXES_KEY" \
  -d '{"q":"which regions are shrinking?"}'
POST /v1/sql/generate

Generate SQL

Schema-aware SQL for a question. The statement is checked read-only before it is returned, and again before any driver executes it.

curl -X POST https://twohelixes.com/v1/sql/generate \
  -H "Authorization: Bearer $TWOHELIXES_KEY" \
  -d '{"source_id":"...","question":"top customers by lifetime value"}'
GET /v1/chart/{id}/export

Export a chart

SVG, PNG or CSV. SVG is drawn by our own exporter - deterministic, no headless browser, and editable markup.

curl "https://twohelixes.com/v1/chart/$ID/export?format=svg&mode=dark" \
  -H "Authorization: Bearer $TWOHELIXES_KEY"
GET /v1/chart/{id}/notebook

Export a notebook

The whole run as a notebook: the data, the transformation that was run and the chart rebuilt with the same palette. format=ipynb for Jupyter, or the default marimo file, which we can also host for you.

curl -O -J "https://twohelixes.com/v1/chart/$ID/notebook?format=ipynb" \
  -H "Authorization: Bearer $TWOHELIXES_KEY"

Rate limits

Free accounts are limited per minute, per hour and per day, and to a lifetime allowance of 3 AI queries. Requests paid for with API credits are not rate limited beyond a global per-account safety valve.

  • Charging happens after success — a failed pipeline does not spend anything.
  • Generated SQL is checked read-only before it reaches a driver, on every path.
  • Every response carries the warnings the run produced, so a degraded answer is never silently a clean one.
Get an API key