Skip to main content
POST
Create Alignment

Authorizations

Authorization
string
header
required

Your Nugen API key, sent as a Bearer token

Body

application/json

Create an alignment project that aligns a base model to your knowledge and produces an expert model.

alignment_name
string
required

Name of the domain alignment project

Example:

"My Alignment Project"

base_model_id
string
required

Hugging Face id of the base model to align. Any model listed by GET /api/v3/models/base, or imported with POST /api/v3/models/base/import, can be used.

Example:

"Qwen/Qwen2.5-0.5B-Instruct"

document_ids
string[]
required

The document_id of each knowledge item to train the alignment on

Example:
workflow_id
string | null

This id is to orchestrate the entire flow

Example:

"workflow-abc123"

benchmark_id
string | null

Benchmark ID for evaluation (created via /benchmarks/create or /benchmarks/upload)

Example:

"benchmark_01k4x9m2p7q3r6a1"

description
string | null

Optional project description

Example:

"This project aligns the model to extract and risk-flag contract clauses."

Response

Returns a unique identifier for the initiated domain alignment workflow along with the initial workflow status. This endpoint starts an asynchronous alignment run that aligns a base model to your knowledge, with optional benchmark evaluation, allowing users to track progress and retrieve results once completed.

Response schema for alignment project creation endpoint

alignment_id
string
required

Created alignment project identifier

Example:

"alignment-project-123"

status
enum<string>
default:QUEUED

Initial alignment project status

Available options:
CREATED,
QUEUED,
PROCESSING,
READY,
FAILED,
STOPPED
Example:

"QUEUED"

message
string | null

Additional context about the response

Example:

"Alignment already exists with the same configuration"