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

# Get File URL

> Returns a presigned download URL by default. If `base64_urls=true`, returns
base64-encoded file content. Control expiry with `expires_in` (seconds).



## OpenAPI

````yaml https://api.chunkr.ai/docs/openapi.json get /files/{file_id}/url
openapi: 3.1.0
info:
  title: Chunkr API
  description: >-
    API service for document layout analysis and chunking to convert document
    into RAG/LLM-ready data.
  contact:
    name: Chunkr
    url: https://chunkr.ai
    email: ishaan@lumina.sh
  license:
    name: ''
  version: 2.62.0
servers:
  - url: https://api.chunkr.ai
    description: Chunkr API
security: []
tags:
  - name: Files
    description: Endpoints for uploading and managing files
  - name: Health
    description: Endpoint for checking the health of the service.
  - name: Tasks
    description: Endpoints for uploading and managing tasks
  - name: Webhook
    description: Endpoints for managing webhooks
paths:
  /files/{file_id}/url:
    get:
      tags:
        - Files
      summary: Get File URL
      description: >-
        Returns a presigned download URL by default. If `base64_urls=true`,
        returns

        base64-encoded file content. Control expiry with `expires_in` (seconds).
      operationId: get_file_url_route
      parameters:
        - name: file_id
          in: path
          description: ID of the file
          required: true
          schema:
            type: string
        - name: expires_in
          in: query
          description: Expiry in seconds for the presigned URL (default 3600)
          required: false
          schema:
            type: integer
            format: int64
        - name: base64_urls
          in: query
          description: If true, returns base64 data instead of a presigned URL
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Presigned URL or base64 data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileUrlResponse'
        '401':
          description: Unauthorized
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: File not found
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Server error
          content:
            text/plain:
              schema:
                type: string
      security:
        - api_key: []
components:
  schemas:
    FileUrlResponse:
      type: object
      required:
        - url
      properties:
        expires_in:
          type:
            - integer
            - 'null'
          format: int64
          description: Expiry in seconds (omitted when base64)
        url:
          type: string
          description: The presigned URL or base64 data (if base64_urls=true)
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: Authorization

````