Start instance
Starts a stopped instance. The call returns as soon as the request is
accepted; the instance moves STARTING → RUNNING in the background, so
poll GET /instances/{id} to observe the transition.
Starting an already-running instance is accepted and changes nothing.
Returns 409 when the instance is TERMINATING or TERMINATED. A
terminated instance can never be started again.
curl --request POST \
--url https://api.hivecompute.ai/v1/instances/{id}/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_note": "scaling down overnight"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason_note: 'scaling down overnight'})
};
fetch('https://api.hivecompute.ai/v1/instances/{id}/start', 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}/start"
payload = { "reason_note": "scaling down overnight" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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": "CONFLICT",
"message": "The resource is not in a state that allows this action.",
"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"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "The service is temporarily unavailable. Try again later.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}Authorizations
Body
Response
The request was accepted; the instance's current state is returned.
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.
"france-2"
Was this page helpful?
curl --request POST \
--url https://api.hivecompute.ai/v1/instances/{id}/start \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_note": "scaling down overnight"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason_note: 'scaling down overnight'})
};
fetch('https://api.hivecompute.ai/v1/instances/{id}/start', 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}/start"
payload = { "reason_note": "scaling down overnight" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, 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": "CONFLICT",
"message": "The resource is not in a state that allows this action.",
"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"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "The service is temporarily unavailable. Try again later.",
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}