Skip to main content
POST
Create Deployment

Body

application/json

Request body for creating a deployment.

name
string
required

Name of the deployment.

A LangSmith tracing project with the same name will also automatically be created. This cannot be changed once the deployment is created.

source
enum<string>
required

Deploy from a GitHub repository (github), an external Docker image (external_docker), a CLI-pushed image (internal_docker), uploaded source (internal_source), or a prebuilt LangChain template (internal_template).

Deploying from GitHub, internal Docker, internal source, or a template is only available for Cloud SaaS deployments. Deploying from an external Docker image is only available for self-hosted deployments. This cannot be changed once the deployment is created.

Available options:
github,
external_docker,
internal_docker,
internal_source,
internal_template
source_config
SourceConfigRequest · object
required

Fields for a deployment that are specific to the source, but do not require a new revision when modified or cannot be modified.

All fields are nullable, but are validated based on the source.

source_revision_config
SourceRevisionConfigRequest · object
required

Fields for a deployment that are specific to the source and require a new revision when modified.

All fields are nullable, but are validated based on the source.

secrets
Secret · object[]
required
secret_references
SecretReference · object[] | null

List of Kubernetes Secret references.

Only applicable for external_docker source.

Response

Successful Response

Deployment resource.

name
string
required

Name of the deployment.

A LangSmith tracing project with the same name will also automatically be created. This cannot be changed once the deployment is created.

source
enum<string>
required

Deploy from a GitHub repository (github), an external Docker image (external_docker), a CLI-pushed image (internal_docker), uploaded source (internal_source), or a prebuilt LangChain template (internal_template).

Deploying from GitHub, internal Docker, internal source, or a template is only available for Cloud SaaS deployments. Deploying from an external Docker image is only available for self-hosted deployments. This cannot be changed once the deployment is created.

Available options:
github,
external_docker,
internal_docker,
internal_source,
internal_template
source_config
SourceConfig · object
required

Source configuration.

source_revision_config
SourceRevisionConfig · object
required

Source revision configuration.

For a Deployment resource, the field values refer to the latest revision of the Deployment. For a Revision resource, the field values refer to the Revision itself.

secrets
Secret · object[]
required
id
string<uuid>
required

The ID of the deployment.

This is a read-only field.

tenant_id
string<uuid>
required

The ID of the tenant that owns the deployment.

This is a read-only field.

created_at
string<date-time>
required

The creation time of the deployment.

This is a read-only field.

updated_at
string<date-time>
required

The last update time of the deployment.

This is a read-only field.

status
enum<string>
required

The status of the deployment.

This is a read-only field.

Available options:
AWAITING_DATABASE,
READY,
UNUSED,
AWAITING_DELETE,
UNKNOWN
latest_revision_id
string<uuid> | null
required

The ID of the latest revision of the deployment.

This is a read-only field.

active_revision_id
string<uuid> | null
required

The ID of the current (actively deployed) revision of the deployment.

This is a read-only field.

secret_references
SecretReference · object[] | null

List of Kubernetes Secret references.

Only applicable for external_docker source.

image_version
string | null

Image version of the deployment.