Pricing
Get current pricing information for an instance type.
Returns the current spot price, reserved price, and minimum price for a given instance type, optionally filtered by region.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
instance_typestringRequired
regionstring · nullableOptionalExample:
us-central1-ainstance_quantityinteger · min: 1 · max: 256OptionalDefault:
1Responses
200
Successful Response
application/json
spot_price_centsinteger · nullableOptional
reserved_price_centsinteger · nullableOptional
minimum_price_centsinteger · nullableOptional
lowest_allocated_bid_centsinteger · nullableOptional
dynamic_win_price_centsinteger · nullableOptional
available_capacityinteger · nullableOptional
total_capacityinteger · nullableOptional
422
Validation Error
application/json
get/v2/pricing/current
GET /v2/pricing/current?instance_type=text HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"spot_price_cents": 1,
"reserved_price_cents": 1,
"minimum_price_cents": 1,
"lowest_allocated_bid_cents": 1,
"dynamic_win_price_cents": 1,
"available_capacity": 1,
"total_capacity": 1
}Get historical pricing information for instance types.
Returns historical spot and reserved prices over time for instance types, optionally filtered by specific instance type and region.
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
instance_typesstring · nullableOptional
regionstring · nullableOptionalExample:
us-central1-anum_samplesinteger · min: -1 · max: 1000OptionalDefault:
100start_timestring · datetime · nullableOptionalExample:
2024-01-01T00:00:00Zend_timestring · datetime · nullableOptionalExample:
2024-01-01T00:00:00ZResponses
200
Successful Response
application/json
Response model for historical pricing data.
completebooleanOptionalDefault:
trueshow_disabled_regionsbooleanOptionalDefault:
false422
Validation Error
application/json
get/v2/pricing/history
GET /v2/pricing/history HTTP/1.1
Host: api.mithril.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"series": [
{
"instance_type": "it_abc123456",
"region": "text",
"timestamps": [
"2024-01-01T00:00:00Z"
],
"spot_prices": [
"text"
],
"reserved_prices": [
"text"
],
"region_disabled": false
}
],
"complete": true,
"show_disabled_regions": false
}Last updated