HivoGPU documentation

Run compute. Pay on Solana. Check every charge.

HivoGPU is one workspace for renting GPU instances, generating AI media, giving agents a compute budget and inspecting usage receipts. This page documents what the running software does. Where something is not implemented, it says so.

Overview

Three systems are involved, and it helps to keep them apart:

  • Solana carries the payment. You send USDC to the HivoGPU treasury account, and the server verifies that transfer on chain before it changes your balance.
  • The compute provider runs the work. GPU instances and generation jobs execute on the provider’s machines. No computation happens on the blockchain.
  • HivoGPU sits between them: it quotes, reserves, submits, reconciles and settles, and writes a receipt for every settled workload.

Credits are an internal compute balance, not a token. One credit pays for one US dollar of compute at listed prices. There is no HivoGPU token, and the product does not need one.

Quickstart

  1. Open the app, connect a Solana wallet and sign the one-time sign-in message.
  2. In Billing, create a funding request and approve the USDC transfer. Your balance is credited once the network finalizes it.
  3. Rent a GPU from the Marketplace or run a model in the Studio. Both show a quote first.
  4. For automation, create a key in Agents and call the API or connect over MCP.
export HIVOGPU_URL="https://hivogpu.vercel.app"
export HIVOGPU_API_KEY="hivo_sk_…"   # shown once when you create the key

curl "$HIVOGPU_URL/api/v1/balance" -H "Authorization: Bearer $HIVOGPU_API_KEY"

Authentication

Wallet sign-in

Connecting a wallet is not authentication. The app signs you in with a challenge: the server issues a nonce bound to this site’s domain and to your wallet, with an issue time and a five-minute expiry; your wallet signs that exact text; the server verifies the Ed25519 signature and consumes the nonce, so a challenge can be answered once. The session is an HttpOnly, SameSite cookie, stored on the server as a hash and revoked when you sign out. HivoGPU never asks for a seed phrase or a private key.

API keys

Send Authorization: Bearer hivo_sk_…. A key is created by a signed-in wallet, shown once, and stored only as a SHA-256 hash. Each key has scopes, an optional expiry, an optional daily budget and an optional list of allowed workloads. Keys cannot create keys or funding requests.

ScopeAllows
gpus:readList GPUs and rates
models:readList models and prices
instances:readRead instance status
instances:writeQuote, rent and stop GPU instances
jobs:readRead job status and outputs
jobs:writeQuote and run generation jobs
balance:readRead the compute balance
receipts:readRead usage receipts

Daily budget. The budget counts settled charges and amounts still reserved for work in flight, for the UTC day on which the work started. The check and the reservation are one atomic statement on the server, so parallel requests cannot pass it together.

Revoking is not stopping. A revoked key is refused on its next request. An instance it already started keeps running, and keeps being billed, until it is stopped or reaches its budget cap. Jobs already sent to the provider finish.

API reference

Base URL: https://hivogpu.vercel.app. Requests and responses are JSON. Every response has the same envelope:

{ "ok": true,  "data": { … } }
{ "ok": false, "error": { "code": "insufficient_balance", "message": "…", "details": { … } } }

Amounts are micro-credits, sent as decimal strings in fields ending in Micro: 1,000,000 micro-credits = 1 credit = 1 USDC of compute. Amounts you send (budgetCapUsd) are decimal strings such as "5" or "12.50". No floating point is involved on the server.

Idempotency. POST /api/v1/instances and POST /api/v1/jobs require an Idempotency-Key header (8 to 128 characters). Repeating a request with the same key returns the resource created the first time; it never creates or charges twice. The same key with a different body is refused. A quote can be redeemed once.

Catalog

EndpointScopeWhat it does
GET /api/v1/gpuspublicGPU types with provider rate, HivoGPU fee, total rate, availability and locations. Also lists supported runtime images and limits.
GET /api/v1/modelspublicRegistered models with inputs, parameters, pricing basis and whether each can run on this deployment.

Instances

EndpointScopeWhat it does
POST /api/v1/instance-quotesinstances:writeQuote an instance configuration. Body: gpuTypeId, imageId, budgetCapUsd, optional gpuCount, diskGb, dataCenterId. Reserves nothing; expires in about two minutes.
POST /api/v1/instancesinstances:writeLaunch the quoted instance. Body: quoteId, sshPublicKey, optional name. Requires Idempotency-Key. Reserves the budget cap.
GET /api/v1/instancesinstances:readList your instances.
GET /api/v1/instances/:idinstances:readOne instance: status, connection, runtime, charges, remaining budget. Reconciles with the provider.
POST /api/v1/instances/:id/stopinstances:writeTerminate the instance. Answers "stopping" until the provider confirms.

Jobs

