KOMPUTE

Documentation

KOMPUTE docs

A two-sided marketplace for LLM inference. Sellers list OpenAI-compatible endpoints and compete on price. Buyers and agents get one base URL. KOMPUTE routes to a healthy offer and bills the account.

Overview

Think of KOMPUTE as an exchange for API calls to AI models:

  • Buyers get one API key and one base URL. Call it like OpenAI — the marketplace picks a live seller for the requested model.
  • Sellers list any OpenAI-compatible endpoint, set a $/M input price, and receive that price on their balance when their offer is selected. The platform fee is a separate basis-point setting and starts at zero.
  • Agents use the same key and base URL. x402 is a Base payment for agents that do not have an account. It uses the same chat URL.

The HTTP API is OpenAI-compatible at https://kompute-kompute.vercel.app/v1. Anything that speaks /v1/chat/completions can point here with a base-URL change.

Choose your path

1. Buyer

Deposit balance → create keys with daily caps → call models. Use the Buy console.

2. Agent

Same as buyer: a key secret in Authorization: Bearer. Cap and pause from the console so a runaway loop cannot drain the account.

3. Seller

List model + base_url + price. Offers feed the order book buyers and agents consume. Use Sell.

Current snapshot

Counts from this server.

  • 0 active seller offers · 1 buyer keys · test-credit balance $—
  • GET https://kompute-kompute.vercel.app/v1/models — models from active offers
  • GET https://kompute-kompute.vercel.app/api/state — account, keys, and offers
  • GET https://kompute-kompute.vercel.app/healthz — service check

Quick start

  1. Open Buy, add credits, create a key. Copy the secret once — it is not shown again.
  2. Confirm a model exists: GET https://kompute-kompute.vercel.app/v1/models or list an offer on Sell.
  3. Point any OpenAI-compatible client at https://kompute-kompute.vercel.app/v1 with your key.

curl

curl https://kompute-kompute.vercel.app/v1/chat/completions \
  -H "Authorization: Bearer kompute_…" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "llama-3.3-70b",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

Python (OpenAI SDK)

# pip install openai
from openai import OpenAI

client = OpenAI(
    base_url="https://kompute-kompute.vercel.app/v1",
    api_key="kompute_…",
)

reply = client.chat.completions.create(
    model="llama-3.3-70b",
    messages=[{"role": "user", "content": "Hello"}],
)
print(reply.choices[0].message.content)

Node (OpenAI SDK)

// npm install openai
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://kompute-kompute.vercel.app/v1",
  apiKey: "kompute_…",
});

const reply = await client.chat.completions.create({
  model: "llama-3.3-70b",
  messages: [{ role: "user", content: "Hello" }],
});
console.log(reply.choices[0].message.content);

API keys

Create keys in Buy. Each key draws from the shared prepaid balance and enforces its own daily cap.

Setting What it does
Label Human name for the key (e.g. cursor, agent-01).
Daily cap Maximum USD this key may spend in the current day. Exceeding it returns HTTP 402.
Pause Blocks new requests immediately without deleting the key. Resume any time.
Delete Revokes the key permanently. Create a new one if the secret is lost.

The secret is shown once on Buy, right after you create the key. Store it on your server. The prefix in the table is safe to display.

Auth header:

Authorization: Bearer kompute_<secret>

A call without Authorization: Bearer returns HTTP 401. A funded key is required.

Models

Model ids come from active seller offers. Pause or delete an offer and it leaves the catalog.

  • No active offers — list one on Sell.
curl https://kompute-kompute.vercel.app/v1/models
{
  "object": "list",
  "data": [
    { "id": "llama-3.3-70b", "object": "model", "owned_by": "kompute" }
  ]
}

Pass the id as model in chat requests. If several sellers list the same id, the router picks the cheapest active healthy offer.

Chat completions

POST https://kompute-kompute.vercel.app/v1/chat/completions — OpenAI Chat Completions shape.

Request body

Field Required Notes
model Yes Must match an active offer id for seller attribution.
messages Yes Standard OpenAI message array (role + content).
stream No Not supported. Omit it; the response is one JSON body.
max_tokens No Forwarded to the seller. The charge uses the seller’s returned usage, not this field.

Example

POST https://kompute-kompute.vercel.app/v1/chat/completions
Authorization: Bearer kompute_…
Content-Type: application/json

{
  "model": "llama-3.3-70b",
  "messages": [
    { "role": "system", "content": "Be brief." },
    { "role": "user", "content": "hello" }
  ]
}

Response

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "model": "llama-3.3-70b",
  "choices": [{
    "index": 0,
    "finish_reason": "stop",
    "message": { "role": "assistant", "content": "…" }
  }],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 22,
    "total_tokens": 34
  },
  "kompute": {
    "seller": "seller-a.example",
    "charged_usd": 0.01
  }
}

The kompute object is KOMPUTE-specific metadata (selected seller host and charge). OpenAI SDKs ignore unknown fields.

Errors

HTTP When Body
402 Paused key, daily cap hit, or insufficient balance error.type = insufficient_quota
303 HTML form actions (deposit, create key/offer) Redirect back to Buy/Sell with optional ?err=
{
  "error": {
    "message": "daily cap reached",
    "type": "insufficient_quota"
  }
}

Sellers

List capacity from Sell or via the form POST endpoints the console uses.

Field Meaning
Model id Exact string buyers pass as model (e.g. llama-3.3-70b).
Base URL OpenAI-compatible root (usually ends in /v1). Host is derived for display and routing metadata.
$ / M input Your offer price per million input tokens. Used for ranking when real proxy billing lands.
Health ok, degraded, or paused. Pause toggles active traffic.

Console actions:

  • POST /sell/offers — create
  • POST /sell/offers/{id}/toggle — pause / activate
  • POST /sell/offers/{id}/delete — remove

Offers are health-checked against the seller’s /models endpoint. The upstream key is stored encrypted and sent only when KOMPUTE proxies a call.

Payments

Rail Status How you are charged
Test credits Off A faucet number on the account. It is not USDC or USDG. A chat debits input tokens × the seller’s $ / M input, plus output tokens at 3× that rate, at least $0.0001. The seller is credited that price minus the platform fee.
USDC on Base Live From Buy, your wallet sends USDC on Base to the fee wallet. After the transfer confirms, that amount is added to this balance once. A chat still debits the balance, not the token.
USDG on Robinhood Chain Live Same prepaid balance, paid in USDG on Robinhood Chain. Minimum 0.01. The same transaction cannot be credited twice.
x402 Live on Base No account. POST /v1/chat/completions without a key returns HTTP 402 with the USDC amount and the fee wallet. Send at least that much USDC on Base, then retry with PAYMENT-SIGNATURE set to base64 JSON {"txHash":"0x…"}. The call price is charged and any surplus stays on that wallet.

Clients & tools

Any stack that accepts a custom OpenAI base URL works:

  • Cursor / Continue / Aider / OpenCode — set base URL to https://kompute-kompute.vercel.app/v1 and paste a buyer key.
  • LangChain / Vercel AI SDK / LlamaIndex — OpenAI chat provider with the same base URL.
  • Raw HTTP — curl examples above.

Use the OpenAI chat path for every model.

Playground

Sends the message through KOMPUTE. Paste a key secret from Buy.

Response lands here.

Agent guide

Machine-readable summary for LLMs and agents. Prefer this over scraping HTML.

GET https://kompute-kompute.vercel.app/docs.md

Includes the base URL, endpoints, auth, and payment rails in one markdown document.