Skip to main content
POST
/
v1
/
containers
Create containers
curl --request POST \
  --url https://console.gmicloud.ai/api/v1/containers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "count": 2,
  "idc": "<string>",
  "product": "<string>",
  "args": [],
  "command": "",
  "envs": [
    {
      "name": "access_token",
      "value": "kalsk113=="
    }
  ],
  "name": "LLM training",
  "ports": [],
  "sshKeyIdList": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "templateId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}'
[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
count
integer
required
Required range: x >= 1
idc
string
required
Maximum length: 50
product
string
required
Maximum length: 256
name
string
required
Maximum length: 255
templateId
string<uuid>
required

template id

args
string[]

Optional container command arguments

command
string
default:""

Optional container start command

envs
object[]
Example:
[
{
"name": "access_token",
"value": "kalsk113=="
}
]
ports
object[]
sshKeyIdList
string<uuid>[]

The list of SSH key IDs to use in the container

Response

successful

id
string<uuid>
required