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

# List Aligned Models

> Retrieve all domain-aligned models for the authenticated user.

This endpoint returns a list of custom models that have been created through domain alignment workflows, including their deployment status, evaluation results, and conversation settings.

**Returns:**
- `domain_aligned_models`: List of aligned model objects, each containing:
  - `id`: Unique model identifier (or `alignment-{id}` for un-deployed models)
  - `alignment_id`: Original alignment project ID
  - `name`: Model name
  - `base_model`: Base model used for alignment
  - `alignment_project`: Name of the alignment project
  - `created_date`: Creation timestamp
  - `status`: Model status (e.g., `DEPLOYED`, `UNDEPLOYED`, `DEPLOYING`, `UNDEPLOYING`, `EVALUATED`)
  - `deployment_status`: Current deployment state (`DEPLOYED` or `UNDEPLOYED`)
  - `endpoint`: Inference endpoint URL (only for deployed models)
  - `creator`: Username/email of the model creator
  - `usage_count`: Number of times the model has been used for inference
  - `last_used`: Timestamp of last usage
  - `performance_metrics`: Model performance statistics
  - `downloadable`: Whether model can be downloaded
  - `evaluation_data`: Benchmark evaluation results (if available)
  - `conversation_saving_enabled`: Whether conversation saving is enabled for this model


**Example Request:**

```json
GET /api/v3/models/aligned
Headers: {"Authorization": "Bearer <api_key>"}
```


**Example Response:**

```json
{
  "domain_aligned_models":
    [
    {
      "id": "aligned-model-01kmqm4nrn9fw6r",
      "alignment_id": "alignment-xyz789",
      "name": "customer_support_model",
      "base_model": "nugen-flash-instruct",
      "alignment_project": "Customer Support Alignment",
      "created_date": "2024-01-15T10:30:00Z",
      "status": "DEPLOYED",
      "deployment_status": "DEPLOYED",
      "endpoint": "https://api.example.com/v1/models/alignment-xyz789",
      "creator": "user@example.com",
      "usage_count": 150,
      "last_used": "2024-01-20T14:30:00Z",
      "performance_metrics": {
        "accuracy_before": 0.75,
        "accuracy_after": 0.92,
        "uncertainty_before": 0.35,
        "uncertainty_after": 0.15,
        "domain_violations_before": 12,
        "domain_violations_after": 2
      },
      "downloadable": true,
      "evaluation_data": {
        "accuracy": 0.92,
        "total_questions": 50
      },
      "conversation_saving_enabled": true
    }
    ]
}
```


**Notes:**

- Returns both deployed and undeployed aligned models
- `evaluation_data` is included if the model was evaluated against a benchmark
- `performance_metrics` show before/after alignment improvements
- `conversation_saving_enabled` indicates whether chat history is saved for each model
-  Use `/models/base` to see available base models for alignment



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json get /api/v3/models/aligned
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/models/aligned:
    get:
      tags:
        - Models
      summary: List Aligned Models
      description: >-
        Retrieve all domain-aligned models for the authenticated user.


        This endpoint returns a list of custom models that have been created
        through domain alignment workflows, including their deployment status,
        evaluation results, and conversation settings.


        **Returns:**

        - `domain_aligned_models`: List of aligned model objects, each
        containing:
          - `id`: Unique model identifier (or `alignment-{id}` for un-deployed models)
          - `alignment_id`: Original alignment project ID
          - `name`: Model name
          - `base_model`: Base model used for alignment
          - `alignment_project`: Name of the alignment project
          - `created_date`: Creation timestamp
          - `status`: Model status (e.g., `DEPLOYED`, `UNDEPLOYED`, `DEPLOYING`, `UNDEPLOYING`, `EVALUATED`)
          - `deployment_status`: Current deployment state (`DEPLOYED` or `UNDEPLOYED`)
          - `endpoint`: Inference endpoint URL (only for deployed models)
          - `creator`: Username/email of the model creator
          - `usage_count`: Number of times the model has been used for inference
          - `last_used`: Timestamp of last usage
          - `performance_metrics`: Model performance statistics
          - `downloadable`: Whether model can be downloaded
          - `evaluation_data`: Benchmark evaluation results (if available)
          - `conversation_saving_enabled`: Whether conversation saving is enabled for this model


        **Example Request:**


        ```json

        GET /api/v3/models/aligned

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

        ```



        **Example Response:**


        ```json

        {
          "domain_aligned_models":
            [
            {
              "id": "aligned-model-01kmqm4nrn9fw6r",
              "alignment_id": "alignment-xyz789",
              "name": "customer_support_model",
              "base_model": "nugen-flash-instruct",
              "alignment_project": "Customer Support Alignment",
              "created_date": "2024-01-15T10:30:00Z",
              "status": "DEPLOYED",
              "deployment_status": "DEPLOYED",
              "endpoint": "https://api.example.com/v1/models/alignment-xyz789",
              "creator": "user@example.com",
              "usage_count": 150,
              "last_used": "2024-01-20T14:30:00Z",
              "performance_metrics": {
                "accuracy_before": 0.75,
                "accuracy_after": 0.92,
                "uncertainty_before": 0.35,
                "uncertainty_after": 0.15,
                "domain_violations_before": 12,
                "domain_violations_after": 2
              },
              "downloadable": true,
              "evaluation_data": {
                "accuracy": 0.92,
                "total_questions": 50
              },
              "conversation_saving_enabled": true
            }
            ]
        }

        ```



        **Notes:**


        - Returns both deployed and undeployed aligned models

        - `evaluation_data` is included if the model was evaluated against a
        benchmark

        - `performance_metrics` show before/after alignment improvements

        - `conversation_saving_enabled` indicates whether chat history is saved
        for each model

        -  Use `/models/base` to see available base models for alignment
      operationId: list_aligned_models
      responses:
        '200':
          description: >-
            Returns a list of all domain-aligned models created by the
            authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MyModels'
        '400':
          description: Bad request - invalid query parameters
          content:
            application/json:
              example:
                detail: Bad request
        '404':
          description: No aligned models found for the authenticated user
          content:
            application/json:
              example:
                detail: No aligned models found
        '422':
          description: Validation error - invalid request parameters
          content:
            application/json:
              example:
                detail:
                  - loc:
                      - header
                      - Authorization
                    msg: field required
                    type: value_error.missing
      security:
        - HTTPBearer: []