EndpointScopeWhat it does
POST /api/v1/job-quotesjobs:writeQuote a generation. Body: modelId, input. Validates the input against the model and returns the most the job can cost.
POST /api/v1/jobsjobs:writeRun the quoted job. Body: quoteId. Requires Idempotency-Key. Reserves the quoted amount.
GET /api/v1/jobsjobs:readList your jobs. Optional ?category=image|video|audio.
GET /api/v1/jobs/:idjobs:readOne job: status, charge, output reference, receipt. Reconciles with the provider.
POST /api/v1/jobs/:id/canceljobs:writeWithdraw a job that has not reached the provider. Answers "unsupported" once it has.
GET /api/v1/jobs/:id/outputjobs:readThe generated file, for its owner. Add ?download=1 for an attachment.

Account

EndpointScopeWhat it does
GET /api/v1/balancebalance:readAvailable, reserved, settled and deposited amounts.
GET /api/v1/receiptsreceipts:readItemized receipts, newest first. Optional ?limit=.
GET /api/v1/receipts/:idreceipts:readOne receipt, with its content hash recomputed.
GET /api/v1/receipts/exportreceipts:readAll receipts as one JSON file.

Example: rent a GPU

# 1. Find a GPU and a runtime image
curl "$HIVOGPU_URL/api/v1/gpus"

# 2. Quote it with a budget cap
curl -X POST "$HIVOGPU_URL/api/v1/instance-quotes" \
  -H "Authorization: Bearer $HIVOGPU_API_KEY" -H "Content-Type: application/json" \
  -d '{"gpuTypeId":"NVIDIA GeForce RTX 4090","imageId":"pytorch-2-8","diskGb":40,"budgetCapUsd":"5"}'

# 3. Launch the quote. Never send a private key: sshPublicKey is the .pub line.
curl -X POST "$HIVOGPU_URL/api/v1/instances" \
  -H "Authorization: Bearer $HIVOGPU_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0b9f6c2e-launch-0001" \
  -d '{"quoteId":"iq_…","sshPublicKey":"ssh-ed25519 AAAA… you@laptop"}'

# 4. Poll until status is "ready", then use connection.sshCommand
curl "$HIVOGPU_URL/api/v1/instances/ins_…" -H "Authorization: Bearer $HIVOGPU_API_KEY"

# 5. Stop it. Billing ends when the provider confirms termination.
curl -X POST "$HIVOGPU_URL/api/v1/instances/ins_…/stop" -H "Authorization: Bearer $HIVOGPU_API_KEY"

Example: run a generation job

curl -X POST "$HIVOGPU_URL/api/v1/job-quotes" \
  -H "Authorization: Bearer $HIVOGPU_API_KEY" -H "Content-Type: application/json" \
  -d '{"modelId":"flux-schnell","input":{"prompt":"a ringed planet, flat vector"}}'

curl -X POST "$HIVOGPU_URL/api/v1/jobs" \
  -H "Authorization: Bearer $HIVOGPU_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: 5f0c1e9a-run-0001" \
  -d '{"quoteId":"jq_…"}'

curl "$HIVOGPU_URL/api/v1/jobs/job_…" -H "Authorization: Bearer $HIVOGPU_API_KEY"
curl -L "$HIVOGPU_URL/api/v1/jobs/job_…/output?download=1" -H "Authorization: Bearer $HIVOGPU_API_KEY" -o output.jpg

Statuses

Instance: requested, provisioning, ready, stopping, stopped, failed. Job: queued, running, succeeded, failed, cancelled, reconciling (the provider’s answer to the submit was lost; the job is checked and never sent twice).

Errors

CodeHTTPMeaning
unauthenticated401No session or API key, or the key is invalid, revoked or expired.
insufficient_scope403The API key lacks the scope this endpoint needs.
workload_not_allowed403The API key is restricted to other workloads.
forbidden403The action needs a wallet session, or the request did not come from this site.
not_found404The resource does not exist or belongs to another account. The two are not distinguished.
validation_failed422The request body is not valid. The message names the field.
idempotency_key_required400A billable creation was sent without an Idempotency-Key header.
idempotency_key_reused422The Idempotency-Key was already used with a different request.
quote_expired409The quote is past its expiry. Request a new one.
quote_used409The quote was already redeemed.
inventory_changed409The GPU is no longer listed or has no capacity.
insufficient_balance402The available balance does not cover the reservation.
budget_exceeded402The API key’s daily budget does not cover the reservation.
provider_not_configured503The capability is not enabled on this deployment.
provider_unavailable503The provider did not answer. Safe to retry later.
provider_rejected502The provider refused the request. Nothing was created or charged.
unsupported501 / 405The operation is not supported, for example cancelling a job the provider already has.
rate_limited429Too many requests. Retry after the number of seconds in Retry-After.

