Skip to main content
PATCH
/
cloud
/
v3
/
inference
/
{project_id}
/
deployments
/
{deployment_name}
Python
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
task_id_list = client.cloud.inference.deployments.update(
    deployment_name="my-instance",
    project_id=1,
)
print(task_id_list.tasks)
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Examples:

1

deployment_name
string
required

Inference instance name.

Required string length: 4 - 30
Examples:

"my-instance"

Body

application/json
auth_enabled
boolean

Set to true to enable API key authentication for the inference instance. "Authorization": "Bearer ****\*" or "X-Api-Key": "****\*" header is required for the requests to the instance if enabled

Examples:

false

command
string[] | null

Command to be executed when running a container from an image.

Examples:
["nginx", "-g", "daemon off;"]
containers
ContainerInUpdateSerializerV3 · object[] | null

List of containers for the inference instance.

Minimum length: 1
Examples:
[
{
"region_1": 1,
"scale": {
"cooldown_period": 60,
"max": 3,
"min": 1,
"triggers": {
"cpu": { "threshold": 80 },
"memory": { "threshold": 70 }
}
}
}
]
credentials_name
string | null

Registry credentials name

Examples:

"dockerhub"

description
string | null

Inference instance description.

Examples:

"My first instance"

envs
object | null

Environment variables for the inference instance.

Examples:
{ "DEBUG_MODE": "False", "KEY": "12345" }
flavor_name
string

Flavor name for the inference instance.

Examples:

"inference-16vcpu-232gib-1xh100-80gb"

image
string | null

Docker image for the inference instance. This field should contain the image name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to Docker Hub as the image registry, but any accessible Docker image URL can be specified.

Examples:

"nginx:latest"

ingress_opts
object | null

Ingress options for the inference instance

Examples:
{ "disable_response_buffering": true }
listening_port
integer | null

Listening port for the inference instance.

Required range: 1 <= x <= 65535
Examples:

80

logging
object | null

Logging configuration for the inference instance

Examples:
{
"destination_region_id": 1,
"enabled": true,
"retention_policy": { "period": 42 },
"topic_name": "my-log-name"
}
{ "enabled": false }
probes
object | null

Probes configured for all containers of the inference instance.

timeout
integer | null

Specifies the duration in seconds without any requests after which the containers will be downscaled to their minimum scale value as defined by scale.min. If set, this helps in optimizing resource usage by reducing the number of container instances during periods of inactivity. The default value when the parameter is not set is 120.

Required range: x >= 0
Examples:

120

Response

200 - application/json

OK

tasks
string[]
required

List of task IDs

Examples:
["d478ae29-dedc-4869-82f0-96104425f565"]