Docs
Change one base URL and your existing OpenAI-compatible client starts getting signed receipts. Everything below works with the OpenAI SDKs, LangChain and the Vercel AI SDK.
1. Save Your Provider Key
In the portal Keys page, add your own OpenAI, Anthropic, Google or xAI key. It is tested against the provider before it is saved, encrypted at rest, and only decrypted for the length of a call. Or send one per call in the X-Provider-Key header instead.
2. Create a Chain Receipt API Key
On the same Keys page, create an API key (crk_live_... or crk_test_...). That is the key your client sends — never your provider key. The full key is shown once.
3. Point Your Client at the Proxy
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://chainreceipt.link/api/v1",
apiKey: process.env.CHAIN_RECEIPT_API_KEY, // the Chain Receipt key, not the provider key
});
const res = await client.chat.completions.create({
model: "openai/gpt-4.1", // or anthropic/..., google/..., xai/...
messages: [{ role: "user", content: "Summarize this contract clause..." }],
});
console.log(res.choices[0].message.content);
console.log(res.ai_receipt.verify_url);Look for the X-Receipt-Verify-Url header in the reply.
What Comes Back
The response is the provider's own JSON, plus an ai_receipt object (receipt id, verify URL, receipt hash, signature, key id, anchor status and the salts you need to re-check your copy) and the X-Receipt-Id, X-Receipt-Verify-Url, X-Receipt-Hash and X-Receipt-Status headers. Streaming responses send the same receipt as one last ai_receipt event before [DONE].
Models
Prefix the model with its provider: openai/..., anthropic/..., google/..., xai/.... A bare model name is a 400. Anthropic runs on its native Messages API, not its OpenAI-compatible endpoint. GET https://chainreceipt.link/api/v1/models lists what your saved keys can reach.
Limits and Errors
- Free: 20 requests a minute and 5,000 receipts a month, hard stop. Past the monthly quota, calls are refused with a 429 (
quota_exceeded) until the 1st. - Request bodies are capped at 2 MB. Errors come back in OpenAI shape, so existing clients read them.
- A provider rejecting your key is a 401 (
provider_key_invalid) — check the stored key on the Keys page.
Verify a Receipt
Every receipt has a public verify link, for example https://chainreceipt.link/verify/rcpt_.... The page checks the hash, the signature, the Merkle proof and the Bitcoin confirmation, and offers the receipt JSON and the .ots proof file. GET https://chainreceipt.link/api/v1/receipts and GET https://chainreceipt.link/api/v1/receipts/:id return the same envelope to your own code, and POST https://chainreceipt.link/api/v1/verify verifies a receipt without a login. The envelope carries an anchors array — the Bitcoin entry for every receipt, plus a Hedera entry for Instant Proof receipts, with the topic, sequence, consensus timestamp and links to check it on HashScan and the public mirror node.
API Reference
Everything below takes your Chain Receipt API key as a Bearer token. The proxy itself is POST https://chainreceipt.link/api/v1/chat/completions, OpenAI-compatible.
| Endpoint | What it does |
|---|---|
GET /v1/models | List the models your saved provider keys can reach. |
GET /v1/receipts | List your receipts, newest first. |
GET /v1/receipts/:id | One receipt's full envelope: receipt, hash, signature, anchor info and verify URL. |
GET /v1/receipts/:id/ots | Download the batch's .ots proof file. |
POST /v1/verify | Verify a receipt without a login. |
Webhooks
Chain Receipt calls your endpoint when a receipt is signed, anchored or confirmed, instead of you polling for it. The events are receipt.signed, receipt.anchored.hedera and receipt.confirmed.bitcoin — with signed payloads.
Instant Proof (Hedera)
Every receipt is permanently anchored to Bitcoin. Instant Proof is an optional add-on that also anchors the receipt's Merkle root to Hedera within a minute — proof in seconds for audits and disputes, still confirmed on Bitcoin a few hours later. Turn it on in Settings: Developer +$15 a month, Team +$49 a month, included with Business and Enterprise, not available on Free. It applies to receipts created while it is on. If the Hedera submission fails, it retries — the receipt itself is never blocked or failed, and the Bitcoin anchor continues regardless.