Skip to main content
POST
/
organizations
/
{organization_name}
/
projects
/
{project_name}
/
containers
C#
using Salad.Cloud.SDK;
using Salad.Cloud.SDK.Config;
using Salad.Cloud.SDK.Models;

var config = new SaladCloudSdkConfig{};

var client = new SaladCloudSdkClient(config);

var gpuClasses = new List<string>() { "gpu_classes" };
var resources = new CreateContainerResourceRequirements(827, 734164836, gpuClasses, 64, 761306530849177.9);
var command = new List<string>() { "command" };
var axiom = new AxiomLoggingConfiguration("api_token", "dataset", "host");
var tagsItem = new DatadogTagForContainerLogging("name", "value");
var tags = new List<DatadogTagForContainerLogging>() { tagsItem };
var datadog = new DatadogLoggingConfiguration("api_key", "host", tags);
var headersItem = new ContainerLoggingHttpHeader("name", "value");
var headers = new List<ContainerLoggingHttpHeader>() { headersItem };
var http = new ContainerLoggingConfigurationHttp2(ContainerLoggingHttpCompression.None, ContainerLoggingHttpFormat.Json, "host", 42056, headers, "password", "path", "user");
var newRelic = new NewRelicLoggingConfiguration("host", "ingestion_key");
var splunk = new ContainerLoggingSplunkConfiguration("host", "token");
var tcp = new TcpLoggingConfiguration("host", 44671);
var logging = new ContainerConfigurationLogging(axiom, datadog, http, newRelic, splunk, tcp);
var awsEcr = new ContainerRegistryAuthenticationAwsEcr("access_key_id", "secret_access_key");
var basic = new ContainerRegistryAuthenticationBasic("password", "username");
var dockerHub = new ContainerRegistryAuthenticationDockerHub("personal_access_token", "username");
var gcpGar = new ContainerRegistryAuthenticationGcpGar("service_key");
var gcpGcr = new ContainerRegistryAuthenticationGcpGcr("service_key");
var registryAuthentication = new ContainerRegistryAuthentication(awsEcr, basic, dockerHub, gcpGar, gcpGcr);
var container = new ContainerConfiguration("acme/:latest", resources, command, new object(), true, logging, ContainerGroupPriority.High, registryAuthentication);
var countryCodes = new List<CountryCode>() { CountryCode.Af };
var command = new List<string>() { "command" };
var exec = new ContainerGroupProbeExec(command);
var grpc = new ContainerGroupGRpcProbe(37648, "service");
var headersItem = new ContainerGroupProbeHttpHeader("name", "value");
var headers = new List<ContainerGroupProbeHttpHeader>() { headersItem };
var http = new ContainerGroupHttpProbeConfiguration(headers, "path", 29069, HttpScheme.Http);
var tcp = new ContainerGroupTcpProbe(13817);
var livenessProbe = new ContainerGroupLivenessProbe(3, 670, 10, 1, 30, exec, grpc, http, tcp);
var networking = new CreateContainerGroupNetworking(false, 60000, ContainerNetworkingProtocol.Http, 100000, TheContainerGroupNetworkingLoadBalancer.RoundRobin, 100000, false);
var queueAutoscaler = new QueueBasedAutoscalerConfiguration(53, 321, 54, 59, 100, 140);
var queueConnection = new ContainerGroupQueueConnection("path", 47568, "z1h-3z01x9");
var command = new List<string>() { "command" };
var exec = new ContainerGroupProbeExec(command);
var grpc = new ContainerGroupGRpcProbe(37648, "service");
var headersItem = new ContainerGroupProbeHttpHeader("name", "value");
var headers = new List<ContainerGroupProbeHttpHeader>() { headersItem };
var http = new ContainerGroupHttpProbeConfiguration(headers, "path", 29069, HttpScheme.Http);
var tcp = new ContainerGroupTcpProbe(13817);
var readinessProbe = new ContainerGroupReadinessProbe(3, 262, 1, 1, 1, exec, grpc, http, tcp);
var scalingActionsItem = new ContainerGroupScalingAction(461, "7kwC/T8C   da       x6Ci   bM-rgGYn     bDY6,vT");
var scalingActions = new List<ContainerGroupScalingAction>() { scalingActionsItem };
var command = new List<string>() { "command" };
var exec = new ContainerGroupProbeExec(command);
var grpc = new ContainerGroupGRpcProbe(37648, "service");
var headersItem = new ContainerGroupProbeHttpHeader("name", "value");
var headers = new List<ContainerGroupProbeHttpHeader>() { headersItem };
var http = new ContainerGroupHttpProbeConfiguration(headers, "path", 29069, HttpScheme.Http);
var tcp = new ContainerGroupTcpProbe(13817);
var startupProbe = new ContainerGroupStartupProbe(15, 503, 3, 2, 10, exec, grpc, http, tcp);
var input = new ContainerGroupCreationRequest(false, container, "name", 77, ContainerRestartPolicy.Always, countryCodes, "KMg0KyVwpb", livenessProbe, networking, queueAutoscaler, queueConnection, readinessProbe, scalingActions, true, startupProbe);

