The Compute API does not create instances. Create new instances in the Compute console, then use the API to inspect or manage them.
Instance lifecycle
Common lifecycle states include:
Start, stop, and terminate actions are asynchronous. Poll
GET /instances/{id} until the instance reaches the expected state.
List instances
UseGET /instances:
data array and pagination metadata.
Filter instances
Supported filters include:statusgpu_typeregiondate_range_begindate_range_endfree_text_search- supported sort fields and direction
UAE, FR, or US.
For exact allowed values and limits, use the GET /instances reference.
Get one instance
UseGET /instances/{id} to read the current state of a specific instance.
Start an instance
UsePOST /instances/{id}/start to start a stopped instance.
409 Conflict with error code CONFLICT if the instance is terminating or terminated, or if the account does not have enough credit to start it. Check the latest instance state first. If the instance state allows starting, check the account balance before retrying.
If no host currently has enough capacity for the instance’s preset, start can return 503 Service Unavailable. Retry with backoff or choose a preset in another region.
Stop an instance
UsePOST /instances/{id}/stop to stop a running instance without terminating it.
STOPPED. The stop endpoint returns 409 Conflict with code CONFLICT if the instance is terminating or already terminated.
Terminate an instance
UsePOST /instances/{id}/terminate to permanently terminate an instance.
A terminated instance can’t be restarted, and its local data is deleted. Download important files before terminating it. Support-assisted disk recovery depends on an available backup and is not guaranteed.
409 Conflict with code CONFLICT only when the instance is already TERMINATED. If it is STOPPING or TERMINATING, the request is accepted; poll the instance state instead of retrying blindly.
Get instance logs
UseGET /instances/{id}/logs to fetch recent container output.
entries[0] is the most recent line.
A shortened response looks like this:
Read instance usage metrics
CallGET /instances/{id}/metrics with a required range of 1h, 6h, 24h, or 7d. Use an API key tied to the user who owns the instance.
The response includes time series and a status for each metric group. Data availability depends on the instance’s runtime and hardware. Treat missing samples as missing data, rather than zero usage.
Suggested workflow
1
List your instances
Call
GET /instances and find the instance you want to manage.2
Check its current state
Call
GET /instances/{id} before sending a lifecycle action.3
Run the action
Start, stop, or terminate the instance.
4
Poll for the final state
Call
GET /instances/{id} until the instance reaches the expected state.