Skip to main content
POST
/
cloud
/
v2
/
pricing
/
{project_id}
/
{region_id}
/
instances
Preview instance price
curl --request POST \
  --url https://api.gcore.com/cloud/v2/pricing/{project_id}/{region_id}/instances \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "flavor": "<string>",
  "interfaces": [
    {
      "interface_name": "eth0",
      "ip_family": "ipv4",
      "type": "external"
    }
  ],
  "name_templates": [
    "<string>"
  ],
  "names": [
    "<string>"
  ],
  "volumes": [
    {
      "source": "apptemplate",
      "size": 1000,
      "snapshot_id": "7cca40d7-a843-4e9f-ae08-62b9a394b1ab",
      "type_name": "standard"
    }
  ]
}
'
{
  "currency_code": "USD",
  "discount_details": [
    {
      "discount": "<string>",
      "resource": "<string>"
    }
  ],
  "discount_percent": "10.50",
  "per_hour": {
    "external_ip": 14.4,
    "flavor": 576,
    "floating_ip": 36,
    "volumes": {
      "cold": 78,
      "ssd_hiiops": 20,
      "ssd_lowlatency": 10,
      "standard": 10,
      "ultra": 78
    }
  },
  "per_month": {
    "external_ip": 14.4,
    "flavor": 576,
    "floating_ip": 36,
    "volumes": {
      "cold": 78,
      "ssd_hiiops": 20,
      "ssd_lowlatency": 10,
      "standard": 10,
      "ultra": 78
    }
  },
  "price_status": "error",
  "price_without_discount_per_month": 123,
  "tax_percent": 123,
  "total_price_per_hour": 123,
  "total_price_per_month": 123,
  "per_gb": {
    "egress_traffic_baremetal": 1.3
  },
  "vm_count": 1
}

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

Body

application/json

Pricing details for creating instances with version 2 interfaces.

flavor
string
required

The flavor of the instance.

interfaces
(NewInterfaceExternalSerializerPydantic · object | NewInterfaceSpecificSubnetFipSerializerPydantic · object | NewInterfaceAnySubnetFipSerializerPydantic · object | NewInterfaceReservedFixedIpFipSerializerPydantic · object)[]
required

Subnet IPs and floating IPs

Instance will be attached to default external network

  • NewInterfaceExternalSerializerPydantic
  • NewInterfaceSpecificSubnetFipSerializerPydantic
  • NewInterfaceAnySubnetFipSerializerPydantic
  • NewInterfaceReservedFixedIpFipSerializerPydantic
Example:
{
"interface_name": "eth0",
"ip_family": "ipv4",
"type": "external"
}
name_templates
(string | null)[]

A list of instance name templates. Either this or names must be specified.

names
string[]

A list of instance names. Either this or name_templates must be specified.

volumes
InstanceVolumePricingRequestSerializer · object[]

A list of volumes to be created or used.

Response

200 - application/json

OK

Billing response v2 preview schema for server instance.

currency_code
enum<string> | null
required

Currency code (3-letter code per ISO 4217).

Available options:
AZN,
EUR,
USD
Example:

"USD"

discount_details
ResourceDiscountSerializer · object[]
required

Discount details per resource.

discount_percent
string | null
required

Actual discount as a relative value.

Example:

"10.50"

per_hour
DetailedInstancePricingSerializer · object
required

Prices per category charged per hour.

per_month
DetailedInstancePricingSerializer · object
required

Prices per category charged per month.

price_status
enum<string>
required

Price status for the UI.

Available options:
error,
hide,
show
price_without_discount_per_month
number | null
required

Total price VAT inclusive per month without discount.

tax_percent
number
required

Tax rate applied to the subtotal, represented as a percentage

total_price_per_hour
number | null
required

Total price VAT inclusive per hour.

total_price_per_month
number | null
required

Total price VAT inclusive per month.

per_gb
DetailedInstancePricingPerGBSerializer · object

Pricing details per category charged per GB.

Example:
{ "egress_traffic_baremetal": 1.3 }
vm_count
integer
default:1

Number of virtual machine instances being created.