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

# Download one of a fine tune's model files

> Streams one file listed by the bundle route, with its hash in x-tokz-sha256. Every file counts against the organization's daily download limit, so use GET and not HEAD, which counts the same bytes.



## OpenAPI

````yaml /openapi.json get /fine-tunes/{name}/bundle/{file}
openapi: 3.1.0
info:
  title: tokz API
  version: 1.0.0
  description: >-
    Typed decisions about text from the open OpenDecision models. Text sent to
    /decide is read by the model and never stored or logged; only counters are
    kept. Fine tunes are built in the dashboard, which is not part of this API.
  contact:
    name: tokz
    url: https://tokz.dev
servers:
  - url: https://api.tokz.dev
    description: Production
  - url: http://127.0.0.1:3999
    description: Local dev (dev:pglite)
security:
  - bearerAuth: []
tags:
  - name: Decisions
    description: Typed decisions about text, answered by the OpenDecision models.
  - name: Fine tunes
    description: >-
      The files of a model you trained. Starting, canceling and deleting one
      happen in the dashboard.
  - name: Operations
    description: Health and diagnostics.
paths:
  /fine-tunes/{name}/bundle/{file}:
    get:
      tags:
        - Fine tunes
      summary: Download one of a fine tune's model files
      description: >-
        Streams one file listed by the bundle route, with its hash in
        x-tokz-sha256. Every file counts against the organization's daily
        download limit, so use GET and not HEAD, which counts the same bytes.
      operationId: getFineTuneFile
      parameters:
        - name: name
          in: path
          required: true
          schema:
            type: string
          description: The model's name, as shown in the dashboard.
        - name: file
          in: path
          required: true
          schema:
            type: string
            enum:
              - hosted.onnx
              - hosted.keep.bin
              - tokenizer.json.gz
              - manifest.json
      responses:
        '200':
          description: The file's bytes.
          headers:
            x-tokz-sha256:
              description: SHA-256 of the file, in hex.
              schema:
                type: string
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/FineTuneNotFound'
        '429':
          description: >-
            The organization used its downloads for today
            (fine_tune_download_limit), has too many in progress
            (fine_tune_download_busy), or the key hit its rate limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: >-
            Fine Tune is off (fine_tune_off), or the model is loading or cannot
            load (model_unavailable).
          headers:
            Retry-After:
              description: >-
                Seconds to wait before sending again. Present on most refusals
                of a fine tune.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  responses:
    Unauthorized:
      description: Missing, malformed, revoked, or incorrect API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    FineTuneNotFound:
      description: >-
        No ready model with that name in this key's organization. Another
        organization's model, a deleted one and an unfinished one all get this
        same answer.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: A code or a short message. Never contains payload content.
        message:
          type: string
          description: >-
            What went wrong and what to do next, when the API has a sentence for
            it.
        requestId:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your API key: `Authorization: Bearer tokz_live_<id>_<secret>`. Only a
        SHA-256 hash of the secret is stored.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.