Interacting with Flow.bio programmatically
API Overview
Flow can be interacted with programmatically via its API, either through the flowbio Python library, the Flow AI Skill or by making requests directly to the HTTP API.
The flowbio library and CLI tool
The recommended way to interact with Flow programmatically is through the flowbio Python library. It wraps the HTTP API and handles sample and file uploads, metadata querying, and more.
See the flowbio documentation for full usage instructions.
The Flow AI skill
If you use any of the common AI tools (Claude, ChatGPT, etc), you can add the Flow AI skill to give it context on how to interact with Flow. Documentation for this can be found here.
HTTP API
For cases where you need direct access, Flow exposes an HTTP API. The base URL depends on your Flow instance — for the public instance this is https://app.flow.bio/api.
Most endpoints require an access token in the request header. See the Authentication guide for details.
curl -X GET "https://app.flow.bio/api/samples/owned" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
API conventions
- Base URL:
https://app.flow.bio/api - Authentication: pass your API key as a bearer token —
Authorization: Bearer <api-key>. Most read endpoints work unauthenticated for public data; authenticating simply broadens results to what your account can access (the URLs don't change). - Pagination: search/list endpoints take
?page=(default1) and?count=(default10, max100). - Time filters: all
*_gt/*_ltfilters are Unix timestamps (integers), e.g.created_gt=1746403200.
Search/list responses share one envelope. Note that count is the total number of matches across all pages, not the page size:
{
"count": 248,
"page": 1,
"executions": [
/* ... */
]
}
Endpoints
Search & list
All paginated (see pagination). The array key in the response matches the resource (executions, data, samples).
| Method | Endpoint | Description & key filters |
|---|---|---|
GET | /api/executions/search | Search executions. Filters: pipeline, pipeline_version, status (OK/ERROR/CANCELED/RUNNING), organism, owner, created_gt/created_lt, duration_gt/duration_lt, and terminal (substring search across run stdout/stderr). |
GET | /api/data/search | Search data files. Filters: filename (substring), pattern (regex), data_types (comma-separated identifiers), size_gt/size_lt (bytes), created_gt/created_lt, category. |
GET | /api/samples/search | Search samples. Filters: name, organism, sample_types, project, plus any per-instance metadata attribute as a query parameter. |
Single-record detail
| Method | Endpoint | Description |
|---|---|---|
GET | /api/executions/<id> | Full run record. Poll the status field (OK/ERROR/CANCELED). Payload is large — trim it with ?include=status&include=finished, and tail logs incrementally with ?log=<byte-offset>. |
GET | /api/data/<id> | Full file record (type, size, fileset and execution links). |
GET | /api/data/<id>/contents | Text preview of a file, in 10 KB chunks (?position=<chunk-index>). |
GET | /api/samples/<id> | Full sample record, including metadata. |
GET | /api/samples/<id>/data | Every file related to the sample — raw inputs plus pipeline outputs. |
GET | /api/samples/<id>/executions | Executions the sample appears in. |
Discovery
Useful for resolving names to identifiers and building valid filters.
| Method | Endpoint | Description |
|---|---|---|
GET | /api/pipelines | Full pipeline catalog. |
GET | /api/pipelines/<id> | A pipeline's versions. |
GET | /api/pipelines/versions/<id> | A version's run schema (the parameters a run accepts). |
GET | /api/organisms | Available organisms. |
GET | /api/data/types | Data-type identifiers (for the data_types filter). |
GET | /api/samples/types | Sample-type identifiers (for the sample_types filter). |
GET | /api/samples/metadata | Sample metadata attributes you can filter on. These are per-instance — discover them at runtime rather than hard-coding. |
Running a pipeline
Requires authentication.
| Method | Endpoint | Description |
|---|---|---|
POST | /api/pipelines/versions/<version_id>/run | Start an execution of a pipeline version. |
Fetch the version's schema from /api/pipelines/versions/<id> to see which parameters it accepts, then POST a JSON body:
{
"params": {},
"data_params": {},
"csv_params": {},
"nextflow_version": "23.04.3"
}
params, data_params, and csv_params are each required — send {} for any you aren't using. The response is the execution record (with id and identifier); poll /api/executions/<id> for completion.
Downloading a file
| Method | Endpoint | Description |
|---|---|---|
GET | /api/downloads/<data_id>/<filename> | Direct single-file download. <filename> must match the stored filename exactly. |