MCP

HivoGPU exposes a Model Context Protocol server over Streamable HTTP at https://hivogpu.vercel.app/api/mcp. It is stateless and authenticated with the same API keys. Every tool calls the same service as its REST endpoint, with the key’s scopes, workload limits and daily budget.

# Claude Code
claude mcp add --transport http hivogpu "https://hivogpu.vercel.app/api/mcp" \
  --header "Authorization: Bearer hivo_sk_…"

# Any client that speaks Streamable HTTP
{
  "mcpServers": {
    "hivogpu": {
      "type": "http",
      "url": "https://hivogpu.vercel.app/api/mcp",
      "headers": { "Authorization": "Bearer hivo_sk_…" }
    }
  }
}

Tools:

  • list_gpus
  • quote_instance
  • rent_gpu
  • get_instance
  • stop_instance
  • list_models
  • quote_job
  • run_job
  • get_job
  • get_balance
  • list_receipts

rent_gpu and run_job are billable and take an idempotencyKey argument with the same meaning as the header. Always call the matching quote tool first.

Billing terms

GPU instances

  • Billed per second of runtime at the quoted hourly rate. Each charge is rounded up to the next millionth of a credit.
  • Billing starts when the provider reports the instance running. Time spent provisioning is not billed.
  • Billing stops when the provider confirms the instance is terminated. Stopping an instance deletes it and its disk; nothing is kept.
  • The budget cap is reserved from your balance at launch. HivoGPU stops the instance shortly before the cap is reached, and you are never charged more than the cap. Whatever is not used is returned to your balance when the instance ends.
  • There is no minimum charge and no startup fee. A launch that the provider cannot place costs nothing.
  • Container disk is billed by the provider at $0.10 per GB per month while the instance runs; this is included in the hourly rate shown.

The budget cap is enforced by reconciliation, not by the provider. HivoGPU checks running instances on a schedule and requests termination while a margin of runtime is still in hand. If termination is confirmed late, the instance may have run slightly past the cap at the provider; that overrun is not charged to you, because a charge can never exceed the reservation.

Generation jobs

  • The quote is the most a job can cost. It is reserved from your balance when you confirm.
  • When the provider reports what the job actually cost, that figure is charged instead, never more than the quote. The rest of the reservation is returned.
  • A job that fails, times out or is refused by the provider costs nothing: the whole reservation is returned.
  • Outputs are kept by the provider for 7 days. Download anything you want to keep.

Credits

  • Credits are an internal compute balance, not a token. One credit pays for one US dollar of compute at listed prices.
  • Credits are added after a USDC payment on Solana is verified on chain. One USDC adds one credit.
  • Credits cannot be transferred or withdrawn, and this release has no automatic refund flow.

Solana payments

USDC is the supported asset. SOL is not accepted: it would need a trusted exchange-rate quote and rules for under- and overpayment, which this release does not implement.

  1. A signed-in wallet creates a funding request for an amount. The request records the wallet, the network, the USDC mint, the treasury token account, the amount in base units, an expiry, a one-time reference key and a memo.
  2. The server prepares one USDC transfer. Your wallet signs it. The server checks that the signed bytes are exactly that transfer, then relays it.
  3. When the transaction reaches the required commitment, the server reads it back from its own RPC node and checks every binding below. Only then is the balance credited.

What is verified

  • The transaction succeeded.
  • The RPC node belongs to the configured cluster (genesis hash), and the mint is that network’s USDC mint.
  • The receiving account is the treasury’s USDC token account, owned by the treasury.
  • The funding wallet signed the transaction and authorised the transfer.
  • The amount moved equals the requested amount in base units, and the treasury balance rose by exactly that.
  • The transaction carries the request’s reference key and memo, so a payment made for one request cannot satisfy another.
  • The signature has not been credited before. A unique constraint on (network, signature) and an atomic ledger write make a second credit impossible.

A payment is also found without the browser: the server searches the chain by the reference key, so a closed tab does not lose a deposit. A payment that arrives after its request expired is still credited when found within 24 hours. A transaction that is tied to a request but does not match it is kept for review and not credited; there is no automatic refund flow.

Networks

A deployment runs on exactly one network, shown in the app’s top bar. Devnet tokens have no value and are labelled as test tokens everywhere. Balances are kept per network and are never mixed.

Operator configuration

HIVO_SOLANA_NETWORK=devnet            # devnet | mainnet
SOLANA_RPC_URL_DEVNET=                # optional; defaults to the public devnet endpoint
SOLANA_RPC_URL_MAINNET=               # set your own endpoint for mainnet
HIVO_TREASURY_DEVNET=                 # public address that owns the receiving USDC account
HIVO_TREASURY_MAINNET=
HIVO_PAYMENT_COMMITMENT=finalized     # finalized | confirmed

