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

# Download

> Downloads the output of a completed job. If you processed your job with the 'sota' strategy, you can download any of [html, text, markdown, chunks] output formats. If you processed your file with 'vision' or 'default', you can only get text back.



## OpenAPI

````yaml GET /v1.0.1/file/download/{job_id}
openapi: 3.0.1
info:
  title: ReadFile Documentation
  description: This is the API documentation for the ReadFile API
  license:
    name: MIT
  version: 1.0.1
servers:
  - url: https://api.readfile.io/
security:
  - ApiKeyAuth: []
paths:
  /v1.0.1/file/download/{job_id}:
    get:
      description: >-
        Downloads the output of a completed job. If you processed your job with
        the 'sota' strategy, you can download any of [html, text, markdown,
        chunks] output formats. If you processed your file with 'vision' or
        'default', you can only get text back.
      parameters:
        - in: path
          name: job_id
          schema:
            type: string
          required: true
          description: The ID of the processing job
        - in: query
          name: outputFormat
          schema:
            type: string
            enum:
              - html
              - text
              - markdown
              - chunks
            default: text
          required: true
          description: >-
            The format of the extraction you want to download. N.B. Only 'text'
            is supported for 'default' and 'vision' strategies.
      responses:
        '200':
          description: Successfully retrieved the extracted text
          content:
            text/plain:
              schema:
                anyOf:
                  - type: string
                    description: >-
                      A string response, for example if you select 'html',
                      'markdown', or 'text' as an 'outputFormat', the response
                      will just be a string.
                  - type: object
                    description: >-
                      A JSON object response, for example if you select 'chunks'
                      as an 'outputFormat', the response will be a structured
                      object containing chunks, respectively made up [text,
                      label, location, parent, children, headings, origin].
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate Limit Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````