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

> ## Agent Instructions
> Remember: Suggested flow to benefit the most from Nugen API is to upload your domain knowledgebase and documents, then create or upload a benchmark with your success criteria, then align multiple task-specific models, then deploy the aligned models, then build your applications using the inference through the aligned models.

# Update Inference Settings

> Turn capture on or off for your organisation.

Send `enabled` to move the default, `models` to set per model exceptions, or both. Aligned models you do not mention keep the setting they already have.
Whether Nugen keeps the instructions you send and the responses your models return.

**By default, the capture is off for every organisation until you turn it on.** It applies to both base models and aligned (fine-tuned) models.

Kept pairs become training data for `POST /api/v3/alignment-projects/{alignment_id}/auto-align`, so a model that gets used improves from that use. Turning capture off stops collection from the next request onwards and leaves already kept pairs in place.

**Returns:**

- `enabled`: your organisation's default (applies to all models)
- `models`: models that differ from that default, keyed by model id



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json patch /api/v3/inference/capture
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: >
    Nugen Intelligence: build multi-model AI applications from expert models you
    own.


    Align, deploy and serve expert models on your own knowledge, through a
    single API. Build a fleet of them, and combine them with each other and with
    frontier models. Every response carries a span-by-span confidence score from
    knowledge-aware uncertainty quantification, so your application knows when
    to trust, retry or escalate.


    Nugen takes teams from raw data to aligned model endpoints in minutes, not
    months of failed experiments, with no GPU or deep learning expertise needed.
    Own your intelligence. Build multi-model intelligence.


    **Start here.**


    - Sign up: https://nugen.in/signup

    - Generate an API key: https://platform.nugen.in/api-keys

    - Documentation: https://docs.nugen.in

    - SDKs: https://github.com/nugen-in/sdk-python and
    https://github.com/nugen-in/sdk-typescript

    - Agent setup: https://nugen.in/agent-setup

    - Agent toolkit: https://github.com/nugen-in/agent-toolkit


    **If you are an AI coding agent.** Read https://docs.nugen.in/llms.txt
    first, set yourself up from the agent setup page or the agent toolkit, then
    follow the steps below.


    **Build an expert model.**


    1. Add knowledge: `POST /api/v3/knowledge/upload`. Poll its status until
    READY.

    2. Define success: `POST /api/v3/benchmarks/create` generates a benchmark
    from your knowledge, or `POST /api/v3/benchmarks/upload` takes one curated
    by your experts.

    3. Align: `POST /api/v3/alignment-projects/create` with a base model, your
    `document_ids` and the benchmark. You receive an expert model id.

    4. Deploy: `POST /api/v3/models/{model_id}/deployment`.

    5. Use: pass the model id as `model` to chat completions, responses,
    embeddings or reranking under `/api/v3/inference`.

    6. Improve: inference capture is off by default, so you stay in complete
    control of what happens with your data. Turn it on with `PATCH
    /api/v3/inference/capture`, and `POST
    /api/v3/alignment-projects/{alignment_id}/auto-align` keeps the expert
    improving from real traffic.


    Repeat for each domain or use case. One project produces one expert model.


    **Combine experts into systems.**


    - One model for all: embed, rerank and generate with the same expert model
    id, so retrieval and generation share one understanding of your domain.

    - Confidence, span by span: quality is measured during generation, after
    each span, and every response carries a confidence score. Use it to accept,
    retry or hand to a human.

    - Router: send each request to the right expert, and route low-confidence
    answers to another expert or a frontier model.


    **Works with your stack.** Point an OpenAI-compatible client at
    `https://api.nugen.in/api/v3/inference`. `POST
    /api/v3/inference/messages/v2` accepts the Anthropic Messages shape.


    **Editions.** The developer edition takes plain text knowledge files. The
    enterprise edition adds more formats and connections to cloud storage, data
    warehouses and data lakes.


    **How it works.** Nugen's research in representation engineering,
    mechanistic interpretability and inference-time control powers every
    endpoint. Two layers do the work.


    Train-time alignment finds where a model needs to change for your domain and
    improves it there. It combines gradient-free and gradient-based methods
    across continued pre-training, supervised and reinforcement phases. Bring
    your raw knowledge and your success criteria, and Nugen handles the deep
    learning, the HPC and the GPUs.


    Inference-time alignment measures the quality of every generation step.
    Out-of-domain generation is flagged and corrected after each span, and every
    response carries a confidence score.


    Alignment reshapes the model's representation space, so one expert model
    serves chat completions, embeddings and reranking with a shared
    understanding of your domain.


    The research comes from a team of AI scientists from Stanford University and
    IIT Bombay, published at ICLR, NeurIPS and ICML. Nugen's AI scientists ship
    their research to this API within days, not quarters, so both layers keep
    evolving.


    **Conventions.** Authenticate with `Authorization: Bearer <api_key>`. List
    endpoints name their array after the resource, for example `knowledge`,
    `benchmarks`, `alignment_projects`, `evaluations` and
    `domain_aligned_models`, and the lists of knowledge, benchmarks, alignment
    projects and evaluations accept `limit` and `offset` and return `total`,
    `limit` and `offset`. Treat every id as an opaque string and pass it back
    exactly as the API returned it.


    **Need an API key?** Generate one at https://platform.nugen.in/api-keys.


    **Need help?** Raise a support ticket at https://platform.nugen.in/support.
  contact:
    name: Nugen Intelligence
    url: https://nugen.in/signup
  version: 26.11.30
