Docs

How Creditpad works

The coins, the credit and the API, in the order you meet them.

Coins and fees

A Creditpad coin is an SPL token on Solana that trades on a bonding curve until it graduates to a public pool. When it launches on pump.fun, its creator picks two things that stay fixed:

  • The family it pays in: Claude, GPT, Gemini or Grok.
  • The holder share, from 1% to 4% of every buy and sell.

Trades made on Creditpad add the holder share and a 1% platform fee on top, in the same transaction. The creator takes no fee at all. A 1 SOL buy on a coin with a 3% holder share pays 0.03 SOL into the coin's pot, 0.01 SOL to the platform, and puts the full 1 SOL into the curve.

Credit tokens

Each coin has its own pot, a Solana address that is the coin's pump.fun creator and receives the holder share of every Creditpad trade. Every 30 minutes Creditpad collects the coin's pump.fun creator fees into the pot, sweeps the pot, prices it at the live SOL price and turns it into the family's credit, qCLAUDE, qGPT, qGEMINI or qGROK, split across the coin's wallet holders by balance. Pools and other program accounts are left out.

Credit owed to you is minted to your wallet as real tokens once it reaches 200 credits, so the token account it opens is worth its rent; until then it keeps adding up and shows on the Credits page. Credit tokens are ordinary SPL tokens: you can hold, send or trade them.

Burned on the Credits page, one credit becomes $0.01 of API balance in its family. Balance in one family cannot pay for another family's models.

API quickstart

  1. Hold Creditpad coins and receive credit.
  2. Burn credit on the Credits page for balance.
  3. Create a key. Keys look like sk-creditpad-... and are shown once.
  4. Point any OpenAI- or Anthropic-compatible client at .

Authentication

Send your key on every request in either header:

  • Authorization: Bearer sk-creditpad-...
  • x-api-key: sk-creditpad-..., which the Anthropic SDKs send

Each key can carry a total and a daily spend cap in dollars. A request over a cap is refused before anything is charged.

Endpoints

  • POST /v1/chat/completions OpenAI chat format, with streaming.
  • POST /v1/messages Anthropic Messages format, with streaming. Anthropic model names map to their OpenRouter ids.
  • POST /v1/messages/count_tokens a token estimate for an Anthropic request.
  • GET /v1/models every model, its family, context length and price. No key needed.
  • GET /v1/balance your balance per family, and this key's spend and caps.
  • GET /v1/usage this key's requests, newest first.

Billing

Requests are forwarded to OpenRouter, which routes them to Anthropic, OpenAI, Google or xAI and reports the exact cost.

  • Before a request runs, its worst-case cost is reserved from your balance.
  • When it finishes you pay the reported cost plus the 5% platform markup, and the rest of the reservation is returned.
  • If a stream is cut off, you pay only for the tokens that were generated.
  • Creditpad stores the model, token counts and cost of each request, never its content.

Errors

  • 401 missing, invalid or revoked key.
  • 402 not enough balance in the model's family, or a key cap reached.
  • 400 invalid request. Parameters that could route to a different model, such as models, provider or route, are refused.
  • 429 more than 120 requests a minute on one key.
  • 502 the provider failed. Nothing is charged.

Examples