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

# download a published artifact file

> Serve a live unlisted artifact's exact bytes to its human page. `download=1` forces attachment disposition; PDF otherwise renders inline. Private artifacts require the invited viewer's Firebase bearer token.



## OpenAPI

````yaml /openapi.json get /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:
  /artifacts/{id}/file:
    get:
      tags:
        - Artifacts
      summary: download a published artifact file
      description: >-
        Serve a live unlisted artifact's exact bytes to its human page.
        `download=1` forces attachment disposition; PDF otherwise renders
        inline. Private artifacts require the invited viewer's Firebase bearer
        token.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: download
          in: query
          schema:
            type: integer
            enum:
              - 1
          description: Force a download.
      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'
        '403':
          description: Access denied
          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'
      security: []
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.

````