Skip to main content
GET
/
cloud
/
v1
/
images
/
{project_id}
/
{region_id}
/
{image_id}
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
)
image = client.cloud.instances.images.get(
    image_id="image_id",
    project_id=0,
    region_id=0,
)
print(image.id)
{
  "created_at": "2023-11-07T05:31:56Z",
  "disk_format": "<string>",
  "id": "<string>",
  "min_disk": 123,
  "min_ram": 123,
  "name": "<string>",
  "os_distro": "<string>",
  "os_type": "linux",
  "os_version": "<string>",
  "project_id": 123,
  "region": "<string>",
  "region_id": 123,
  "size": 123,
  "status": "<string>",
  "tags": [
    {
      "key": "<string>",
      "read_only": true,
      "value": "<string>"
    }
  ],
  "updated_at": "2023-11-07T05:31:56Z",
  "visibility": "<string>",
  "architecture": "x86_64",
  "creator_task_id": "b10dd116-07f5-4225-abb7-f42da5cb78fb",
  "description": "string",
  "display_order": 2010,
  "gpu_driver": "nvidia",
  "gpu_driver_type": "open",
  "gpu_driver_version": "570.148.08",
  "hw_firmware_type": "bios",
  "hw_machine_type": "q35",
  "is_baremetal": false,
  "ssh_key": "allow",
  "task_id": null
}

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

region_id
integer
required

Region ID

image_id
string
required

Image ID

Query Parameters

include_prices
boolean

Show price

Response

200 - application/json

Returned image

created_at
string<date-time>
required

Datetime when the image was created

disk_format
string
required

Disk format

id
string
required

Image ID

min_disk
integer
required

Minimal boot volume required

min_ram
integer
required

Minimal VM RAM required

name
string
required

Image display name

os_distro
string
required

OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.

os_type
enum<string>
required

The operating system installed on the image.

Available options:
linux,
windows
os_version
string
required

OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian

project_id
integer
required

Project ID

region
string
required

Region name

region_id
integer
required

Region ID

size
integer
required

Image size in bytes

status
string
required

Image status, i.e. active

tags
TagSerializer · object[]
required

List of key-value tags associated with the resource. A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

updated_at
string<date-time>
required

Datetime when the image was updated

visibility
string
required

Image visibility. Globally visible images are public

architecture
enum<string>
default:x86_64

An image architecture type: aarch64, x86_64

Available options:
aarch64,
x86_64
creator_task_id
string | null

Task that created this entity

Example:

"b10dd116-07f5-4225-abb7-f42da5cb78fb"

description
string | null

Image description

Example:

"string"

display_order
integer | null
Example:

2010

gpu_driver
string | null

Name of the GPU driver vendor

Example:

"nvidia"

gpu_driver_type
string | null

Type of the GPU driver

Example:

"open"

gpu_driver_version
string | null

Version of the installed GPU driver

Example:

"570.148.08"

hw_firmware_type
enum<string> | null

Specifies the type of firmware with which to boot the guest.

Available options:
bios,
uefi
Example:

"bios"

hw_machine_type
enum<string> | null

A virtual chipset type.

Available options:
pc,
q35
Example:

"q35"

is_baremetal
boolean | null
default:false

Set to true if the image will be used by bare metal servers. Defaults to false.

Example:

false

ssh_key
enum<string> | null

Whether the image supports SSH key or not

Available options:
allow,
deny,
required
Example:

"allow"

task_id
string | null

The UUID of the active task that currently holds a lock on the resource. This lock prevents concurrent modifications to ensure consistency. If null, the resource is not locked.

Example:

null