Docs

Change one line. Keep your code.

GHOSTKEY speaks the OpenAI API. Point any OpenAI SDK at our base URL, use your GHOSTKEY key, and pick from 200+ models.

Quickstart

1. Create an API key. Signing in with a wallet is free. 2. Set the base URL to . 3. Use any model id from the models page.

Streaming works the same way: add "stream": true. The last streamed chunk has an empty choices list and a ghostkey_receipt object: tokens, rates, exact cost and the request we forwarded. Non-streaming answers carry the same ghostkey_receipt field.

API keys

Send your key as a Bearer token: Authorization: Bearer gk_live_…. Keys start with gk_live_.

We show a key once, when you create it. We keep only a hash and the first characters, so we cannot show it again. Lost a key? Create a new one on your account page.

Every key bills the balance of the wallet that made it. A new account gets 10 free calls on low-cost models, so you can test before you top up.

Limits per key. On your account page, give any key a name, a daily limit in USD and an expiry date (1 day to 1 year). The limit counts what that key spends from your balance in each UTC day. Requests are sized to fit what is left, parallel calls included, so a key never goes over. At the limit it answers 402 key_daily_limit_reached until 00:00 UTC. After the expiry date it answers 401 key_expired. Your other keys and the chat are not affected.

Calls on a key with a limit return what is left today in the X-Ghostkey-Key-Limit-Left header and in ghostkey_receipt.keyDailyLimitLeftUsd.

Endpoints

MethodPathWhat it does
POST/v1/chat/completionsOpenAI-compatible chat. Needs an API key. Stream or not.
GET/v1/modelsEvery model you can call, OpenAI format.
GET/api/modelsSame list with prices per 1M tokens and zero-retention providers.
POST/api/inspectShows what we would send to OpenRouter for a request. Free, calls no model. Try it.
GET/api/statsPublic totals: messages, tokens, accounts, Ghost Credit paid.
GET/api/ledgerGhost Credit per hour, with Merkle roots and transactions.
GET/api/ledger/{hour}/rawThe exact hour file. Its keccak256 hash is the uriHash posted on-chain.
GET/api/holder/{wallet}A wallet's $GHOST balance and every credit it got, with proofs.
GET/api/configPublic addresses and settings: treasury, token, ledger, limits.

Request fields we pass on

model, messages, stream, max_tokens, temperature, top_p, stop, tools, tool_choice, response_format, seed, presence_penalty, frequency_penalty.

We drop user, metadata, provider and plugins, and any OpenRouter server tool inside tools (only plain functions pass). We always set our own provider rule. See Privacy.

One GHOSTKEY field: "web_search": true turns on web search for that call. See Web search.

Models

Model ids are the same as on OpenRouter, like openai/gpt-4o-mini or anthropic/claude-sonnet-4. We list only models with at least one Zero Data Retention provider.

Prices are OpenRouter's prices, per 1 million tokens. Compare them with OpenRouter from your browser.

Confidential models

A model id ending in :confidential, like z-ai/glm-5.3-flash:confidential, is routed only to NEAR AI, which runs these models inside hardware enclaves (Intel TDX on the CPU, NVIDIA confidential computing on the GPU). The request carries provider.only: ["near-ai"] with fallbacks off, so it fails instead of going to another provider. Zero retention is still forced.

We show the tag only while NEAR AI's public attestation report for that model can be fetched. We fetch it every 30 minutes with a fresh nonce. To check a model yourself, open its report on NEAR AI's verifier. To check a single answer, press Check on its receipt: OpenRouter's own record names the provider that served it.

The enclave protects the model side. Your words still pass through our server on the way, as with every model, and we still do not store them.

Off unless you switch it on. In the chat, press Web next to the message box. It applies to that one message and turns itself off after sending. In the API, add "web_search": true to a call.

With it on, we add one fixed line to the request: "plugins": [{"id": "web", "engine": "exa", "max_results": 5}]. OpenRouter then runs a search at Exa built from your message, and puts the text of the pages it finds into the prompt. The answer lists the pages it used under Sources, taken from OpenRouter's url_citation annotations. In the API they arrive in message.annotations and in ghostkey_receipt.web.sources.

Who sees what. Zero data retention still applies to the model. It does not cover the search: Exa is a separate company and keeps its own logs of the query under its own policy. We do not see or store the query OpenRouter sends to Exa, and we do not store the sources. The engine is fixed to Exa, so the model provider's own search tool is never used.

Cost. OpenRouter charges $0.007 per search for Exa, plus the page text as input tokens at the model's rate. Both are inside the usage.cost we bill, so the receipt still checks against OpenRouter's record. Free messages cannot use search. Confidential models cannot either: the search would leave the enclave.

Billing

Prepaid. You add balance with ETH or USDG on Robinhood Chain. The top-up fee is 0%. One dollar paid is one dollar of credit.

