# Nugen API

Nugen Intelligence: build multi-model AI applications from expert models you own.

Align a base model to your knowledge and use the resulting expert model for generation, embeddings and reranking. An expert model is what the API calls an aligned model (`domain_aligned_models`, `/api/v3/models/aligned`).

Customers can align their choice of open-weight base models and import any model from Hugging Face or cloud storage. A public Hugging Face model imported by any user becomes available to every Nugen user; gated and private models stay scoped to the importing organisation.

- Base URL: `https://api.nugen.in`
- Authentication: `Authorization: Bearer <key>`. Read the key from the `NUGEN_API_KEY` environment variable and never hard-code it.
- Get an API key: https://nugen.in/signup
- Documentation: https://docs.nugen.in

## Install

- Python: `pip install nugen-sdk`
- TypeScript: `npm install @nugen-in/sdk`
- MCP server `mcp-exec`: `https://mcp.nugen.in/mcp`
- MCP server `mcp-docs`: `https://docs.nugen.in/mcp`

## Overview

Full overview: `skills/nugen/references/overview.md`.

## Combining experts

1. One model for all: embed, rerank and generate with the same expert model id, so retrieval and generation share one understanding of the domain.
2. Confidence, span by span: accept, retry or hand to a human based on the score.
3. Router: send each request to the right expert, and route low-confidence answers to another expert or a frontier model.

## Where to look

1. This file for the rules and the install commands.
2. `skills/nugen/SKILL.md` for the workflow and conventions.
3. https://docs.nugen.in or the docs MCP for reference.
4. The MCP servers above to act on the API.

## Resources

- `Alignment Projects`: 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. (7 operations)
- `Benchmarks`: 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. (7 operations)
- `Evaluations`: Evaluate and compare expert models on the same benchmark to choose, route and promote them (6 operations)
- `Inference`: 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. (7 operations)
- `Knowledge`: Connect or upload the knowledge your expert models learn from, and track its processing. Next: define success with a benchmark. (5 operations)
- `Models`: 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. (8 operations)

Full operation list: `skills/nugen/references/endpoints.md`.

## Rules for agents

- Prefer the SDKs or the MCP servers over hand-written HTTP calls.
- Use the operation identifiers (for example `alignment_projects_create`) when choosing SDK methods or MCP tools.
- Check `deprecated` markers in the endpoint list before using an operation.
- Check https://docs.nugen.in or the docs MCP before guessing an endpoint.
- Inference capture is off by default. Ask the user before turning it on.

Version `2026.11.4`.
