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

# Download a file

> <p>Redirect to a short-lived signed URL that serves the file bytes.</p>



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/indices/openapi.documented.yml get /v1beta/files/{file_id}/download
openapi: 3.1.0
info:
  title: Indices API
  description: 'The Indices REST API. See docs for details: https://docs.indices.io'
  version: 0.0.1
servers:
  - url: https://api.indices.io
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
    description: Create a task to repeatedly perform an action on an external website.
  - name: Runs
    description: Execute a task.
  - name: Secrets
    description: Manage secrets like login credentials and API keys.
paths:
  /v1beta/files/{file_id}/download:
    get:
      tags:
        - Files
      summary: Download a file
      description: <p>Redirect to a short-lived signed URL that serves the file bytes.</p>
      operationId: downloadFile
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the file to download.
            title: File Id
          description: The ID of the file to download.
      responses:
        '307':
          description: Successful response
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Enter your API key as the bearer token. Set header: `Authorization` to
        `Bearer <api_key>`

````