Set up your key
Create a key in Settings → API Keys (see Authentication), then export it:The base URL is
https://api.phylo.bio/api/v1. All requests act within the
workspace your key belongs to.200 means you’re authenticated; a 401 means the key is missing, revoked,
or expired (see Errors & rate limits).
The core loop
1
Create a project
Projects group related tasks and files.Response contains a project
id (proj_...).2
Start a task
Send a message with a To attach files you uploaded to the project, pass their ids as
project_id — Biomni auto-creates a task and starts
the agent. The response includes the new task (with its id, sess_...)."file_ids": ["file_..."] (see Working with files).3
Poll until it's done
Fetch the task and watch Poll on an interval (e.g. every 5–10s) with backoff. Agent tasks can run for
minutes; design for long-running work rather than a single blocking request.
status move from idle/running to
completed (or failed).4
Fetch the results
List the files the agent produced. Each carries a presigned Download each
download_url.download_url to save the outputs.Full example (Python)
A complete, copy-pasteable script that runs the loop end-to-end:Working with files
To give the agent input files, upload them to the project’s Drive first, then reference their ids when you start the task. The bytes go directly to cloud storage — the API only hands you a presigned target and never touches the file itself:POST /files/uploads— begin an upload for a file in a project; returns a presignedupload_url, thefieldsto send with it, and afile_id.- POST the bytes to
upload_urlas form-data with thosefields(returns204). POST /files/{file_id}/finalize— confirm the upload so the agent can read it.- Pass
"file_ids": ["file_..."]in yourPOST /messagescall.
upload_type is single for small
files and multipart for large ones (upload the parts, then finalize with their
ETags). We recommend keeping individual files under 25 GB. See the
Upload a file reference for both flows.
Choosing a model tier
The firstPOST /messages that creates a Task can pick the agent’s model tier
with model: standard (default), fast (lower latency), or max (highest
capability). Omit it to use the account default. The tier is set when the Task
is created, so continuing a Task (task_id) ignores it.
Next steps
- Recipes — batch runs, long-running tasks, cancellation.
- Errors & rate limits — status codes, retries, and limits.
