---
title: "Deploy Aligned Model"
method: POST
path: "/api/v3/models/{model_id}/deployment"
tags: ["Models"]
---

# Deploy Aligned Model

`POST /api/v3/models/{model_id}/deployment`

## Request

- Base URL: `https://api.nugen.in`
- URL: `https://api.nugen.in/api/v3/models/{model_id}/deployment`
- Auth: HTTP bearer

Deploy an aligned model for inference use.


This endpoint deploys a domain-aligned model, making it available for inference.


**Path Parameters:**

- `model_id`: Unique identifier of the aligned model to deploy


**Returns:**

- `model_id`: The aligned model being deployed


**Raises:**

- `400`: If the model is already deployed, or all 10 deployment slots of your organisation are in use; undeploy a model first
- `404`: If the model or its alignment project is not found
- `409`: If the model is still in train-time alignment; pass `early=true` to deploy its newest checkpoint


**Example Request:**

```json
POST /api/v3/models/{model_id}/deployment
Headers: {"Authorization": "Bearer <api_key>"}
```


**Example Response:**

```json
{"model_id": "model_01kmqm4nrn9fw6r"}
```


**Notes:**

- Deployment is asynchronous and may take 5-15 minutes to complete
- Poll `GET /api/v3/models/{model_id}/deployment/status`; on `FAILED` the failure reason is in `result.error`
- Once deployed, the model will be available at its inference endpoint
- Model must be in `UNDEPLOYED` state before deployment

## Path parameters

- `model_id` string, required

## Query parameters

- `early` boolean: Deploy the newest checkpoint of a run still in train-time alignment. The inference GPU serves the latest checkpoint it has written and refreshes on its own, so answers change as train-time alignment continues. Evaluation is unaffected and still runs on the finished model.

## Response `200`

Successfully initiated model deployment

- ModelDeployResponse: Acknowledgement of a deploy request.
  - `model_id` string, required: Model ID of the aligned model being deployed

## Other responses

- `400`: Bad request - model already deployed or deployment limit reached
- `401`: Invalid API key
- `403`: Authorization header missing or not a Bearer token
- `404`: Model or alignment project not found
- `422`: Validation Error

---

[API](https://skmtc.dev/nugen/apis/nugen-intelligence-api.md) - [All operations](https://skmtc.dev/nugen/apis/nugen-intelligence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nugen/apis/nugen-intelligence-api/revisions/62baa7960a4a?raw)