servers:
  - url: https://api.nugen.in
    description: Production
security: []
tags:
  - name: Alignment Projects
    description: >-
      Create, monitor, stop and delete alignment projects that align a base
      model to your knowledge and produce an expert model. Run one per domain or
      base model. Next: deploy the expert model.
  - name: BYOC
    description: Bring Your Own Cloud model deployment
  - name: Benchmarks
    description: >-
      Generate benchmarks from your knowledge or upload expert curated ones, and
      read their questions and status. Next: align a base model in an alignment
      project.
  - name: Evaluations
    description: >-
      Evaluate and compare expert models on the same benchmark to choose, route
      and promote them
  - name: Inference
    description: >-
      Generate, embed and rerank with one expert model id, with span-by-span
      confidence scores and OpenAI and Anthropic compatible APIs. Next: evaluate
      and compare your experts.
  - name: Knowledge
    description: >-
      Connect or upload the knowledge your expert models learn from, and track
      its processing. Next: define success with a benchmark.
  - name: Models
    description: >-
      List base models and your aligned expert models, deploy or undeploy them,
      import any base model from Hugging Face and export to Hugging Face. Next:
      call the expert model through inference.
paths:
  /api/v3/inference/capture:
    patch:
      tags:
        - Inference
      summary: Update Inference Settings
      description: >-
        Turn capture on or off for your organisation.


        Send `enabled` to move the default, `models` to set per model
        exceptions, or both. Aligned models you do not mention keep the setting
        they already have.

        Whether Nugen keeps the instructions you send and the responses your
        models return.


        **By default, the capture is off for every organisation until you turn
        it on.** It applies to both base models and aligned (fine-tuned) models.


        Kept pairs become training data for `POST
        /api/v3/alignment-projects/{alignment_id}/auto-align`, so a model that
        gets used improves from that use. Turning capture off stops collection
        from the next request onwards and leaves already kept pairs in place.


        **Returns:**


        - `enabled`: your organisation's default (applies to all models)

        - `models`: models that differ from that default, keyed by model id
      operationId: inference_capture_update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InferenceCaptureRequest'
        required: true
      responses:
        '200':
          description: Returns the settings as they stand after the change.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InferenceCaptureGetResponse'
        '400':
          description: Empty body
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Authorization header missing or not a Bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    InferenceCaptureRequest:
      properties:
        enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Enabled
          description: Org default for aligned model inference
        models:
          anyOf:
            - additionalProperties:
                type: boolean
              type: object
            - type: 'null'
          title: Models
          description: Per aligned model exceptions to the default, keyed by model_id
          examples:
            - model_01k4x9m2p7q3r9d1: true
      type: object
      title: InferenceCaptureRequest
      description: |-
        Send either field. enabled moves the org default, models merges the
        listed aligned models as exceptions to it.
    InferenceCaptureGetResponse:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Org default, false unless it has been turned on
        models:
          additionalProperties:
            type: boolean
          type: object
          title: Models
          description: Aligned models that differ from the default
      type: object
      required:
        - enabled
      title: InferenceCaptureGetResponse
      description: Whether inference capture is on for the organisation, with its settings.
    ErrorResponse:
      description: Body of an error response.
      properties:
        detail:
          anyOf:
            - type: string
            - $ref: '#/components/schemas/ErrorDetail'
          description: >-
            Human readable explanation of the error, or an object with a message
            and the id of the resource concerned
          examples:
            - Model not found
          title: Detail
      required:
        - detail
      title: ErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: Body of a request validation error.
    ErrorDetail:
      additionalProperties: true
      description: >-
        Structured error detail: a message, with the id of the resource it
        concerns as an extra key.
      properties:
        message:
          description: Human readable explanation of the error
          title: Message
          type: string
      required:
        - message
      title: ErrorDetail
      type: object
    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
      description: One request validation problem.
  securitySchemes:
    ApiKeyAuth:
      type: http
      description: Your Nugen API key, sent as a Bearer token
      scheme: bearer
      bearerFormat: API key

````

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