---
title: "Create Deployment"
method: POST
path: "/api/deployments/"
tags: ["Deployment"]
---

# Create Deployment

`POST /api/deployments/`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/api/deployments/`
- Auth: one of:
  - API key in header `Authorization` and API key in header `New-Api-User`
  - API key in header `New-Api-User` and API key in cookie `session`

## Request body

- DeploymentRequest: DeploymentRequest schema
  - `container_config` ContainerConfig, required
    - `args` string[], nullable
    - `entrypoint` string[], nullable
    - `env_variables` object, nullable
    - `replica_count` integer, required
    - `secret_env_variables` object, nullable
    - `traffic_port` integer
  - `duration_hours` integer, required
  - `gpus_per_container` integer, required
  - `hardware_id` integer, required
  - `location_ids` integer[], nullable, required
  - `registry_config` RegistryConfig, required
    - `image_url` string, required
    - `registry_secret` string
    - `registry_username` string
  - `resource_private_name` string, required

## Response `200`

OK

- ResponseDtoCreateDeploymentResponse: Response_dto.CreateDeploymentResponse schema
  - `data` CreateDeploymentResponse, required
    - `deployment_id` string, required
    - `message` string, required
    - `status` string, required
  - `message` string, required
  - `success` boolean, required

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
