Developer docs
Build on useGlimper.
An OpenAI-compatible API for private, uncensored inference. If your code talks to OpenAI, it talks to useGlimper.
Base URL
https://useglimper.fun/v1
Auth
Bearer sk-glimper-…
Format
OpenAI Chat Completions
Quickstart
1. Buy credits and copy your key. 2. Set GLIMPER_KEY. 3. Point your SDK at the base URL.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://useglimper.fun/v1",
api_key=os.environ["GLIMPER_KEY"],
)
res = client.chat.completions.create(
model="glimper/dolphin-mistral-24b",
messages=[{"role": "user", "content": "Ask anything."}],
)
print(res.choices[0].message.content)Authentication
Send your key in the Authorization header. Keys are shown once. We only store a hash. Rotate them any time from Account.
Authorization: Bearer sk-glimper-XXXXXXXXXXXXXXXXChat completions
POST /v1/chat/completions takes the same parameters as OpenAI: model, messages, temperature, max_tokens, tools, response_format.
{
"id": "chatcmpl-9x2…",
"model": "glimper/hermes-4-405b",
"upstream_model": "nousresearch/hermes-4-405b",
"choices": [{ "message": { "role": "assistant", "content": "…" } }],
"usage": { "prompt_tokens": 18, "completion_tokens": 212, "total_tokens": 230, "cost_usd": 0.000654 }
}Every response reports the exact upstream_model and the cost_usd.
Streaming
Set "stream": true to receive server-sent events. Gateway overhead is under 40 ms p50.
curl https://useglimper.fun/v1/chat/completions -N \
-H "Authorization: Bearer $GLIMPER_KEY" -H "Content-Type: application/json" \
-d '{"model":"glimper/dolphin-mistral-24b","stream":true,
"messages":[{"role":"user","content":"Tell me a dark story."}]}'Images
POST /v1/images/generations with an image model such as glimper/lustify-sdxl. Sizes: square, portrait, landscape; up to 4 images per request, billed per image returned.
curl https://useglimper.fun/v1/images/generations \
-H "Authorization: Bearer $GLIMPER_KEY" -H "Content-Type: application/json" \
-d '{"model":"glimper/chroma","prompt":"noir city at 3am, rain, neon","size":"portrait","n":1}'
# → { "data": [{ "b64_json": "…" }], "cost_usd": 0.012 }Prompts involving minors are refused for every model.
List models
GET /v1/models returns every model with its price per 1M tokens. Filter with ?uncensored=true.
MCP & agents
Use useGlimper as the model provider in any agent that supports OpenAI-compatible endpoints: Claude Code proxies, Cursor, Cline, OpenWebUI, SillyTavern, LiteLLM.
# LiteLLM / OpenWebUI / Cline
OPENAI_API_BASE=https://useglimper.fun/v1
OPENAI_API_KEY=$GLIMPER_KEY
MODEL=glimper/hermes-4-405bPay per request (x402)
No account and no API key: call /v1/chat/completions without an Authorization header and pay each request in USDG on Robinhood Chain with x402. The server answers 402 with a PAYMENT-REQUIRED header quoting the most the request can cost; your client signs a USDG transferWithAuthorization for it and retries with PAYMENT-SIGNATURE. useGlimper pays the gas.
You are billed the real token cost. Whatever is left of the payment stays as credit for your wallet and pays for its next requests, so most calls after the first settle nothing on chain.
# network eip155:4663 (Robinhood Chain)
# asset USDG 0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168
# scheme exact (EIP-3009), EIP-712 domain "Global Dollar", version "1"
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const USDG = "0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168";
const pay = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:4663", client: new ExactEvmScheme(privateKeyToAccount(KEY)) }],
spendControls: { allowedAssets: [{ network: "eip155:4663", asset: USDG, maxAmountPerPayment: "1000000" }] },
});
const res = await pay("https://useglimper.fun/v1/chat/completions", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ model: "glimper/hermes-4-405b", max_tokens: 800, messages: [{ role: "user", content: "hi" }] }),
});max_tokens sets the quote (default 2,048). The settlement transaction comes back in the PAYMENT-RESPONSE header.
Proof of Bill
Every completion returns a receipt signed by useGlimper's server wallet: model, token counts, price, time and the keccak256 of the generated text. The text itself is never stored.
Non-streaming responses carry it in a receipt field and the x-glimper-receipt header. Streams end with an SSE comment, : glimper-receipt <base64>, which OpenAI clients ignore. Each UTC day's receipts are folded into one Merkle root and written to Robinhood Chain. Check any receipt at /verify, or fetch its proof from GET /api/receipts/:id?h=<outputHash>.
Rate limits
max_tokens is capped to what your balance can pay for. Requests are rejected with 402 when the balance runs out.
Errors
| 400 | invalid_requestMalformed body or unknown parameter. | Malformed body or unknown parameter. |
| 401 | invalid_keyMissing, revoked or mistyped API key. | Missing, revoked or mistyped API key. |
| 402 | insufficient_creditBalance too low. Top up and retry. | Balance too low. Top up and retry. |
| 404 | model_not_foundModel ID doesn’t exist. Check /v1/models. | Model ID doesn’t exist. Check /v1/models. |
| 429 | rate_limitedToo many requests. Respect Retry-After. | Too many requests. Respect Retry-After. |
| 502 | upstream_errorProvider failed. Safe to retry with backoff; you are not billed. | Provider failed. Safe to retry with backoff; you are not billed. |
