---
title: "Create a deployment"
method: POST
path: "/deployments"
---

# Create a deployment

`POST /deployments`

Create a new deployment:

Example cURL request:

```console
curl -s \
  -X POST \
  -H "Authorization: Bearer $REPLICATE_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
        "name": "my-app-image-generator",
        "model": "stability-ai/sdxl",
        "version": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf",
        "hardware": "gpu-t4",
        "min_instances": 0,
        "max_instances": 3
      }' \
  https://api.replicate.com/v1/deployments
```

The response will be a JSON object describing the deployment:

```json
{
  "owner": "acme",
  "name": "my-app-image-generator",
  "current_release": {
    "number": 1,
    "model": "stability-ai/sdxl",
    "version": "da77bc59ee60423279fd632efb4795ab731d9e3ca9705ef3341091fb989b7eaf",
    "created_at": "2024-02-15T16:32:57.018467Z",
    "created_by": {
      "type": "organization",
      "username": "acme",
      "name": "Acme Corp, Inc.",
      "avatar_url": "https://cdn.replicate.com/avatars/acme.png",
      "github_url": "https://github.com/acme"
    },
    "configuration": {
      "hardware": "gpu-t4",
      "min_instances": 1,
      "max_instances": 5
    }
  }
}
```

## Request body

- object
  - `hardware` string, required — The SKU for the hardware used to run the model. Possible values can be retrieved from the `hardware.list` endpoint.
  - `max_instances` integer, required — The maximum number of instances for scaling.
  - `min_instances` integer, required — The minimum number of instances for scaling.
  - `model` string, required — The full name of the model that you want to deploy e.g. stability-ai/sdxl.
  - `name` string, required — The name of the deployment.
  - `version` string, required — The 64-character string ID of the model version that you want to deploy.

## Response `200`

Success

- SchemasDeploymentResponse
  - `current_release` object
    - `configuration` object
      - `hardware` string — The SKU for the hardware used to run the model.
      - `max_instances` integer — The maximum number of instances for scaling.
      - `min_instances` integer — The minimum number of instances for scaling.
    - `created_at` string, date-time — The time the release was created.
    - `created_by` object
      - `avatar_url` string, uri — The avatar URL for the account that created the release.
      - `github_url` string, uri — The GitHub URL of the account that created the release.
      - `name` string — The name of the account that created the release.
      - `type` 'organization' | 'user', required — The account type of the creator. Can be a user or an organization.
      - `username` string, required — The username of the account that created the release.
    - `model` string — The model identifier string in the format of `{model_owner}/{model_name}`.
    - `number` integer — The release number.
    - `version` string — The ID of the model version used in the release.
  - `name` string — The name of the deployment.
  - `owner` string — The owner of the deployment.

---

[API](https://skmtc.net/replicate/apis/replicate-http-api.md) · [All operations](https://skmtc.net/replicate/apis/replicate-http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/replicate/replicate-http-api/versions/7a537f433b0b/schema)
