API reference
Get instance
Returns the full detail of one of your instances.
GET
/
instances
/
{id}
Get an instance
curl --request GET \
--url https://api.hivecompute.ai/v1/instances/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>"
}{
"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": "FORBIDDEN",
"message": "You do not have access to this resource.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found.",
"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
Response
The instance.
The datacenter location the instance runs in, which is narrower than a region: a region contains several locations.
This value cannot be passed back as the region filter on
GET /instances or GET /presets — those take a region code
from GET /regions (FR), not a location (france-2). Filtering
on a location returns an empty page rather than an error.
Example:
"france-2"
Was this page helpful?
⌘I
Get an instance
curl --request GET \
--url https://api.hivecompute.ai/v1/instances/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hivecompute.ai/v1/instances/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.hivecompute.ai/v1/instances/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"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>"
}{
"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": "FORBIDDEN",
"message": "You do not have access to this resource.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Not found.",
"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"
}
}