var response = await client.ContainerGroups.CreateContainerGroupAsync(input, "acme-corp", "dev-env");

Console.WriteLine(response);
{
  "autostart_policy": true,
  "container": {
    "command": [
      "<string>"
    ],
    "image": "<string>",
    "resources": {
      "cpu": 512,
      "gpu_classes": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "memory": 536871424,
      "shm_size": 64,
      "storage_amount": 562950490292224
    },
    "environment_variables": {},
    "hash": "<string>",
    "image_caching": true,
    "logging": {
      "axiom": {
        "api_token": "<string>",
        "dataset": "<string>",
        "host": "<string>"
      },
      "datadog": {
        "api_key": "<string>",
        "host": "<string>",
        "tags": [
          {
            "name": "<string>",
            "value": "<string>"
          }
        ]
      },
      "http": {
        "headers": [
          {
            "name": "<string>",
            "value": "<string>"
          }
        ],
        "host": "<string>",
        "port": 32768,
        "password": "<string>",
        "path": "<string>",
        "user": "<string>"
      },
      "new_relic": {
        "host": "<string>",
        "ingestion_key": "<string>"
      },
      "splunk": {
        "host": "<string>",
        "token": "<string>"
      },
      "tcp": {
        "host": "<string>",
        "port": 32768
      }
    },
    "size": 4611686018427388000
  },
  "country_codes": [
    "us"
  ],
  "create_time": "2023-11-07T05:31:56Z",
  "current_state": {
    "finish_time": "2023-11-07T05:31:56Z",
    "instance_status_counts": {
      "allocating_count": 1073741823,
      "creating_count": 1073741823,
      "running_count": 1073741823,
      "stopping_count": 1073741823
    },
    "start_time": "2023-11-07T05:31:56Z",
    "description": "<string>"
  },
  "display_name": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "organization_name": "<string>",
  "pending_change": true,
  "project_name": "<string>",
  "replicas": 250,
  "scaling-actions": [
    {
      "replicas": 250,
      "schedule": "<string>"
    }
  ],
  "scheduled-scaling-enabled": true,
  "update_time": "2023-11-07T05:31:56Z",
  "version": 1073741824,
  "liveness_probe": {
    "failure_threshold": 3,
    "initial_delay_seconds": 0,
    "period_seconds": 10,
    "success_threshold": 1,
    "timeout_seconds": 30,
    "exec": {
      "command": [
        "<string>"
      ]
    },
    "grpc": {
      "port": 32768,
      "service": "<string>"
    },
    "http": {
      "headers": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "path": "<string>",
      "port": 32768
    },
    "tcp": {
      "port": 32767
    }
  },
  "networking": {
    "auth": true,
    "dns": "<string>",
    "load_balancer": "round_robin",
    "port": 32768,
    "client_request_timeout": 100000,
    "server_response_timeout": 100000,
    "single_connection_limit": false
  },
  "queue_autoscaler": {
    "desired_queue_length": 50,
    "max_replicas": 250,
    "min_replicas": 50,
    "max_downscale_per_minute": 50,
    "max_upscale_per_minute": 50,
    "polling_period": 907
  },
  "queue_connection": {
    "path": "<string>",
    "port": 32768,
    "queue_name": "<string>"
  },
  "readiness_probe": {
    "failure_threshold": 3,
    "initial_delay_seconds": 0,
    "period_seconds": 1,
    "success_threshold": 1,
    "timeout_seconds": 1,
    "exec": {
      "command": [
        "<string>"
      ]
    },
    "grpc": {
      "port": 32768,
      "service": "<string>"
    },
    "http": {
      "headers": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "path": "<string>",
      "port": 32768
    },
    "tcp": {
      "port": 32767
    }
  },
  "readme": "<string>",
  "startup_probe": {
    "failure_threshold": 15,
    "initial_delay_seconds": 0,
    "period_seconds": 3,
    "success_threshold": 2,
    "timeout_seconds": 10,
    "exec": {
      "command": [
        "<string>"
      ]
    },
    "grpc": {
      "port": 32768,
      "service": "<string>"
    },
    "http": {
      "headers": [
        {
          "name": "<string>",
          "value": "<string>"
        }
      ],
      "path": "<string>",
      "port": 32768
    },
    "tcp": {
      "port": 32767
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.salad.com/llms.txt

Use this file to discover all available pages before exploring further.

Last Updated: July 1, 2025

Authorizations

Salad-Api-Key
string
header
required

Path Parameters

organization_name
string
required

Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. The organization name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"acme-corp"

project_name
string
required

Your project name. This represents a collection of related SaladCloud resources. The project must be created before using the API. The project name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"dev-env"

Body

application/json

Represents a request to create a container group, which manages a collection of container instances with shared configuration and scaling policies

autostart_policy
boolean
required

Determines whether the container group should start automatically when created (true) or remain stopped until manually started (false)

container
Container Configuration · object
required

Configuration for creating a container within a container group. Defines the container image, resource requirements, environment variables, and other settings needed to deploy and run the container.

name
string
required

Unique identifier for the container group that must follow DNS naming conventions (lowercase alphanumeric with hyphens)

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
replicas
integer<int32>
required

Number of container instances to deploy and maintain for this container group

Required range: 0 <= x <= 500
restart_policy
enum<string>
required

Specifies the policy for restarting containers when they exit or fail.

Available options:
always,
on_failure,
never
country_codes
enum<string>[]

List of countries nodes must be located in. Remove this field to permit nodes from any country.

Required array length: 1 - 500 elements

ISO 3166-1 alpha-2 country code

Available options:
af,
al,
dz,
as,
ad,
ao,
ai,
aq,
ag,
ar,
am,
aw,
au,
at,
az,
bs,
bh,
bd,
bb,
by,
be,
bz,
bj,
bm,
bt,
bo,
bq,
ba,
bw,
bv,
br,
io,
bn,
bg,
bf,
bi,
cv,
kh,
cm,
ca,
ky,
cf,
td,
cl,
cn,
cx,
cc,
co,
km,
cd,
cg,
ck,
cr,
hr,
cu,
cw,
cy,
cz,
ci,
dk,
dj,
dm,
do,
ec,
eg,
sv,
gq,
er,
ee,
sz,
et,
fk,
fo,
fj,
fi,
fr,
gf,
pf,
tf,
ga,
gm,
ge,
de,
gh,
gi,
gr,
gl,
gd,
gp,
gu,
gt,
gg,
gn,
gw,
gy,
ht,
hm,
va,
hn,
hk,
hu,
is,
in,
id,
ir,
iq,
ie,
im,
il,
it,
jm,
jp,
je,
jo,
kz,
ke,
ki,
kp,
kr,
kw,
kg,
la,
lv,
lb,
ls,
lr,
ly,
li,
lt,
lu,
mo,
mg,
mw,
my,
mv,
ml,
mt,
mh,
mq,
mr,
mu,
yt,
mx,
fm,
md,
mc,
mn,
me,
ms,
ma,
mz,
mm,
na,
nr,
np,
nl,
nc,
nz,
ni,
ne,
ng,
nu,
nf,
mp,
no,
om,
pk,
pw,
ps,
pa,
pg,
py,
pe,
ph,
pn,
pl,
pt,
pr,
qa,
mk,
ro,
ru,
rw,
re,
bl,
sh,
kn,
lc,
mf,
pm,
vc,
ws,
sm,
st,
sa,
sn,
rs,
sc,
sl,
sg,
sx,
sk,
si,
sb,
so,
za,
gs,
ss,
es,
lk,
sd,
sr,
sj,
se,
ch,
sy,
tw,
tj,
tz,
th,
tl,
tg,
tk,
to,
tt,
tn,
tr,
tm,
tc,
tv,
ug,
ua,
ae,
gb,
um,
us,
uy,
uz,
vu,
ve,
vn,
vg,
vi,
wf,
eh,
ye,
zm,
zw,
ax
display_name
string

Human-readable name for the container group that can include spaces and special characters, used for display purposes

Required string length: 2 - 63
Pattern: ^[ ,-.0-9A-Za-z]+$
liveness_probe
object

Defines a liveness probe for container groups that determines when to restart a container if it becomes unhealthy

networking
object

Network configuration for container groups specifying connectivity parameters, including authentication, protocol, and timeout settings

queue_autoscaler
Queue-based Autoscaler Configuration · object

Defines configuration for automatically scaling container instances based on queue length. The autoscaler monitors a queue and adjusts the number of running replicas to maintain the desired queue length.

queue_connection
object

Configuration for connecting a container group to a message queue system, enabling asynchronous communication between services.

readiness_probe
object

Defines how to check if a container is ready to serve traffic. The readiness probe determines whether the container's application is ready to accept traffic. If the readiness probe fails, the container is considered not ready and traffic will not be sent to it.

scaling-actions
Container Group Scaling Action · object[]

List of scaling action configurations

Maximum array length: 100
scheduled-scaling-enabled
boolean

Indicates if scheduled scaling is enabled

startup_probe
Container Group Startup Probe · object

Defines a probe that checks if a container application has started successfully. Startup probes help prevent applications from being prematurely marked as unhealthy during initialization. The probe can use HTTP requests, TCP connections, gRPC calls, or shell commands to determine startup status.

Response

Created

A container group definition that represents a scalable set of identical containers running as a distributed service

autostart_policy
boolean
required

Defines whether containers in this group should automatically start when deployed (true) or require manual starting (false)

container
object
required

Represents a container with its configuration and resource requirements.

country_codes
enum<string>[]
required

List of country codes where container instances are permitted to run. When not specified or empty, containers may run in any available region.

Maximum array length: 500

ISO 3166-1 alpha-2 country code

Available options:
af,
al,
dz,
as,
ad,
ao,
ai,
aq,
ag,
ar,
am,
aw,
au,
at,
az,
bs,
bh,
bd,
bb,
by,
be,
bz,
bj,
bm,
bt,
bo,
bq,
ba,
bw,
bv,
br,
io,
bn,
bg,
bf,
bi,
cv,
kh,
cm,
ca,
ky,
cf,
td,
cl,
cn,
cx,
cc,
co,
km,
cd,
cg,
ck,
cr,
hr,
cu,
cw,
cy,
cz,
ci,
dk,
dj,
dm,
do,
ec,
eg,
sv,
gq,
er,
ee,
sz,
et,
fk,
fo,
fj,
fi,
fr,
gf,
pf,
tf,
ga,
gm,
ge,
de,
gh,
gi,
gr,
gl,
gd,
gp,
gu,
gt,
gg,
gn,
gw,
gy,
ht,
hm,
va,
hn,
hk,
hu,
is,
in,
id,
ir,
iq,
ie,
im,
il,
it,
jm,
jp,
je,
jo,
kz,
ke,
ki,
kp,
kr,
kw,
kg,
la,
lv,
lb,
ls,
lr,
ly,
li,
lt,
lu,
mo,
mg,
mw,
my,
mv,
ml,
mt,
mh,
mq,
mr,
mu,
yt,
mx,
fm,
md,
mc,
mn,
me,
ms,
ma,
mz,
mm,
na,
nr,
np,
nl,
nc,
nz,
ni,
ne,
ng,
nu,
nf,
mp,
no,
om,
pk,
pw,
ps,
pa,
pg,
py,
pe,
ph,
pn,
pl,
pt,
pr,
qa,
mk,
ro,
ru,
rw,
re,
bl,
sh,
kn,
lc,
mf,
pm,
vc,
ws,
sm,
st,
sa,
sn,
rs,
sc,
sl,
sg,
sx,
sk,
si,
sb,
so,
za,
gs,
ss,
es,
lk,
sd,
sr,
sj,
se,
ch,
sy,
tw,
tj,
tz,
th,
tl,
tg,
tk,
to,
tt,
tn,
tr,
tm,
tc,
tv,
ug,
ua,
ae,
gb,
um,
us,
uy,
uz,
vu,
ve,
vn,
vg,
vi,
wf,
eh,
ye,
zm,
zw,
ax
create_time
string<date-time>
required

ISO 8601 timestamp when this container group was initially created

current_state
Container Group State · object
required

Represents the operational state of a container group during its lifecycle, including timing information, status, and instance distribution metrics. This state captures the current execution status, start and finish times, and provides visibility into the operational health across instances.

display_name
string
required

The display-friendly name of the resource.

Required string length: 2 - 63
Pattern: ^[ ,-.0-9A-Za-z]+$
Example:

"Name"

id
string<uuid>
required

The container group identifier.

Example:

"ab3a4591-efc3-46c0-b06a-3d820c0ec100"

name
string
required

The container group name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"mandlebrot"

organization_name
string
required

The organization name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"acme-corp"

pending_change
boolean
required

Indicates whether a configuration change has been requested but not yet applied to all containers in the group

priority
enum<string> | null
required

Specifies the priority level for container group execution, which determines resource allocation and scheduling precedence.

Available options:
high,
medium,
low,
batch
project_name
string
required

The project name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"dev-env"

replicas
integer<int32>
required

The container group replicas.

Required range: 0 <= x <= 500
Example:

50

restart_policy
enum<string>
required

Specifies the policy for restarting containers when they exit or fail.

Available options:
always,
on_failure,
never
scaling-actions
Container Group Scaling Action · object[]
required

List of scaling actions configurations

Maximum array length: 100
scheduled-scaling-enabled
boolean
required

Indicates if scheduled scaling is enabled

update_time
string<date-time>
required

ISO 8601 timestamp when this container group was last updated

version
integer<int32>
required

Incremental version number that increases with each configuration change to the container group

Required range: 1 <= x <= 2147483647
liveness_probe
object

Defines a liveness probe for container groups that determines when to restart a container if it becomes unhealthy

networking
Container Group Networking Configuration · object

Network configuration for container groups that defines connectivity, routing, and access control settings

queue_autoscaler
Queue-based Autoscaler Configuration · object

Defines configuration for automatically scaling container instances based on queue length. The autoscaler monitors a queue and adjusts the number of running replicas to maintain the desired queue length.

queue_connection
object

Configuration for connecting a container group to a message queue system, enabling asynchronous communication between services.

readiness_probe
object

Defines how to check if a container is ready to serve traffic. The readiness probe determines whether the container's application is ready to accept traffic. If the readiness probe fails, the container is considered not ready and traffic will not be sent to it.

readme
string
Required string length: 2 - 65000
startup_probe
Container Group Startup Probe · object

Defines a probe that checks if a container application has started successfully. Startup probes help prevent applications from being prematurely marked as unhealthy during initialization. The probe can use HTTP requests, TCP connections, gRPC calls, or shell commands to determine startup status.