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

client = Gcore(
    api_key="My API Key",
)
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.

Examples:

"my-instance"

Body

application/json
api_keys
string[] | null

List of API keys for the inference instance. Multiple keys can be attached to one deployment.If auth_enabled and api_keys are both specified, a ValidationError will be raised.If [] is provided, the API keys will be removed and auth will be disabled on the deployment.

Examples:
["key1", "key2"]
auth_enabled
boolean
deprecated

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. This field is deprecated and will be removed in the future. Use api_keys field instead.If auth_enabled and api_keys are both specified, a ValidationError will be raised.

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
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 representing asynchronous operations. Use these IDs to monitor operation progress: * GET /v1/tasks/{task_id} - Check individual task status and details Poll task status until completion (FINISHED/ERROR) before proceeding with dependent operations.

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