> ## 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.

# Get Artifact Content In Experiment

> Return raw bytes for a base64-backed artifact entry.

Use this tool only after obtaining ``artifact_name`` from artifact listing
or descriptor endpoints and when raw bytes are actually required. This
route is for binary retrieval, not discovery.

When to Use:
    - Call this only after discovery or descriptor lookup has confirmed the
      correct ``artifact_name``.
    - Call this when raw bytes are required for download or downstream
      processing rather than textual summarization.

Constraints:
    - The stored artifact must resolve to a base64-backed read-side shape.
    - This route is for retrieval only and does not provide artifact
      discovery metadata.

Notes:
    - Agent responses should summarize content type or size when useful,
      not inline the binary data itself.
    - The response is plain HTTP binary content with the detected media
      type.

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

Returns:
    A binary HTTP response with the detected media type.

Raises:
    HTTPException: Raised with ``404`` if the experiment is unavailable to
        the caller or the artifact key is missing, or by helper decoding
        logic when the stored artifact cannot be served as binary content.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /ai/{experiment_id}/artifact/content
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}/artifact/content:
    get:
      summary: Get Artifact Content In Experiment
      description: >-
        Return raw bytes for a base64-backed artifact entry.


        Use this tool only after obtaining ``artifact_name`` from artifact
        listing

        or descriptor endpoints and when raw bytes are actually required. This

        route is for binary retrieval, not discovery.


        When to Use:
            - Call this only after discovery or descriptor lookup has confirmed the
              correct ``artifact_name``.
            - Call this when raw bytes are required for download or downstream
              processing rather than textual summarization.

        Constraints:
            - The stored artifact must resolve to a base64-backed read-side shape.
            - This route is for retrieval only and does not provide artifact
              discovery metadata.

        Notes:
            - Agent responses should summarize content type or size when useful,
              not inline the binary data itself.
            - The response is plain HTTP binary content with the detected media
              type.

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

        Returns:
            A binary HTTP response with the detected media type.

        Raises:
            HTTPException: Raised with ``404`` if the experiment is unavailable to
                the caller or the artifact key is missing, or by helper decoding
                logic when the stored artifact cannot be served as binary content.
      operationId: get_artifact_content_in_experiment
      parameters:
        - name: experiment_id
          in: path
          required: true
          schema:
            type: string
            title: Experiment Id
        - name: artifact_name
          in: query
          required: true
          schema:
            type: string
            title: Artifact Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    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

````