components:
  schemas:
    MyModels:
      properties:
        domain_aligned_models:
          items:
            $ref: '#/components/schemas/DomainAlignedModel'
          type: array
          title: Domain Aligned Models
          description: >-
            List of domain-aligned models with their deployment status,
            performance metrics, and evaluation data
      type: object
      required:
        - domain_aligned_models
      title: MyModels
      examples:
        - domain_aligned_models:
            - alignment_id: alignment-xyz789
              alignment_project: Customer Support Alignment
              base_model: nugen-flash-instruct
              conversation_saving_enabled: true
              created_date: '2024-01-15T10:30:00Z'
              creator: user@example.com
              deployment_status: DEPLOYED
              downloadable: true
              endpoint: >-
                https://api.nugen.in/api/v3/inference/completions/alignment-xyz789-deployed
              evaluation_data:
                completed_at: '2024-01-16T08:00:00Z'
                created_at: '2024-01-16T07:45:00Z'
                evaluation_id: eval-abc123
                method: eval
                metrics:
                  accuracy: 0.92
                  domain_violations: 2
                  overall_score: 0.92
                  uncertainty: 0.15
                raw_answers_count: 50
                status: READY
              id: alignment-xyz789-deployed
              last_used: '2024-01-20T14:30:00Z'
              name: customer_support_model
              performance_metrics:
                accuracy: 0.92
                average_response_time: 1.2
                domain_violations: 2
                uncertainty: 0.15
              status: DEPLOYED
              usage_count: 150
            - alignment_id: alignment-abc456
              alignment_project: Legal Domain Alignment
              base_model: nugen-flash-instruct
              conversation_saving_enabled: false
              created_date: '2024-02-01T09:15:00Z'
              creator: user@example.com
              deployment_status: UNDEPLOYED
              downloadable: false
              endpoint: ''
              evaluation_data:
                completed_at: '2024-02-01T12:00:00Z'
                created_at: '2024-02-01T11:45:00Z'
                evaluation_id: eval-def456
                method: eval
                metrics:
                  accuracy: 0.88
                  overall_score: 0.88
                raw_answers_count: 40
                status: READY
              id: alignment-abc456
              name: legal_document_assistant
              performance_metrics:
                accuracy: 0.88
                average_response_time: 0
                domain_violations: 3
                uncertainty: 0.18
              status: UNDEPLOYED
              usage_count: 0
    DomainAlignedModel:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the aligned model
          example:
            - alignment-xyz789-deployed
            - alignment-abc456
        alignment_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Alignment Id
          description: Reference ID to the original alignment project
          example:
            - alignment-xyz789
            - alignment-abc456
        name:
          type: string
          title: Name
          description: Human-readable name assigned to the aligned model
          example:
            - customer_support_model
            - legal_document_assistant
            - medical_qa_assistant
        base_model:
          type: string
          title: Base Model
          description: ID of the base model used for domain alignment
          example:
            - nugen-flash-instruct
            - model-20240229
        alignment_project:
          type: string
          title: Alignment Project
          description: Name of the alignment project this model belongs to
          example:
            - Customer Support Alignment
            - Legal Domain Alignment
        created_date:
          type: string
          title: Created Date
          description: Timestamp when the model was created
          example:
            - '2024-01-15T10:30:00Z'
        status:
          type: string
          title: Status
          description: >-
            Current state of the model (DEPLOYED, READY, DEPLOYING, UNDEPLOYING,
            FAILED)
          example:
            - DEPLOYED
            - READY
            - DEPLOYING
            - FAILED
        deployment_status:
          anyOf:
            - $ref: '#/components/schemas/DeploymentStatus'
            - type: 'null'
          description: 'Simplified deployment status: ''DEPLOYED'' or ''READY'''
        endpoint:
          type: string
          title: Endpoint
          description: >-
            Inference endpoint URL (only populated for deployed models, empty
            string for undeployed)
          example:
            - >-
              https://api.nugen.in/api/v3/inference/completions/alignment-xyz789-deployed
        creator:
          type: string
          title: Creator
          description: Email/username of the user who created this model
          example:
            - user@example.com
        usage_count:
          type: integer
          title: Usage Count
          description: Number of times this model has been used for inference
          example:
            - 150
        last_used:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Used
          description: ISO 8601 timestamp of last inference request (null if never used)
          example:
            - '2024-01-20T14:30:00Z'
            - null
        performance_metrics:
          $ref: '#/components/schemas/DomainAlignedModelPerformanceMetrics'
          description: >-
            Performance statistics including accuracy, uncertainty, and domain
            violations
        downloadable:
          type: boolean
          title: Downloadable
          description: Whether the model can be downloaded for local deployment
          example:
            - true
            - false
        evaluation_data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Evaluation Data
          description: >-
            Benchmark evaluation results if the model has been evaluated
            (includes evaluation_id, status, metrics, and comparison data)
          example:
            - completed_at: '2024-01-16T08:00:00Z'
              evaluation_id: eval-abc123
              metrics:
                accuracy: 0.92
                uncertainty: 0.15
              raw_answers_count: 50
              status: READY
        conversation_saving_enabled:
          type: boolean
          title: Conversation Saving Enabled
          description: Whether conversation history is automatically saved for this model
          default: false
      type: object
      required:
        - id
        - name
        - base_model
        - alignment_project
        - created_date
        - status
        - deployment_status
        - endpoint
        - creator
        - usage_count
        - performance_metrics
        - downloadable
      title: DomainAlignedModel
      examples:
        - alignment_id: alignment-xyz789
          alignment_project: Customer Support Alignment
          base_model: nugen-flash-instruct
          conversation_saving_enabled: true
          created_date: '2024-01-15T10:30:00Z'
          creator: user@example.com
          deployment_status: DEPLOYED
          downloadable: true
          endpoint: >-
            https://api.nugen.in/api/v3/inference/completions/alignment-xyz789-deployed
          evaluation_data:
            completed_at: '2024-01-16T08:00:00Z'
            created_at: '2024-01-16T07:45:00Z'
            evaluation_id: eval-abc123
            method: eval
            metrics:
              accuracy: 0.92
              domain_violations: 2
              overall_score: 0.92
              uncertainty: 0.15
            raw_answers_count: 50
            status: READY
          id: alignment-xyz789-deployed
          last_used: '2024-01-20T14:30:00Z'
          name: customer_support_model
          performance_metrics:
            accuracy: 0.92
            average_response_time: 1.2
            domain_violations: 2
            uncertainty: 0.15
          status: DEPLOYED
          usage_count: 150
    DeploymentStatus:
      type: string
      enum:
        - DEPLOYED
        - DEPLOYING
        - UNDEPLOYING
        - READY
        - FAILED
        - PROCESSING
      title: DeploymentStatus
    DomainAlignedModelPerformanceMetrics:
      properties:
        accuracy:
          type: number
          maximum: 1
          minimum: 0
          title: Accuracy
          description: >-
            Model accuracy score from 0.0 to 1.0 (0% to 100%). Represents the
            proportion of correct responses in evaluations.
          default: 0
          example:
            - 0.92
            - 0.88
            - 0.75
        uncertainty:
          type: number
          maximum: 1
          minimum: 0
          title: Uncertainty
          description: >-
            Average uncertainty score from 0.0 to 1.0. Lower values indicate
            higher model confidence in responses.
          default: 0
          example:
            - 0.15
            - 0.18
            - 0.35
        domain_violations:
          type: integer
          minimum: 0
          title: Domain Violations
          description: >-
            Number of times the model responded outside its intended domain or
            provided out-of-scope answers.
          default: 0
          example:
            - 2
            - 3
            - 12
        average_response_time:
          type: number
          minimum: 0
          title: Average Response Time
          description: Average response time in seconds for model inference requests.
          default: 0
          example:
            - 1.2
            - 0.8
            - 2.5
      type: object
      title: DomainAlignedModelPerformanceMetrics
      examples:
        - accuracy: 0.92
          average_response_time: 1.2
          domain_violations: 2
          uncertainty: 0.15
        - accuracy: 0.88
          average_response_time: 0.8
          domain_violations: 3
          uncertainty: 0.18
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````