List your instances
Returns a cursor-paginated list of your instances, newest first.
Only instances belonging to your account are returned. There is no way to widen the result set to another account or organisation.
curl --request GET \
--url https://api.hivecompute.ai/v1/instances \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "training-run-4",
"status": "CREATED",
"region": "france-2",
"gpu_type": "RTX 4090",
"size": "8 x GPU",
"cpu_count": 123,
"resources": "<string>",
"bandwidth": 123,
"storage_used_gb": 123,
"hourly_rate": 123,
"current_cost": 123,
"total_cost_incurred": 123,
"total_runtime_hours": 123,
"ttl_remaining_hours": 123,
"started_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"termination_reason": "<string>",
"guest_ready": "<string>",
"guest_ready_reason": "<string>"
}
],
"pagination": {
"next": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNy0yOSJ9",
"size": 50
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API token",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too Many Requests",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}Authorizations
Query Parameters
Return only instances in this state.
Each value is a bucket covering the transitional states that lead into it, so an instance is always matched by exactly one of them:
running— also matchesCREATED,DEPLOYEDandSTARTINGstopped— also matchesSTOPPINGterminated— also matchesTERMINATINGerrored—ERROREDonly
There is no filter for a transitional state on its own. Read
status on each instance to tell them apart.
running, stopped, terminated, errored Return only instances in this region. Use a name from
GET /regions.
An unrecognised value is not an error: it matches nothing and
returns an empty page. Note this is not the same vocabulary as
the region field on an instance, which carries the datacenter
location — see the Instance schema.
UAE, FR, US Return only instances that started at or after this ISO 8601
timestamp. Despite the name, the bound is on started_at, not on
creation time.
An instance that never started running has no started_at, so it is
excluded as soon as either bound is set — including a range wide
enough to cover everything. Omit both bounds to see those instances.
Was this page helpful?
curl --request GET \
--url https://api.hivecompute.ai/v1/instances \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "training-run-4",
"status": "CREATED",
"region": "france-2",
"gpu_type": "RTX 4090",
"size": "8 x GPU",
"cpu_count": 123,
"resources": "<string>",
"bandwidth": 123,
"storage_used_gb": 123,
"hourly_rate": 123,
"current_cost": 123,
"total_cost_incurred": 123,
"total_runtime_hours": 123,
"ttl_remaining_hours": 123,
"started_at": "2023-11-07T05:31:56Z",
"terminated_at": "2023-11-07T05:31:56Z",
"termination_reason": "<string>",
"guest_ready": "<string>",
"guest_ready_reason": "<string>"
}
],
"pagination": {
"next": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNy0yOSJ9",
"size": 50
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "[{\"property\":\"size\",\"constraints\":[\"size must not be greater than 200\"]}]",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing API token",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Too Many Requests",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "An internal error occurred.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}