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

# Create Alignment

> Create a new domain alignment workflow.


This endpoint initiates a domain alignment workflow that fine-tunes a base model using provided documents.


**Request Body:**

- `name`: Name of the domain alignment project
- `base_model`: Base model to use for alignment (e.g., `nugen-flash-instruct`)
- `document_ids`: List of document IDs to use for training data
- `workflow_id` (optional): Custom workflow identifier
- `benchmark_id` (optional): Benchmark ID for post-alignment evaluation
- `description` (optional): Description of the alignment project


**Returns:**

- `id`: Unique alignment identifier for tracking workflow progress
- `status`: Initial workflow status (always `PROCESSING`)


**Raises:**

- `400`: If base model doesn't support alignment or training provider is invalid
- `404`: If document IDs are not found or don't belong to user


**Example Request:**

```json
POST /api/v3/alignment/create
Headers: {"Authorization": "Bearer <api_key>"}

{
  "name": "Customer Support Domain Alignment",
  "base_model": "nugen-flash-instruct",
  "document_ids": ["doc-123", "doc-456", "doc-789"],
  "benchmark_id": "task-abc123",
  "description": "Alignment for customer support documentation and FAQs"
}
```


**Example Response:**

```json
{
  "id": "alignment-xyz789",
  "status": "PROCESSING"
}
```


**Notes:**

- Use `/alignment/status/{id}` to track workflow progress
- If `benchmark_id` is provided, the model will be evaluated automatically after alignment
- Only models that support alignment can be used.



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json post /api/v3/alignment-project/create
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/alignment-project/create:
    post:
      tags:
        - Alignment Project
      summary: Create Alignment
      description: >-
        Create a new domain alignment workflow.



        This endpoint initiates a domain alignment workflow that fine-tunes a
        base model using provided documents.



        **Request Body:**


        - `name`: Name of the domain alignment project

        - `base_model`: Base model to use for alignment (e.g.,
        `nugen-flash-instruct`)

        - `document_ids`: List of document IDs to use for training data

        - `workflow_id` (optional): Custom workflow identifier

        - `benchmark_id` (optional): Benchmark ID for post-alignment evaluation

        - `description` (optional): Description of the alignment project



        **Returns:**


        - `id`: Unique alignment identifier for tracking workflow progress

        - `status`: Initial workflow status (always `PROCESSING`)



        **Raises:**


        - `400`: If base model doesn't support alignment or training provider is
        invalid

        - `404`: If document IDs are not found or don't belong to user



        **Example Request:**


        ```json

        POST /api/v3/alignment/create

        Headers: {"Authorization": "Bearer <api_key>"}


        {
          "name": "Customer Support Domain Alignment",
          "base_model": "nugen-flash-instruct",
          "document_ids": ["doc-123", "doc-456", "doc-789"],
          "benchmark_id": "task-abc123",
          "description": "Alignment for customer support documentation and FAQs"
        }

        ```



        **Example Response:**


        ```json

        {
          "id": "alignment-xyz789",
          "status": "PROCESSING"
        }

        ```



        **Notes:**


        - Use `/alignment/status/{id}` to track workflow progress

        - If `benchmark_id` is provided, the model will be evaluated
        automatically after alignment

        - Only models that support alignment can be used.
      operationId: create_alignment_workflow
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAlignmentWithSyntheticDataRequest'
        required: true
      responses:
        '200':
          description: >-
            Returns a unique identifier for the initiated domain alignment
            workflow along with the initial workflow status. This endpoint
            starts an asynchronous process to fine-tune a base model using
            provided documents and optional benchmark evaluation, allowing users
            to track progress and retrieve results once completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAlignmentProjectResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    CreateAlignmentWithSyntheticDataRequest:
      properties:
        name:
          type: string
          title: Name
          description: Name of the domain alignment project
          example: My Alignment Project
        base_model:
          type: string
          title: Base Model
          description: Base model that alignment will be based on
          example: nugen-flash-instruct
        workflow_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Workflow Id
          description: This id is to orchestrate the entire flow
          example: workflow-abc123
        benchmark_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Benchmark Id
          description: >-
            Benchmark ID for evaluation (created via /benchmark/create or
            /benchmark/upload)
          example: benchmark-xyz789
        document_ids:
          items:
            type: string
          type: array
          title: Document Ids
          description: List of document IDs to generate synthetic training data from
          example:
            - doc-abc123
            - doc-def456
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional project description
          example: >-
            This project aims to align the model for better customer support
            performance.
      type: object
      required:
        - name
        - base_model
        - document_ids
      title: CreateAlignmentWithSyntheticDataRequest
    CreateAlignmentProjectResponse:
      properties:
        alignment_id:
          type: string
          title: Alignment Id
          description: Created alignment project task identifier
          example: alignment-project-123
        status:
          type: string
          title: Status
          description: Initial alignment project status
          default: PROCESSING
          example: PROCESSING
      type: object
      required:
        - alignment_id
      title: CreateAlignmentProjectResponse
      description: Response schema for alignment project creation endpoint
    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
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````