GET
/
cloud
/
v3
/
inference
/
{project_id}
/
deployments
/
{deployment_name}
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
inference_deployment = client.cloud.inference.deployments.get(
    deployment_name="my-instance",
    project_id=1,
)
print(inference_deployment.project_id)
{
  "address": "https://example.com",
  "api_keys": [
    "key1",
    "key2"
  ],
  "auth_enabled": false,
  "command": "<string>",
  "containers": [
    {
      "address": "https://example.com",
      "deploy_status": {
        "ready": 1,
        "total": 3
      },
      "error_message": "Failed to pull image",
      "region_id": 1,
      "scale": {
        "cooldown_period": 60,
        "max": 3,
        "min": 1,
        "polling_interval": 30,
        "triggers": {
          "cpu": {
            "threshold": 80
          },
          "gpu_memory": {
            "threshold": 80
          },
          "gpu_utilization": {
            "threshold": 80
          },
          "http": {
            "rate": 1,
            "window": 60
          },
          "memory": {
            "threshold": 80
          },
          "sqs": {
            "activation_queue_length": 5,
            "aws_endpoint": "<string>",
            "aws_region": "us-east-1",
            "queue_length": 10,
            "queue_url": "https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue",
            "scale_on_delayed": true,
            "scale_on_flight": true,
            "secret_name": "<string>"
          }
        }
      }
    }
  ],
  "created_at": "2023-08-22T11:21:00Z",
  "credentials_name": "dockerhub",
  "description": "My first instance",
  "envs": {
    "DEBUG_MODE": "False",
    "KEY": "12345"
  },
  "flavor_name": "inference-16vcpu-232gib-1xh100-80gb",
  "image": "nginx:latest",
  "ingress_opts": {
    "disable_response_buffering": true
  },
  "listening_port": 8080,
  "logging": {
    "destination_region_id": 1,
    "enabled": true,
    "retention_policy": {
      "period": 45
    },
    "topic_name": "my-log-name"
  },
  "name": "my-instance",
  "object_references": [
    {
      "kind": "AppDeployment",
      "name": "my-inference-app"
    }
  ],
  "probes": {
    "liveness_probe": {
      "enabled": true,
      "probe": {
        "exec": {
          "command": [
            "ls",
            "-l"
          ]
        },
        "failure_threshold": 3,
        "http_get": {
          "headers": {
            "Authorization": "Bearer token 123"
          },
          "host": "127.0.0.1",
          "path": "/healthz",
          "port": 80,
          "schema": "HTTP"
        },
        "initial_delay_seconds": 0,
        "period_seconds": 5,
        "success_threshold": 1,
        "tcp_socket": {
          "port": 80
        },
        "timeout_seconds": 1
      }
    },
    "readiness_probe": {
      "enabled": true,
      "probe": {
        "exec": {
          "command": [
            "ls",
            "-l"
          ]
        },
        "failure_threshold": 3,
        "http_get": {
          "headers": {
            "Authorization": "Bearer token 123"
          },
          "host": "127.0.0.1",
          "path": "/healthz",
          "port": 80,
          "schema": "HTTP"
        },
        "initial_delay_seconds": 0,
        "period_seconds": 5,
        "success_threshold": 1,
        "tcp_socket": {
          "port": 80
        },
        "timeout_seconds": 1
      }
    },
    "startup_probe": {
      "enabled": true,
      "probe": {
        "exec": {
          "command": [
            "ls",
            "-l"
          ]
        },
        "failure_threshold": 3,
        "http_get": {
          "headers": {
            "Authorization": "Bearer token 123"
          },
          "host": "127.0.0.1",
          "path": "/healthz",
          "port": 80,
          "schema": "HTTP"
        },
        "initial_delay_seconds": 0,
        "period_seconds": 5,
        "success_threshold": 1,
        "tcp_socket": {
          "port": 80
        },
        "timeout_seconds": 1
      }
    }
  },
  "project_id": 1,
  "status": "ACTIVE",
  "timeout": 120
}

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"

Response

200 - application/json

OK

The response is of type object.