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

# Convert PDF files to markdown

> Convert PDF files to Markdown format for use in alignment and fine-tuning.

> [!WARNING]
>
> The alignment endpoints stop working on November 9, 2026. Use [`POST /v1/flow/ingestion`](https://docs.seekr.com/flow/reference/ingest_files_v1_flow_ingestion_post) for standalone file conversion, or [`POST /v1/flow/data-jobs/{data_job_id}/add-files`](https://docs.seekr.com/flow/reference/add_files_to_data_job_v1_flow_data_jobs__data_job_id__add_files_post) to convert files as part of a data job.

Submit one or more uploaded file IDs to start an ingestion job. The system converts each file to markdown for use in downstream workflows like fine-tuning.

The response includes a `file_records` array with per-file tracking. Each record contains the file's status, timestamps for each state transition, and error diagnostics if a failure occurs.

For job states, error codes, and SDK examples, see [Monitor ingestion](https://docs.seekr.com/flow/sdk/data-engine/monitor-ingestion.md).


## OpenAPI

````yaml post /v1/flow/alignment/ingestion
openapi: 3.1.0
info:
  title: SeekrFlow API
  description: SeekrFlow API Documentation
  termsOfService: http://www.seekr.com/support
  contact:
    name: Seekr API Support
    url: http://www.seekr.com/contact
    email: contact@seekr.com
  version: 5.145.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/alignment/ingestion:
    post:
      tags:
        - Alignment
      summary: Ingest Files
      description: |-
        Deprecated. Convert PDF files to Markdown using the ingestion service.

        Use ``POST /v1/flow/ingestion`` (standalone) or
        ``POST /v1/flow/data-jobs/{data_job_id}/add-files`` (data-job context).
      operationId: ingest_files_v1_flow_alignment_ingestion_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestionRequest'
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestionResponse'
        '422':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      deprecated: true
      security:
        - APIKeyHeader: []
components:
  schemas:
    IngestionRequest:
      properties:
        files:
          items:
            type: string
          type: array
          title: Files
          description: IDs of the files to convert.
        method:
          type: string
          title: Method
          description: Method used to convert the files.
          default: best
      additionalProperties: true
      type: object
      required:
        - files
      title: IngestionRequest
    IngestionResponse:
      properties:
        id:
          type: string
          title: Id
          description: ID of the file conversion job.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Time the file conversion job was created, in ISO 8601 format.
        status:
          $ref: '#/components/schemas/IngestionJobStatus'
        output_files:
          items:
            type: string
          type: array
          title: Output Files
          description: IDs of the files the job produced.
        file_records:
          anyOf:
            - items:
                $ref: '#/components/schemas/IngestionFileRecord'
              type: array
            - type: 'null'
          title: File Records
          description: Detailed records for each file, including queue positions.
      additionalProperties: true
      type: object
      required:
        - id
        - created_at
        - status
        - output_files
      title: IngestionResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
          description: List of validation errors.
      type: object
      title: HTTPValidationError
    IngestionJobStatus:
      type: string
      enum:
        - queued
        - running
        - completed
        - failed
      title: IngestionJobStatus
    IngestionFileRecord:
      properties:
        record_id:
          type: string
          title: Record Id
          description: ID of the file record.
        ingestion_job_id:
          type: string
          title: Ingestion Job Id
          description: ID of the file conversion job the record belongs to.
        alignment_file_id:
          type: string
          title: Alignment File Id
          description: ID of the alignment file.
        user_id:
          type: string
          title: User Id
          description: ID of the user who owns the file conversion job.
        filename:
          type: string
          title: Filename
          description: Name of the file.
        metaflow_job_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Metaflow Job Id
          description: Metaflow job handling this file.
        method:
          anyOf:
            - type: string
            - type: 'null'
          title: Method
          description: Ingestion method used to process the file.
        status:
          type: string
          title: Status
          description: Processing status of the file.
        queue_position:
          anyOf:
            - type: integer
            - type: 'null'
          title: Queue Position
          description: Position in the queue while the file is queued.
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message when processing fails.
        suggested_fix:
          anyOf:
            - type: string
            - type: 'null'
          title: Suggested Fix
          description: Suggested fix when processing fails.
        worker_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Worker Id
          description: Worker currently handling the file.
        deleted:
          type: boolean
          title: Deleted
          description: If true, the record was deleted.
          default: false
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Time the file record was created, in ISO 8601 format.
        processing_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Processing At
          description: Time processing started, in ISO 8601 format.
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: Time processing completed, in ISO 8601 format.
        failed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Failed At
          description: Time processing failed, in ISO 8601 format.
        progress:
          anyOf:
            - type: number
            - type: 'null'
          title: Progress
          description: >-
            How much of the file has been processed, as a fraction in the range
            0–1. `null` when no progress has been reported for this record,
            which is the case for records processed before progress reporting
            shipped. Do not use this value to detect completion. A finished
            record does not necessarily reach 1, so use `status` instead.
        progress_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Progress At
          description: >-
            When the `progress` value was last measured. `null` when
            unavailable.
        projected_progress:
          anyOf:
            - type: number
            - type: 'null'
          title: Projected Progress
          description: >-
            An estimate of current progress, as a fraction in the range 0–1. Use
            it to advance a progress indicator between measurements of
            `progress`. `null` when unavailable.
        projected_progress_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Projected Progress At
          description: When `projected_progress` was calculated. `null` when unavailable.
      additionalProperties: true
      type: object
      required:
        - record_id
        - ingestion_job_id
        - alignment_file_id
        - user_id
        - filename
        - status
        - created_at
      title: IngestionFileRecord
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
          description: Location of the error, as a list of path segments.
        msg:
          type: string
          title: Message
          description: Description of the error.
        type:
          type: string
          title: Error Type
          description: Type of the error.
        input:
          title: Input
          description: Input that caused the error.
        ctx:
          type: object
          title: Context
          description: Extra context about the error.
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: >-
        Your Seekr API key, sent in the Authorization header with no 'Bearer'
        prefix.
      in: header
      name: Authorization

````

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