API Reference
Integrate top-tier GPUs into your application. Simple, fast, and reliable.
Base URL
All endpoints live under the base URL below and respond in JSON:
https://gpubrazil.com
Authentication
Authenticate with an API key in the Authorization header. The key never expires and can be revoked at any time from your dashboard. Treat it like a password — anyone with the key can create and delete instances in your account.
Authorization: Bearer gpub_live_yourkeyhere
Alternatively, you can send the key in the x-api-key header.
Generate your API key in the dashboard
For security, API keys are generated and managed inside your account — in the API Keys section of the dashboard. The plaintext key is shown only once, in the authenticated area.
Open dashboard → API KeysEndpoints
Full workflow
An instance's lifecycle is: choose the GPU → create → check status/connection → (optional) stop/start → delete. In the examples below, set your key in an environment variable:
export GPUB_API_KEY="gpub_live_yourkeyhere"
1. List GPUs and prices
Returns the catalog with the price per hour (in R$) and the gpu_key you use to create the instance. No authentication required.
curl -s "https://gpubrazil.com/api/gpus"
Resposta (resumo):
{
"gpus": [
{ "model": "NVIDIA H100 PCIe 80GB", "gpu_key": "premium_H100-80G-PCIe",
"pricePerHourBrl": 19.88, "provider": "premium" },
{ "model": "RTX 4090", "gpu_key": "economic_RTX_4090",
"pricePerHourBrl": 3.34, "provider": "economic" }
]
}
Tip: use /api/gpus/available to also see the quantity available in real time.
2. Create an instance
Use the gpuModel = gpu_key obtained in step 1. The deploy runs in the background; the response comes back immediately with an instanceId and status creating.
curl -X POST "https://gpubrazil.com/api/instances/deploy" \
-H "Authorization: Bearer $GPUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "minha-vm",
"gpuModel": "premium_H100-80G-PCIe",
"vcpuCount": 8,
"ramGb": 64,
"storageGb": 100
}'
Response:
{
"success": true,
"instance": { "instanceId": "abc123", "name": "minha-vm", "status": "creating" },
"chargedAmount": 19.88,
"currency": "R$",
"message": "Instance is being created..."
}
Fields: gpuModel (required), vcpuCount (min. 2), ramGb (min. 8), storageGb (min. 40), name, and optionally sshKey and templateId (1-click template).
3. Status and SSH connection details
Query by instanceId. When the status becomes running, the connection object provides the IP, port, and a ready-to-use SSH command.
curl -s "https://gpubrazil.com/api/instances/abc123" \
-H "Authorization: Bearer $GPUB_API_KEY"
Response:
{
"id": "abc123",
"name": "minha-vm",
"status": "running",
"gpu_model": "premium_H100-80G-PCIe",
"connection": {
"ip": "203.0.113.42",
"port": 22,
"user": "ubuntu",
"sshCommand": "ssh -i ~/.ssh/your_key -p 22 ubuntu@203.0.113.42"
},
"resources": { "vcpuCount": 8, "ramGb": 64, "storageGb": 100 },
"pricing": { "hourlyRateBrl": 19.88 }
}
4. List your instances
curl -s "https://gpubrazil.com/api/instances" \ -H "Authorization: Bearer $GPUB_API_KEY"
5. Stop and start (optional)
Stopping halts usage-based billing while keeping the instance; starting powers it back on.
curl -X POST "https://gpubrazil.com/api/instances/abc123/stop" \ -H "Authorization: Bearer $GPUB_API_KEY" curl -X POST "https://gpubrazil.com/api/instances/abc123/start" \ -H "Authorization: Bearer $GPUB_API_KEY"
6. Delete an instance
Destroys the instance at the provider and ends billing. This is the endpoint you asked about — it exists and it's permanent.
curl -X DELETE "https://gpubrazil.com/api/instances/abc123" \
-H "Authorization: Bearer $GPUB_API_KEY"
Response:
{ "success": true, "message": "Instance removed" }
If the instance is still being created, the provider may refuse the deletion (HTTP 409) — try again in a few minutes.
Response Codes
200 · OK
Successful request
201 · Created
Instance/resource created
400 · Error
Invalid parameters or insufficient balance
401 · Unauthorized
API key missing, invalid, or revoked
403 · Forbidden
Action not allowed for this credential
404 · Not Found
Instance/resource does not exist
409 · Conflict
Instance still being created — try again later
500 · Internal Error
Server error