glimglim.shdocs
Quickstart

REST API in one curl

Every glim tool is a plain HTTPS endpoint under glim.sh/api/v1 — no SDK required. Pick an auth mode and make your first call in under a minute.

With an API key

Sign in at glim.sh/app, top up a balance, and create an API key. Send it as an x-api-key header:

curl — x-api-key
# Prepaid balance: top up at glim.sh/app, then send your key
curl -X POST https://glim.sh/api/v1/web/search \
  -H "x-api-key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"x402 protocol"}'

The same key also works as a bearer token, if your HTTP client speaks Authorization more naturally:

curl — bearer
curl -X POST https://glim.sh/api/v1/web/search \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"x402 protocol"}'

Pay per call with a wallet

No account at all: an unpaid request returns HTTP 402 with the price and accepted networks, your client pays on-chain and retries. The x402-proxy CLI runs that loop around any request:

x402-proxy — pay per call
# GET — auto-pays the 402 challenge from your wallet
npx x402-proxy https://glim.sh/api/v1/twitter/get/cascade_fyi

# POST with a JSON body
npx x402-proxy --method POST --header "Content-Type: application/json" \
  --body '{"query":"x402 protocol"}' https://glim.sh/api/v1/web/search

# Wallet address + balance
npx x402-proxy wallet
Prices are never hardcoded. Clients read the live 402 challenge before paying, so you always pay the current price.

Responses & schemas