← 输入框|cloudgpu.app|刷新

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

  1. Go to API Console and create a key. Copy the cgw-sk-... value — it's shown once.
  2. Top up your balance via Billing. One balance covers API calls and GPU rentals.
  3. Make a request:
cURL
curl 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

MethodPathPurpose
POST/v1/chat/completionsOpenAI-format chat completion. Same request/response shape as OpenAI.
GET/v1/modelsList available models + current per-token pricing.
POST/v1/messagesClaude Messages API format, for Claude Code and the Anthropic SDK (base URL https://cloudgpu.app).
POST/v1/messages/count_tokensCount the input tokens of a Messages request without running it.
POST/v1/images/generationsImage generation (FLUX, Qwen-Image, Seedream), OpenAI images format.
POST/v1/audio/speechText to speech, OpenAI audio format.
POST/v1/audio/transcriptionsSpeech to text (multipart upload), OpenAI audio format.
POST/v1/videosCreate 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}/contentDownload 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.

  • 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.

MethodPathPurpose
GET/v1/gpu/accountBalance in USD, how many instances this account may run at once, and how many are running now.
GET/v1/gpu/offersCards for rent: model, VRAM, hourly price, availability (none / low / ok), minimum card count.
GET/v1/gpu/templatesTemplates: id, name, recommended card, whether it exposes a public API endpoint.
POST/v1/gpu/instancesStart 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/instancesYour 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 minute100 requests
Per account, per day10,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 } }.

StatuscodeWhen
401missing_authorizationNo Authorization header.
401invalid_api_keyKey unknown or revoked.
400model_not_foundModel id not in catalog. See GET /v1/models.
402insufficient_balanceBalance below $0.01. Top up.
429rate_limit_exceededPer-minute or per-day limit hit.
503upstream_not_configuredThis model is temporarily unavailable. Retry later or use another model.