curl --request POST \
--url https://api.phylo.bio/v1/experimental/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "prj_0126xxQZB9MmSUaTs1MtRAgU",
"filename": "patient001_brca1.vcf",
"size_bytes": 4321
}
'{
"type": "upload_intent",
"file_id": "file_017jG6PPIYy41dqnVz47lrmo",
"project_id": "prj_014OwAG97UY0UfcHlLHQRnKO",
"path": "orgs/<org>/users/<user>/uploads/projects/proj_6b3606df1c/patient001_brca1.vcf",
"upload_type": "single",
"expires_at": "2026-08-12T22:20:08.147475Z",
"filename": "patient001_brca1.vcf",
"size_bytes": 4321,
"mime_type": "text/plain",
"upload_url": "https://<bucket>.s3.us-west-2.amazonaws.com/",
"fields": {
"Content-Type": "text/plain",
"key": "orgs/<org>/users/<user>/uploads/projects/proj_6b3606df1c/patient001_brca1.vcf",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "<credential>/20260812/us-west-2/s3/aws4_request",
"x-amz-date": "20260812T220508Z",
"x-amz-security-token": "<token>",
"policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0w...",
"x-amz-signature": "5a8d..."
}
}Files
Upload a file
Start an upload so the agent can use the file in a task.
POST
/
experimental
/
files
curl --request POST \
--url https://api.phylo.bio/v1/experimental/files \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project_id": "prj_0126xxQZB9MmSUaTs1MtRAgU",
"filename": "patient001_brca1.vcf",
"size_bytes": 4321
}
'{
"type": "upload_intent",
"file_id": "file_017jG6PPIYy41dqnVz47lrmo",
"project_id": "prj_014OwAG97UY0UfcHlLHQRnKO",
"path": "orgs/<org>/users/<user>/uploads/projects/proj_6b3606df1c/patient001_brca1.vcf",
"upload_type": "single",
"expires_at": "2026-08-12T22:20:08.147475Z",
"filename": "patient001_brca1.vcf",
"size_bytes": 4321,
"mime_type": "text/plain",
"upload_url": "https://<bucket>.s3.us-west-2.amazonaws.com/",
"fields": {
"Content-Type": "text/plain",
"key": "orgs/<org>/users/<user>/uploads/projects/proj_6b3606df1c/patient001_brca1.vcf",
"x-amz-algorithm": "AWS4-HMAC-SHA256",
"x-amz-credential": "<credential>/20260812/us-west-2/s3/aws4_request",
"x-amz-date": "20260812T220508Z",
"x-amz-security-token": "<token>",
"policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0w...",
"x-amz-signature": "5a8d..."
}
}Uploads go directly to cloud storage. The API returns an upload target and never receives the bytes. The response’s
upload_type selects the flow and is chosen from the size_bytes you declare.
upload_type: "single"
POST /experimental/filesreturns afile_id, anupload_url, and thefieldsto send with the bytes.- POST the bytes to
upload_urlas multipart form-data, with every key infieldsincluded as a form field. Success returns204 No Content. POST /experimental/files/{file_id}/finalizewith an empty body.
upload_type: "multipart"
POST /experimental/filesreturns afile_id, anupload_id, apart_size_bytes, and apart_count.- Split the file into
part_countchunks ofpart_size_bytes. The last chunk is the remainder. POST /experimental/files/{file_id}/partswith theupload_idand the part numbers you want, which returns a PUT URL per part. You can request them in batches.- PUT each chunk to its URL and keep the
ETagresponse header for that part number. POST /experimental/files/{file_id}/finalizewith{ "upload_id": "…", "parts": [{ "part_number": 1, "etag": "…" }, … ] }.
file_id to a task with file_ids on POST /experimental/tasks/{id}/messages.Authorizations
Requires an API key. See the Authentication guide.
Body
application/json
Response
200 - application/json
Upload started. For upload_type=single, POST the bytes to upload_url with fields. For upload_type=multipart, pass upload_id to POST /experimental/files/{file_id}/parts.
Allowed value:
"upload_intent"Available options:
single, multipart 