Hold, then settle. When a call starts, we hold the most it could cost (your max_tokens at the model's price). When it ends, we charge the exact cost OpenRouter reports for that call and release the rest. If the call fails, the hold is released in full.

No markup. The amount billed is the cost OpenRouter reports in usage.cost. Every chat answer shows it, and your usage table lists every call.

Receipts. Every response carries generationId (OpenRouter's ID for that answer) and forwardedSha256 (a hash of the exact body we sent, kept only in your receipt). Open /api/receipt/<generationId> to see OpenRouter's own record for that answer next to what we billed. Your account page exports every call as CSV.

Balance is not a token. It is prepaid AI credit held by GHOSTKEY's server. It cannot be traded or withdrawn.

Limits

Free messages in web chat, no wallet10 per browser
Free API calls for a new account10 calls
Models allowed for free messagesLow-cost models, marked “Free OK”
Top-up range$5 to $2,000 per payment
Free messages for $GHOST holders30 a day in chat + 30 API calls a day
API rate limit120 requests a minute · 600 for holders

Free messages pause for the day if the site-wide free budget runs out. Paid calls are not affected.

Holders are wallets with at least 100,000 $GHOST, read on-chain and refreshed every few minutes. Sign in with that wallet: holder free messages are used when your balance is $0, work on low-cost models, and reset at 00:00 UTC.

Errors

Errors use the OpenAI shape: {"error": {"message": "…", "code": "…"}}.

HTTPCodeMeaning
401invalid_api_keyKey missing, wrong or replaced.
401key_expiredThe key passed its expiry date. Extend it or make a new one on your account page.
402key_daily_limit_reachedThe key spent its daily limit. It works again at 00:00 UTC, or raise the limit.
402insufficient_balanceBalance too low for this call. Add balance or lower max_tokens.
402model_needs_balanceFree calls work only on low-cost models.
402web_search_needs_balanceWeb search costs $0.007 per search, so it needs a balance. Free calls cannot use it.
400web_search_not_on_confidentialWeb search is not available on :confidential models.
400bad_modelUnknown model id, or no zero-retention provider for it right now.
400bad_messagesThe messages array is missing or malformed.
429slow_downToo many requests. Wait a moment.
502upstream_errorThe model provider failed. You are not charged.

Privacy

Every request goes to OpenRouter with GHOSTKEY's own key, shared by all users. We remove your IP address, device, cookies, wallet address, account ID and the user field.

We add provider: {"zdr": true, "data_collection": "deny"} to every request. Zero Data Retention means the provider keeps nothing after answering. OpenRouter publishes the list of ZDR providers.

See it for yourself in the inspector, or call POST /api/inspect with your own request.

Ghost Credit

Each $GHOST trade costs 3%: the 1% Pons fee plus a 2% creator tax, locked at launch. Since $GHOST graduated on Nov 28, 2026, both are taken on Uniswap V4 trades by Pons' hook; the pool itself charges no extra fee. The creator tax and 0.7 points of the Pons fee are the creator fee. Each hour we claim it: 25% becomes AI credit for holders, split by average balance. The rest goes to the team. Each hour's split is posted on-chain as a Merkle root.

Ghost Credit lands in your GHOSTKEY balance and works for chat and the API. Read how it works and check any wallet.

Terms of use

Plain-language summary · last updated 26 Nov 2026

  1. What we do. GHOSTKEY forwards your requests to AI models through OpenRouter and bills you what OpenRouter charges.
  2. Your balance. It is prepaid credit for AI use on GHOSTKEY. It is not a deposit, an investment or a token. It cannot be withdrawn or traded.
  3. Your content. You own what you write and what the models answer. You are responsible for how you use it.
  4. Fair use. Follow the law and the rules of OpenRouter and the model providers. We may slow or block accounts that abuse the service.
  5. Models change. Providers can change prices or remove models. Prices follow OpenRouter at the time of each call.
  6. No guarantees. The service is offered as it is. AI answers can be wrong. We do not promise uptime.
  7. $GHOST and Ghost Credit. $GHOST is not an investment. Ghost Credit is AI credit on GHOSTKEY, not money, and depends on trading volume. We promise no price or profit.
  8. Changes. We may update these terms. The date above changes when we do.

Privacy policy

Plain-language summary · last updated 26 Nov 2026

What we store

  • Your wallet address, once you sign in. Top-ups and Ghost Credit need it.
  • Your balance, your top-up transactions and your Ghost Credit rows.
  • Usage rows: model, tokens in and out, cost, time, whether it came from chat or the API, and OpenRouter's generation ID for that answer (an ID, not the content).
  • API keys: a hash and the first characters, never the full key, plus any name, daily limit or expiry you set, and one running total of what each key spent today (deleted after two days).
  • A random browser ID stored in your browser, to count your free messages.

What we never store

  • Your prompts and the answers. Chat history lives only in your browser.
  • Your PDFs. Their text is read in your browser and sent inside your message like anything you type. The file is never uploaded, and our server does not keep the text.
  • Your personas. Their names and instructions live only in your browser. When a chat uses one, its instructions travel with each request like any message, and are not kept.
  • Your IP address and your device. To limit free messages, we count requests per IP per day using a scrambled code (a hash with a secret that changes every time the server restarts). These counts are deleted within 2 days.

Who else sees your request

OpenRouter and the zero-retention provider that answers. They see the request text but not who sent it. OpenRouter screens content as the law requires.

Your rights

Download everything we store about your wallet at any time from your account. To delete your account data, contact us on X.