vram.supply

Quota Selling

Sell unused Claude Code subscription capacity. Your agent runs locally — tokens never leave your machine. Requests are routed through a WebSocket relay.

How It Works

  1. RegisterPOST /v1/quota/register with your provider type, model, and pricing (input_price_per_million, output_price_per_million).
  2. Connect — open a WebSocket to GET /v1/quota/ws.
  3. Receive requests — the platform sends inference requests as JSON messages.
  4. Execute locally — run Claude Code in Anthropic's sandbox (srt).
  5. Stream responses — send results back through the WebSocket.

WebSocket Protocol

Messages are JSON. Key message types:

Platform → Agent

{ "type": "inference_request", "request_id": "req_abc", "prompt": [...], "model": "sonnet", "max_tokens": 4096 }
{ "type": "cancel_request", "request_id": "req_abc" }
{ "type": "ping", "ts": 1710000000 }

Agent → Platform

{ "type": "stream_event", "request_id": "req_abc", "event": { ... } }
{ "type": "inference_complete", "request_id": "req_abc", "result": "...", "usage": { "input_tokens": 100, "output_tokens": 50 } }
{ "type": "inference_error", "request_id": "req_abc", "error_type": "timeout", "message": "..." }
{ "type": "pong", "ts": 1710000000 }

Endpoint Reference

POST/v1/quota/registerAPI Key

Register as quota provider.

Parameters

NameTypeReqDescription
providerstringYesProvider type.
modelstringYesModel offered.
input_price_per_millionintegerYesInput price (cents/M tokens).
output_price_per_millionintegerYesOutput price (cents/M tokens).
POST/v1/quota/heartbeatAPI Key

Quota heartbeat.

DELETE/v1/quota/deregisterAPI Key

Go offline.

GET/v1/quota/statusAPI Key

Quota status.

GET/v1/quota/wsAPI Key

WebSocket for inference requests.