API Docs
The CloudGPU API is OpenAI-compatible: send requests to https://cloudgpu.app/v1 with an Authorization: Bearer header carrying your cgw-sk- key, and existing OpenAI SDK code only needs a new base_url and key. Claude Messages-format requests go to https://cloudgpu.app/v1/messages. Below: the quick start, then authentication, endpoints, rate limits and errors.
The only CloudGPU website is cloudgpu.app, and the only API address is https://cloudgpu.app/v1.
Quick start
- Go to API Console and create a key. Copy the
cgw-sk-...value — it's shown once. - Top up your balance via Billing. One balance covers API calls and GPU rentals.
- Make a request:
cURLcurl https://cloudgpu.app/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $CLOUDGPU_API_KEY" \ -d '{ "model": "deepseek-v4-flash", "messages": [ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Say hi in one sentence."} ] }'
Authentication
Every request to /v1/* requires an Authorization: Bearer cgw-sk-<your_key> header. Keys are scoped to your CloudGPU account. Revoke any key any time from the console; revocation takes effect immediately.
The raw key is shown exactly once at creation time. We store only a sha256 hash; we cannot recover it if you lose it. Create a new key if that happens.
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/chat/completions | OpenAI-format chat completion. Same request/response shape as OpenAI. |
| GET | /v1/models | List available models + current per-token pricing. |
| POST | /v1/messages | Claude Messages API format, for Claude Code and the Anthropic SDK (base URL https://cloudgpu.app). |
| POST | /v1/messages/count_tokens | Count the input tokens of a Messages request without running it. |
| POST | /v1/images/generations | Image generation (FLUX, Qwen-Image, Seedream), OpenAI images format. |
| POST | /v1/audio/speech | Text to speech, OpenAI audio format. |
| POST | /v1/audio/transcriptions | Speech to text (multipart upload), OpenAI audio format. |
| POST | /v1/videos | Create a video generation job (Hailuo, Wan). Body: model, prompt, optional image, resolution, seconds. The price is reserved when the job is created and returned in full if it fails. |
| GET | /v1/videos/{id} | Job status: queued, in_progress, completed or failed. |
| GET | /v1/videos/{id}/content | Download the finished MP4 (available for 24 hours). |
Embeddings are not available yet.
Streaming
Pass "stream": true in the request body. Response is Server-Sent Events in OpenAI format. The OpenAI SDK handles this transparently.
Python (streaming)# Streaming — same client, stream=True for chunk in client.chat.completions.create( model="deepseek-v4-flash", messages=[{"role": "user", "content": "Count to 5."}], stream=True, ): delta = chunk.choices[0].delta.content if delta: print(delta, end="", flush=True)
SDKs
We don't ship our own SDK — the OpenAI SDK works as-is with base_url override.
Python# pip install openai>=1.0 from openai import OpenAI client = OpenAI( api_key="cgw-sk-...", # from /api/console base_url="https://cloudgpu.app/v1", ) resp = client.chat.completions.create( model="deepseek-v4-flash", messages=[{"role": "user", "content": "Say hi."}], ) print(resp.choices[0].message.content) print(f"Used {resp.usage.total_tokens} tokens")
Node.js// npm install openai import OpenAI from "openai"; const client = new OpenAI({ apiKey: process.env.CLOUDGPU_API_KEY, baseURL: "https://cloudgpu.app/v1", }); const resp = await client.chat.completions.create({ model: "deepseek-v4-flash", messages: [{ role: "user", content: "Say hi." }], }); console.log(resp.choices[0].message.content);
Pricing & billing
You pay per token, per image, per character or per second of audio, depending on the model; the current rate for every model is in the price table on https://cloudgpu.app/api. Nothing is metered by the hour and there is no monthly minimum.
Each request deducts from your prepaid balance. Successful calls show in your console within ~1 second with full token counts and dollar cost.
Full per-model pricing table on the landing page.
Claude model rates
Our per-1M-token rates for the Claude models on CloudGPU, next to the official list prices. Official list prices checked 2026-10-24 on the official Claude pricing page.
| Model | CloudGPU input / output, per 1M tokens | Official list price, input / output, per 1M tokens | CloudGPU cached input, per 1M tokens | Official cache-hit list price, per 1M tokens |
|---|---|---|---|---|
Claude Opus 5.5 claude-opus-5-5 | $2.00 / $10.00 | $4.00 / $20.00 | $0.10 | $0.20 |
Claude Opus 5 claude-opus-5 | $2.50 / $12.50 | $5.00 / $25.00 | $0.25 | $0.50 |
Claude Opus 4.8 claude-opus-4-8 | $2.50 / $12.50 | $5.00 / $25.00 | $0.25 | $0.50 |
Claude Opus 4.7 claude-opus-4-7 | $2.50 / $12.50 | $5.00 / $25.00 | $0.25 | $0.50 |
Claude Opus 4.6 claude-opus-4-6 | $2.50 / $12.50 | $5.00 / $25.00 | $0.25 | $0.50 |
Claude Sonnet 5.5 claude-sonnet-5-5 | $1.00 / $5.00 | $2.00 / $10.00 | $0.05 | $0.10 |
Claude Sonnet 5 claude-sonnet-5 | $1.00 / $5.00 | $2.00 / $10.00 | $0.10 | $0.20 |
Claude Sonnet 4.6 claude-sonnet-4-6 | $1.50 / $7.50 | $3.00 / $15.00 | $0.15 | $0.30 |
Claude Fable 5.1 claude-fable-5-1 | $5.00 / $25.00 | $10.00 / $50.00 | $0.125 | $0.25 |
Claude Fable 5 claude-fable-5 | $5.00 / $25.00 | $10.00 / $50.00 | $0.50 | $1.00 |
Claude Opus 5.5 claude-opus-5-5
CloudGPU, per 1M tokens
input $2.00 / output $10.00 / cached input $0.10
Official list price, per 1M tokens
input $4.00 / output $20.00 / cache hits $0.20
Claude Opus 5 claude-opus-5
CloudGPU, per 1M tokens
input $2.50 / output $12.50 / cached input $0.25
Official list price, per 1M tokens
input $5.00 / output $25.00 / cache hits $0.50
Claude Opus 4.8 claude-opus-4-8
CloudGPU, per 1M tokens
input $2.50 / output $12.50 / cached input $0.25
Official list price, per 1M tokens
input $5.00 / output $25.00 / cache hits $0.50
Claude Opus 4.7 claude-opus-4-7
CloudGPU, per 1M tokens
input $2.50 / output $12.50 / cached input $0.25
Official list price, per 1M tokens
input $5.00 / output $25.00 / cache hits $0.50
Claude Opus 4.6 claude-opus-4-6
CloudGPU, per 1M tokens
input $2.50 / output $12.50 / cached input $0.25
Official list price, per 1M tokens
input $5.00 / output $25.00 / cache hits $0.50
Claude Sonnet 5.5 claude-sonnet-5-5
CloudGPU, per 1M tokens
input $1.00 / output $5.00 / cached input $0.05
Official list price, per 1M tokens
input $2.00 / output $10.00 / cache hits $0.10
Claude Sonnet 5 claude-sonnet-5
CloudGPU, per 1M tokens
input $1.00 / output $5.00 / cached input $0.10
Official list price, per 1M tokens
input $2.00 / output $10.00 / cache hits $0.20
Claude Sonnet 4.6 claude-sonnet-4-6
CloudGPU, per 1M tokens
input $1.50 / output $7.50 / cached input $0.15
Official list price, per 1M tokens
input $3.00 / output $15.00 / cache hits $0.30
Claude Fable 5.1 claude-fable-5-1
CloudGPU, per 1M tokens
input $5.00 / output $25.00 / cached input $0.125
Official list price, per 1M tokens
input $10.00 / output $50.00 / cache hits $0.25
Claude Fable 5 claude-fable-5
CloudGPU, per 1M tokens
input $5.00 / output $25.00 / cached input $0.50
Official list price, per 1M tokens
input $10.00 / output $50.00 / cache hits $1.00
Official list prices can change after the check date; the official pricing page is the source for them. Our rates come from the live price table on /api. CloudGPU is an independent service, not the official Claude API.
GPU instances
The same API key also rents GPUs: list what is on the shelf, start an instance from a template, poll until it is running, read its SSH details and public API endpoint, destroy it. Billing is identical to the web console — per minute, from the same balance.
This section is about the REST API. Every account can use it with the same API key. How many instances one account can run at once depends on its top-up history: 1 for accounts that have never topped up, 3 after the first top-up, 10 after $100 of lifetime top-ups.
Using Cursor, Cline, opencode, Claude Code or another AI coding assistant? The CloudGPU MCP server wraps this API so the assistant can rent a GPU, run the job, download the results and shut it down.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/gpu/account | Balance in USD, how many instances this account may run at once, and how many are running now. |
| GET | /v1/gpu/offers | Cards for rent: model, VRAM, hourly price, availability (none / low / ok), minimum card count. |
| GET | /v1/gpu/templates | Templates: id, name, recommended card, whether it exposes a public API endpoint. |
| POST | /v1/gpu/instances | Start an instance. Body: gpu_model and/or template, optional gpu_count (1–8) and model_name. Optional auto-shutdown limits, enforced by our servers even if your client disconnects: max_minutes (time limit after start), max_spend_usd (budget for this instance), idle_minutes (destroy after the GPU has been idle this long; 10–1440, 0 = off). Returns 202 with status creating. Optional setup_script (bash, up to 16 KB): runs once as root in the background after the instance is handed over; output in /root/cloudgpu-setup.log. gpu_model can be “auto”: we pick an available GPU that can run it, choosing by price; if the GPU you name cannot run the template, the error lists GPUs that can, with current prices. |
| GET | /v1/gpu/instances | Your running, starting and recently stopped instances. |
| GET | /v1/gpu/instances/{id} | One instance: status, SSH host/port/user/password, api_url, running minutes, cost so far, and limits (the auto-shutdown settings, expires_at, and stopped_by when a limit ended it). |
| DELETE | /v1/gpu/instances/{id} | Destroy an instance and settle the bill. POST /v1/gpu/instances/{id}/destroy does the same. |
curl -X POST https://cloudgpu.app/v1/gpu/instances \
-H "Authorization: Bearer $CLOUDGPU_API_KEY" \
-H "Content-Type: application/json" \
-d '{"gpu_model": "RTX 4090", "template": "ollama",
"max_minutes": 120, "max_spend_usd": 2, "idle_minutes": 30}'
# 202 Accepted
{"id":"2096…","object":"gpu.instance","gpu_model":"RTX 4090","gpu_count":1,"template":"ollama",
"status":"creating","ssh":null,"api_url":null,
"limits":{"max_minutes":120,"max_spend_usd":2,"idle_minutes":30,"expires_at":null,"stopped_by":null}, …}
# poll GET /v1/gpu/instances/{id} until status is "running";
# then ssh.host / ssh.port / ssh.password and api_url (for API templates) are filled in.Other limits: 20 creations per hour and 60 GPU API requests per minute per key. Ask support@cloudgpu.app to raise them for a real workload.
Rate limits
| Per API key, per minute | 100 requests |
| Per account, per day | 10,000 requests |
These defaults exist to stop abuse during the public beta. Contact us if you need them raised — happy to do it for any genuine workload, just need to know the use case.
Errors
Error responses follow OpenAI's shape: HTTP status code + JSON body { error: { type, code, message } }.
| Status | code | When |
|---|---|---|
| 401 | missing_authorization | No Authorization header. |
| 401 | invalid_api_key | Key unknown or revoked. |
| 400 | model_not_found | Model id not in catalog. See GET /v1/models. |
| 402 | insufficient_balance | Balance below $0.01. Top up. |
| 429 | rate_limit_exceeded | Per-minute or per-day limit hit. |
| 503 | upstream_not_configured | This model is temporarily unavailable. Retry later or use another model. |
Ready?
Get your API key