> ## 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.

# Generate training pairs

> Generate instruction fine-tuning pairs from your data for use in alignment jobs.



## OpenAPI

````yaml post /v1/flow/alignment/generate
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.87.1
servers:
  - url: https://flow.seekr.com
    description: SeekrBuild server base URL
security: []
paths:
  /v1/flow/alignment/generate:
    post:
      tags:
        - Alignment
      summary: Generate training pairs
      description: >-
        Generate instruction fine-tuning pairs from your data for use in
        alignment jobs.
      operationId: alignment_generate_v1_flow_alignment_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlignmentRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlignmentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      deprecated: true
      security:
        - APIKeyHeader: []
components:
  schemas:
    AlignmentRequest:
      properties:
        instructions:
          type: string
          title: Instructions
          description: Task description/instructions for the alignment task
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
          description: >-
            Optional system prompt baked into the generated dataset's `system`
            role on every conversation. If omitted, one is generated from
            `instructions` and the recursive document summary.
        files:
          items:
            type: string
          type: array
          title: Files
          description: List of file ids to use for alignment
        type:
          $ref: '#/components/schemas/AlignmentType'
          description: Type of alignment task (principle or context_data)
          default: principle
        vector_database_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Vector Database Id
          description: >-
            Optional vector database id to use for context retrieval during
            context_data alignment
      additionalProperties: true
      type: object
      required:
        - instructions
        - files
      title: AlignmentRequest
    AlignmentResponse:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
        status:
          $ref: '#/components/schemas/AlignmentJobStatus'
        current_step:
          anyOf:
            - type: string
            - type: 'null'
          title: Current Step
        step_progress:
          anyOf:
            - type: number
            - type: string
            - type: 'null'
          title: Step Progress
        progress:
          anyOf:
            - type: number
            - type: 'null'
          title: Progress
        estimated_completion_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Estimated Completion At
        eta_minutes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Eta Minutes
        status_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Status Message
      additionalProperties: true
      type: object
      required:
        - id
        - created_at
        - status
      title: AlignmentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AlignmentType:
      type: string
      enum:
        - principle
        - context_data
      title: AlignmentType
    AlignmentJobStatus:
      type: string
      enum:
        - pending
        - queued
        - running
        - cancelled
        - failed
        - completed
        - stopped
      title: AlignmentJobStatus
    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:
    APIKeyHeader:
      type: apiKey
      description: Seekr API Key without 'Bearer' Prefix
      in: header
      name: Authorization

````