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

# retrieve an artifact file

> Retrieve the owning org's exact current bytes, or an immutable historical file selected with version_id.



## OpenAPI

````yaml /openapi.json get /v1/artifacts/{id}/file
openapi: 3.1.0
info:
  title: fetchbean API
  version: v1
  description: >-
    One key for external tools and durable agent work products, with HTTP,
    hosted MCP, exact file artifacts, and spend controls.
servers:
  - url: https://api.fetchbean.com
security:
  - apiKeyAuth: []
paths:
  /v1/artifacts/{id}/file:
    get:
      tags:
        - Artifacts
      summary: retrieve an artifact file
      description: >-
        Retrieve the owning org's exact current bytes, or an immutable
        historical file selected with version_id.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: version_id
          in: query
          schema:
            type: string
          description: Optional id from artifact_versions.
      responses:
        '200':
          description: Exact stored file bytes
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '410':
          description: Expired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            billable:
              type: boolean
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your fetchbean API key (fb_…). Keys are not accepted through
        Authorization.

````