文档

API 参考

列出任务结果

列出智能体在任务下生成的文件,每个都带下载链接。

列出智能体目前写出的所有文件,包括任务仍在运行时写入的文件。with_urls(默认 true)会为每个文件附加下载 URL。

未知的 task_id 返回 404,因此空的 data 数组表示该任务没有产出文件。

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/tasks/{task_id}/results:
    get:
      tags:
        - results
      summary: List task results
      description: >-
        List the files the agent produced under a task, each with a download
        link.
      operationId: list_task_results_experimental_tasks__task_id__results_get
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
        - name: with_urls
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Include a download URL for each file. Set to false for a faster
              response.
            default: true
            title: With Urls
          description: >-
            Include a download URL for each file. Set to false for a faster
            response.
        - 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 result files, each with a download URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResultList'
              example:
                type: list
                data:
                  - type: result_file
                    result_id: res_016YNAz7cvmPXcqvGoR1U57t
                    name: BRCA1_ClinVar_variant_summary.md
                    size_bytes: 6149
                    mime_type: text/markdown
                    created_at: '2026-08-12T21:23:32Z'
                    download_url: >-
                      https://<bucket>.s3.us-west-2.amazonaws.com/orgs/<org>/users/<user>/results/projects/proj_6b3606df1c/sessions/sess_4c1a28c0e48b/BRCA1_ClinVar_variant_summary.md?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Signature=...
                has_more: false
                first_id: res_016YNAz7cvmPXcqvGoR1U57t
                last_id: res_016YNAz7cvmPXcqvGoR1U57t
      security:
        - bearerAuth: []
components:
  schemas:
    ResultList:
      properties:
        type:
          type: string
          const: list
          title: Type
          default: list
        data:
          items:
            $ref: '#/components/schemas/ResultFile'
          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: ResultList
      description: '`first_id` and `last_id` carry `result_id` values.'
    ResultFile:
      properties:
        type:
          type: string
          const: result_file
          title: Type
          default: result_file
        result_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Result Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        download_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Download Url
        ai_disclosure:
          anyOf:
            - $ref: '#/components/schemas/AiDisclosure'
            - type: 'null'
      type: object
      title: ResultFile
    AiDisclosure:
      properties:
        is_ai_generated:
          type: boolean
          const: true
          title: Is Ai Generated
          default: true
        generator:
          type: string
          title: Generator
          default: bioagent
        model_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Model Ids
        task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Id
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
      type: object
      title: AiDisclosure
      description: >-
        Present only on deployments with EU AI Act transparency controls
        enabled.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Requires an API key. See the Authentication guide.