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

# Download tokenized dataset

> Get a presigned URL for the tokenized dataset archive generated for a fine-tune job.



## OpenAPI

````yaml openapi.yaml GET /fine-tunes/{id}/download-tokenized-dataset
openapi: 3.1.0
info:
  title: Together APIs
  description: The Together REST API. See https://docs.together.ai for more details.
  version: 2.0.0
  termsOfService: https://www.together.ai/terms-of-service
  contact:
    name: Together Support
    url: https://www.together.ai/contact
  license:
    name: MIT
    url: https://github.com/togethercomputer/openapi/blob/main/LICENSE
servers:
  - url: https://api.together.ai/v1
    description: Default environment for APIs
  - url: https://api-inference.together.ai/v2
    description: Optimized environment for inference
security:
  - bearerAuth: []
paths:
  /fine-tunes/{id}/download-tokenized-dataset:
    get:
      tags:
        - Fine-tuning
      summary: Download tokenized dataset
      description: >-
        Get a presigned URL for the tokenized dataset archive generated for a
        fine-tune job.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            description: >-
              The ID of the fine-tune job whose tokenized dataset should be
              downloaded.
            type: string
      responses:
        '200':
          description: Presigned tokenized dataset download URL.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FineTuneTokenizedDatasetRetrieveResponse'
        '404':
          description: Fine-tune job or tokenized dataset not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorData'
      x-codeSamples:
        - lang: Python
          label: Together AI SDK (Python)
          source: |
            from together import Together
            import os

            client = Together(
                api_key=os.environ.get("TOGETHER_API_KEY"),
            )

            tokenized_dataset = client.fine_tuning.retrieve_tokenized_dataset(
                id="ft-id",
            )

            print(tokenized_dataset.url)
            print(tokenized_dataset.filename)
            print(tokenized_dataset.size)
        - lang: TypeScript
          label: Together AI SDK (TypeScript)
          source: |
            import Together from "together-ai";

            const client = new Together({
              apiKey: process.env.TOGETHER_API_KEY,
            });

            const tokenizedDataset =
              await client.fineTuning.retrieveTokenizedDataset("ft-id");

            console.log(tokenizedDataset.url);
            console.log(tokenizedDataset.filename);
            console.log(tokenizedDataset.size);
        - lang: JavaScript
          label: Together AI SDK (JavaScript)
          source: |
            import Together from "together-ai";

            const client = new Together({
              apiKey: process.env.TOGETHER_API_KEY,
            });

            const tokenizedDataset =
              await client.fineTuning.retrieveTokenizedDataset("ft-id");

            console.log(tokenizedDataset.url);
            console.log(tokenizedDataset.filename);
            console.log(tokenizedDataset.size);
        - lang: Shell
          label: cURL
          source: >
            curl
            "https://api.together.ai/v1/fine-tunes/ft-id/download-tokenized-dataset"
            \
                 -H "Authorization: Bearer $TOGETHER_API_KEY" \
                 -H "Content-Type: application/json"
components:
  schemas:
    FineTuneTokenizedDatasetRetrieveResponse:
      type: object
      description: Presigned download metadata for a fine-tune tokenized dataset archive.
      required:
        - url
        - filename
        - size
        - content_type
        - expires_at
      properties:
        url:
          type: string
          format: uri
          description: Presigned URL for downloading the tokenized dataset archive.
        filename:
          type: string
          description: >-
            Archive filename to use when saving the downloaded tokenized
            dataset.
        size:
          type: integer
          description: Archive size in bytes.
        content_type:
          type: string
          description: MIME type for the tokenized dataset archive.
        expires_at:
          type: string
          format: date-time
          description: Time when the presigned download URL expires.
    ErrorData:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          properties:
            message:
              type: string
              nullable: false
            type:
              type: string
              nullable: false
            param:
              type: string
              nullable: true
              default: null
            code:
              type: string
              nullable: true
              default: null
          required:
            - type
            - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      x-bearer-format: bearer
      x-default: default

````