API 参考
列出文件
列出上传到项目的文件。
返回元数据,而不是内容。用 GET /experimental/files/{id}/content 下载文件。把文件的 id 放在 POST /experimental/tasks/{id}/messages 的 file_ids 中,即可把它附加到任务。
OpenAPI
openapi: 3.1.0
info:
title: BioAgent API — V1
description: Public API for BioAgent, the biomedical AI agent platform.
version: 0.1.0
servers:
- url: https://bioagent.cloud/api/v1
description: >-
BioAgent public API base URL. Every endpoint on this page is served from
this host.
security: []
paths:
/experimental/files:
get:
tags:
- files
summary: List files
description: List the files uploaded to a project.
operationId: list_files_experimental_files_get
parameters:
- name: project_id
in: query
required: true
schema:
type: string
title: Project Id
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
description: Maximum objects to return.
default: 20
title: Limit
description: Maximum objects to return.
- name: before_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Before Id
- name: after_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: After Id
responses:
'200':
description: Page of files uploaded to the project, newest first.
content:
application/json:
schema:
$ref: '#/components/schemas/FileList'
example:
type: list
data:
- id: file_010kaWC7SjxErybg3OdscqX8
type: file
created_at: '2026-08-12T22:06:06.837000Z'
filename: wgs_sample.cram
size_bytes: 21474836480
purpose: input
mime_type: application/octet-stream
project_id: prj_014OwAG97UY0UfcHlLHQRnKO
platform: api
- id: file_017jG6PPIYy41dqnVz47lrmo
type: file
created_at: '2026-08-12T22:05:08.095000Z'
filename: patient001_brca1.vcf
size_bytes: 4321
purpose: input
mime_type: text/plain
project_id: prj_014OwAG97UY0UfcHlLHQRnKO
platform: api
has_more: false
first_id: file_010kaWC7SjxErybg3OdscqX8
last_id: file_017jG6PPIYy41dqnVz47lrmo
security:
- bearerAuth: []
components:
schemas:
FileList:
properties:
type:
type: string
const: list
title: Type
default: list
data:
items:
$ref: '#/components/schemas/File'
type: array
title: Data
has_more:
type: boolean
title: Has More
default: false
first_id:
anyOf:
- type: string
- type: 'null'
title: First Id
last_id:
anyOf:
- type: string
- type: 'null'
title: Last Id
type: object
required:
- data
title: FileList
File:
properties:
id:
type: string
title: Id
type:
type: string
const: file
title: Type
default: file
created_at:
type: string
format: date-time
title: Created At
filename:
type: string
title: Filename
size_bytes:
type: integer
title: Size Bytes
purpose:
type: string
enum:
- input
- output
title: Purpose
mime_type:
anyOf:
- type: string
- type: 'null'
title: Mime Type
task_id:
anyOf:
- type: string
- type: 'null'
title: Task Id
project_id:
anyOf:
- type: string
- type: 'null'
title: Project Id
platform:
type: string
enum:
- api
- mcp
- web
- desktop
- mobile
title: Platform
default: api
type: object
required:
- id
- created_at
- filename
- size_bytes
- purpose
title: File
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Requires an API key. See the Authentication guide.