The treasury is a public address. No treasury private key is ever placed in the web application: HivoGPU only receives. The treasury’s USDC token account must exist before deposits are enabled; the Billing page reports when it does not.

Receipts

A receipt is written when a job succeeds or an instance stops after running. Each one carries:

  • Receipt ID
  • Wallet and network
  • Workload ID and type
  • Provider and provider reference
  • Model or GPU
  • Usage units
  • Pricing basis
  • Provider cost
  • HivoGPU fee
  • Total charge
  • Start, end and issue times
  • Funding reference

Receipts are offchain usage records kept by HivoGPU. They are not anchored on Solana in this release. Each receipt has a SHA-256 content hash over a canonical JSON form of its fields, which lets you detect a later change to the record. A hash, anchored or not, proves that a record was committed; it does not prove that GPU work was executed correctly.

The funding reference is the signature of the most recent verified deposit before the charge. Credits are fungible, so it is a pointer for your own bookkeeping, not a claim that those specific tokens paid for that workload.

Provider setup

The integrated provider is Runpod, used through its REST API v2 for instances and its Public Endpoints for generation. HivoGPU is an independent product and is not affiliated with Runpod. Without a key, the app shows the provider’s public list prices and disables renting and generation.

RUNPOD_API_KEY=                       # server-side only; enables renting and generation
RUNPOD_CLOUD=SECURE                   # SECURE | COMMUNITY
HIVO_ENABLED_MODELS=flux-schnell,minimax-speech-02-hd   # models to offer, by registry id
HIVO_RUNTIME_IMAGES=                  # optional JSON: [{"id":"…","label":"…","image":"…"}]
HIVO_FEE_BPS=1000                     # HivoGPU fee in basis points (1000 = 10%)

A provider key does not make every model available. Each model below has an explicit endpoint, input contract and price in the server-side registry, and stays off until its id is listed in HIVO_ENABLED_MODELS.

Registry idModelTypeProvider price
flux-schnellFLUX.1 SchnellBlack Forest Labsimage$0.0024 per megapixel
flux-devFLUX.1 DevBlack Forest Labsimage$0.02 per megapixel
z-image-turboZ-Image TurboTongyi-MAIimage$0.005 per image
wan-2-6-t2vWAN 2.6 Text-to-VideoAlibabavideo720p: $0.50 / $1.00 / $1.50 for 5 / 10 / 15 s. 1080p: $0.75 / $1.50 / $2.25
p-videoPruna VideoPruna AIvideo$0.02 per second at 720p, $0.04 at 1080p. Draft mode: $0.005 and $0.01
minimax-speech-02-hdMiniMax Speech 02 HDMiniMaxaudio$0.05 per 1,000 characters

Prices are the provider’s published prices, read on 2026-11-27. When the provider reports the actual cost of a finished job, that figure is charged instead, never above the quote. Models billed by the length of what they generate are not registered, because they cannot be quoted before they run.

Development simulator. HIVO_PROVIDER=dev-simulator runs the whole workflow without a provider, for local development only. It is refused in production, and everything it produces is labelled as simulated.

Worker

Billable work is a durable state machine in the database. A background pass keeps it in line with the provider and the chain: it finds payments the browser never reported, resolves launches whose answer was lost, charges runtime, enforces budget caps and completes stops. The provider’s create call has no idempotency key, so every instance is created under a unique name and an ambiguous create is resolved by looking that name up; it is never blindly retried.

pnpm worker          # long-running process; run it beside the web app
pnpm worker:once     # one pass, then exit

The web app runs short requests only. On a serverless host, schedule POST /api/cron/tick with Authorization: Bearer $CRON_SECRET for a single bounded pass, and run the long-lived worker on a separate machine when instances are in use, so budget caps are enforced promptly.

Status

What this deployment can do right now, read from the running server:

Reading the deployment…

Limitations

  • Receipts are offchain records. Onchain anchoring is not implemented.
  • USDC is the only payment asset. SOL and x402 are not implemented.
  • There is no automatic refund or withdrawal flow. Credits stay in the workspace.
  • Jupyter access is not offered. Instances are reached over SSH with your own key.
  • A job cannot be cancelled once the provider has it; the provider documents no cancel operation for its public endpoints.
  • Generated files are kept by the provider for 7 days and are not copied to separate storage.
  • Budget caps are enforced by scheduled reconciliation. You are never charged above a cap, but an instance can run briefly past it at the provider before termination is confirmed.
  • The rate limiter is per server instance. Put a global limit in front of the app when one is needed.
  • The software has not been independently audited.