Seekr Ingestion API

The Ingestion API from Seekr — 2 operation(s) for ingestion.

OpenAPI Specification

seekr-ingestion-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SeekrFlow Ingestion 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.108.1
servers:
- url: https://flow.seekr.com
  description: SeekrBuild server base URL
tags:
- name: Ingestion
paths:
  /v1/flow/ingestion:
    get:
      tags:
      - Ingestion
      summary: Ingestion List
      description: List all ingestion jobs for the user.
      operationId: ingestion_list_v1_flow_ingestion_get
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestionList'
      security:
      - APIKeyHeader: []
    post:
      tags:
      - Ingestion
      summary: Ingest Files
      description: Convert PDF files to Markdown using the ingestion service.
      operationId: ingest_files_v1_flow_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'
      security:
      - APIKeyHeader: []
  /v1/flow/ingestion/{ingestion_job_id}:
    get:
      tags:
      - Ingestion
      summary: Ingestion Get
      description: Get ingestion job with file records and queue positions.
      operationId: ingestion_get_v1_flow_ingestion__ingestion_job_id__get
      security:
      - APIKeyHeader: []
      parameters:
      - name: ingestion_job_id
        in: path
        required: true
        schema:
          type: string
          title: Ingestion Job Id
      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'
components:
  schemas:
    IngestionList:
      properties:
        object:
          anyOf:
          - type: string
            const: list
          - type: 'null'
          title: Object
        data:
          anyOf:
          - items:
              $ref: '#/components/schemas/IngestionResponse'
            type: array
          - type: 'null'
          title: Data
      additionalProperties: true
      type: object
      title: IngestionList
    IngestionRequest:
      properties:
        files:
          items:
            type: string
          type: array
          title: Files
          description: List of file ids to use for alignment
        method:
          type: string
          title: Method
          description: Method to use for ingestion
          default: best
      additionalProperties: true
      type: object
      required:
      - files
      title: IngestionRequest
    IngestionResponse:
      properties:
        id:
          type: string
          title: Id
          description: Ingestion job ID
        created_at:
          type: string
          format: date-time
          title: Created At
        status:
          $ref: '#/components/schemas/IngestionJobStatus'
        output_files:
          items:
            type: string
          type: array
          title: Output Files
        file_records:
          anyOf:
          - items:
              $ref: '#/components/schemas/IngestionFileRecord'
            type: array
          - type: 'null'
          title: File Records
          description: Detailed file records with queue positions
      additionalProperties: true
      type: object
      required:
      - id
      - created_at
      - status
      - output_files
      title: IngestionResponse
    IngestionJobStatus:
      type: string
      enum:
      - queued
      - running
      - completed
      - failed
      title: IngestionJobStatus
    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
    IngestionFileRecord:
      properties:
        record_id:
          type: string
          title: Record Id
          description: File record ID
        ingestion_job_id:
          type: string
          title: Ingestion Job Id
          description: Parent ingestion job ID
        alignment_file_id:
          type: string
          title: Alignment File Id
          description: Alignment file ID
        user_id:
          type: string
          title: User Id
          description: Owner of the ingestion job
        filename:
          type: string
          title: Filename
          description: Filename
        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 for processing
        status:
          type: string
          title: Status
          description: File processing status
        queue_position:
          anyOf:
          - type: integer
          - type: 'null'
          title: Queue Position
          description: Position in queue if status is queued
        error_message:
          anyOf:
          - type: string
          - type: 'null'
          title: Error Message
          description: Error message if failed
        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: Whether this record has been soft-deleted
          default: false
        created_at:
          type: string
          format: date-time
          title: Created At
        processing_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Processing At
          description: Timestamp when processing started
        completed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Completed At
          description: Timestamp when processing completed
        failed_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Failed At
          description: Timestamp when processing failed
      additionalProperties: true
      type: object
      required:
      - record_id
      - ingestion_job_id
      - alignment_file_id
      - user_id
      - filename
      - status
      - created_at
      title: IngestionFileRecord
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      description: Your Seekr API key, sent in the Authorization header with no 'Bearer' prefix.
      in: header
      name: Authorization