latestOpenAPI 3.1.02026-08-23100133183.1 KB

0d66c7340876

Serverless Containers

Create new deployment

post/v1/container-deployments

Request body

namestring required

Name of the deployment. Immutable after creation

is_spotboolean

Is the deployment a spot deployment

Example request

{
  "name": "llm-inference",
  "container_registry_settings": {
    "is_private": true,
    "credentials": {
      "name": "dockerhub-credentials"
    }
  },
  "containers": [
    {
      "image": "registry-1.docker.io/chentex/random-logger:v1.0.1",
      "should_use_cached_image": true,
      "exposed_port": 8080,
      "healthcheck": {
        "enabled": true,
        "port": 8081,
        "path": "/health"
      },
      "entrypoint_overrides": {
        "enabled": true,
        "entrypoint": [
          "python3",
          "main.py"
        ],
        "cmd": [
          "--port",
          "8080"
        ]
      },
      "env": [
        {
          "name": "MY_ENV_VAR",
          "value_or_reference_to_secret": "my-value",
          "type": "plain"
        }
      ],
      "volume_mounts": [
        {
          "type": "scratch",
          "mount_path": "/data"
        }
      ]
    }
  ],
  "compute": {
    "name": "H100",
    "size": 1
  },
  "scaling": {
    "scale_down_policy": {
      "delay_seconds": 300
    },
    "scale_up_policy": {
      "delay_seconds": 300
    },
    "scaling_triggers": {
      "queue_load": {
        "threshold": 2
      },
      "cpu_utilization": {
        "enabled": true,
        "threshold": 80
      },
      "gpu_utilization": {
        "enabled": true,
        "threshold": 80
      }
    }
  }
}

Response

Returns the created deployment

namestring required

Deployment name

endpoint_base_urlstring required

The base URL of the endpoint

created_atstring required
is_spotboolean required

Example response

{
  "name": "flux",
  "containers": [
    {
      "should_use_cached_image": true,
      "exposed_port": 8080,
      "healthcheck": {
        "enabled": true,
        "port": 8081,
        "path": "/health"
      },
      "entrypoint_overrides": {
        "enabled": true,
        "entrypoint": [
          "python3",
          "main.py"
        ],
        "cmd": [
          "--port",
          "8080"
        ]
      },
      "env": [
        {
          "name": "MY_ENV_VAR",
          "value_or_reference_to_secret": "my-value",
          "type": "plain"
        }
      ],
      "volume_mounts": [
        {
          "type": "scratch",
          "mount_path": "/data"
        }
      ],
      "image": {
        "image": "registry-1.docker.io/chentex/random-logger:v1.0.1",
        "last_updated_at": "2026-08-20T14:06:42.494Z"
      },
      "name": "random-logger-0"
    }
  ],
  "endpoint_base_url": "https://containers.datacrunch.io/flux",
  "created_at": "2021-08-31T12:00:00.000Z",
  "compute": {
    "name": "H100",
    "size": 1
  },
  "container_registry_settings": {
    "is_private": true,
    "credentials": {
      "name": "dockerhub-credentials"
    }
  }
}