> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Artifacts In Experiment

> List normalized artifact descriptors derived from experiment metrics.

Use this tool when the caller wants to discover which artifacts exist before
fetching one specific artifact or downloading binary content. Read-side
artifact shapes are normalized for MCP, so the returned ``kind`` may be
more compact than the original write-time ``kind``.

When to Use:
    - Call this before fetching one named artifact or before downloading
      base64-backed content.
    - Call this when the caller needs a discoverable list of current
      artifact keys and normalized output types.

Constraints:
    - The endpoint reads the stored experiment metrics map as-is; it does
      not create a metrics container for experiments that do not already
      have one.
    - The returned ``kind`` reflects MCP normalization, not a guaranteed
      round-trip of the original write-time artifact kind.

Notes:
    - The endpoint returns metadata only.
    - When an artifact is base64-backed, the response includes
      ``content_url`` rather than raw bytes.

Args:
    experiment_id: Parent experiment identifier.
    user: Authenticated user resolved from the API key.
    db: Active database session.

Returns:
    A list of normalized artifact descriptors for the experiment.

Raises:
    HTTPException: Raised with ``404`` when the experiment is not available
        to the caller.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifacts
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.4.0
servers: []
security: []
paths:
  /ai/{experiment_id}/artifacts:
    get:
      summary: List Artifacts In Experiment
      description: >-
        List normalized artifact descriptors derived from experiment metrics.


        Use this tool when the caller wants to discover which artifacts exist
        before

        fetching one specific artifact or downloading binary content. Read-side

        artifact shapes are normalized for MCP, so the returned ``kind`` may be

        more compact than the original write-time ``kind``.


        When to Use:
            - Call this before fetching one named artifact or before downloading
              base64-backed content.
            - Call this when the caller needs a discoverable list of current
              artifact keys and normalized output types.

        Constraints:
            - The endpoint reads the stored experiment metrics map as-is; it does
              not create a metrics container for experiments that do not already
              have one.
            - The returned ``kind`` reflects MCP normalization, not a guaranteed
              round-trip of the original write-time artifact kind.

        Notes:
            - The endpoint returns metadata only.
            - When an artifact is base64-backed, the response includes
              ``content_url`` rather than raw bytes.

        Args:
            experiment_id: Parent experiment identifier.
            user: Authenticated user resolved from the API key.
            db: Active database session.

        Returns:
            A list of normalized artifact descriptors for the experiment.

        Raises:
            HTTPException: Raised with ``404`` when the experiment is not available
                to the caller.
      operationId: list_artifacts_in_experiment
      parameters:
        - name: experiment_id
          in: path
          required: true
          schema:
            type: string
            title: Experiment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContextExperimentArtifact'
                title: Response List Artifacts In Experiment
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    ContextExperimentArtifact:
      properties:
        name:
          type: string
          title: Name
        kind:
          type: string
          title: Kind
        value:
          anyOf:
            - {}
            - type: 'null'
          title: Value
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        content_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Url
        auth_hint:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Auth Hint
        x:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: X
        'y':
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: 'Y'
        points:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Points
      type: object
      required:
        - name
        - kind
      title: ContextExperimentArtifact
      description: |-
        Represent the normalized artifact shape returned by MCP read endpoints.

        Attributes:
            name: Artifact key in experiment metrics.
            kind: Normalized read-side artifact category, typically ``value``,
                ``timeseries``, or a base64-derived media family such as ``image``.
            value: Scalar or JSON-like artifact value.
            mime_type: MIME type for binary or base64-backed artifacts.
            content_url: Relative URL used to fetch raw bytes when needed.
            auth_hint: Header hint used by clients when dereferencing
                ``content_url``.
            x: X-axis metadata for timeseries payloads.
            y: Y-axis metadata for timeseries payloads.
            points: Ordered point list for timeseries payloads.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````