Docs65 bps$200 floorChain 4663
Open the terminal
Take payment/API reference

API reference

Settling locks a vendor. The owed_ key you get speaks that vendor’s real contract, so official SDKs work with a single baseURL override.

Base URL

The base URL is this origin: https://getowed.fun. /gateway/v1 is an alias for /v1 if you prefer an explicit path. Authentication is the header the vendor expects, carrying the owed_ key in place of theirs.

Endpoints

VendorPathAuth header
AnthropicPOST /v1/messagesx-api-key: owed_…
OpenAIPOST /v1/chat/completionsAuthorization: Bearer owed_…
GooglePOST /v1beta/models/{model}:generateContentx-goog-api-key: owed_…
DeepSeekPOST /v1/chat/completionsAuthorization: Bearer owed_…
xAIPOST /v1/chat/completionsAuthorization: Bearer owed_…
MistralPOST /v1/chat/completionsAuthorization: Bearer owed_…
MetaPOST /v1/chat/completionsAuthorization: Bearer owed_…
CoherePOST /v1/chat/completionsAuthorization: Bearer owed_…
PerplexityPOST /chat/completionsAuthorization: Bearer owed_…
MoonshotPOST /v1/chat/completionsAuthorization: Bearer owed_…

OpenAI-compatible vendors

OpenAI, DeepSeek, xAI, Mistral, Meta, Cohere, Perplexity, and Moonshot all share the chat-completions contract. Point the OpenAI SDK at this origin and set the model to the one you locked at settle time.

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.OWED_KEY,        // owed_…
  baseURL: "https://getowed.fun/v1",
});

const res = await client.chat.completions.create({
  model: "gpt-5.2-mini",
  messages: [{ role: "user", content: "Summarise this diff" }],
  stream: true,
});

for await (const chunk of res) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
}

Anthropic

Anthropic uses its own messages contract and the x-api-key header. The SDK needs the origin without a version suffix.

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.OWED_KEY,
  baseURL: "https://getowed.fun",
});

await client.messages.create({
  model: "claude-sonnet-4-6",
  max_tokens: 512,
  messages: [{ role: "user", content: "Hello" }],
});

Google

Use the official generateContent path against this origin, with the key in x-goog-api-key.

curl https://getowed.fun/v1beta/models/gemini-3.0-flash:generateContent \
  -H "x-goog-api-key: $OWED_KEY" \
  -H "content-type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Using a key in Cursor

Cursor accepts an OpenAI-compatible base URL. Set the override to https://getowed.fun/v1, paste the owed_ key as the API key, and pick the model you locked. When the cap is spent, requests return 402 and nothing silently falls back to a paid account.

Errors

CodeMeaning
400The request body failed validation before it left the desk.
401The key is missing, revoked, or unknown to the gateway.
402The cap on that key is spent. Mint a new key from remaining compute credit.
403The key is valid but locked to a different vendor or model than the one requested.
429Rate limited. The header tells you when to retry.
503That vendor’s upstream is unset or unreachable from the desk.
The desk cap always binds, even when the upstream gateway is perfectly healthy. A key cannot outspend the marker it was minted from.

Need a key first? See compute credit.