OmniProvider

Quick start

Make a first paid call in a few commands. You need a wallet that can pay USDC on Base (x402) or USDC.e on Tempo (MPP), and a client that handles HTTP 402. Prefer a card? See Packages.

1. Check the price (free)

An unpaid request returns HTTP 402 with the exact quote for that request. Nothing is charged.

curl -sS -i -X POST https://pay.omnidev.tech/v1/chat/completions \
  -H 'content-type: application/json' \
  -d '{"model":"kimi-k3","messages":[{"role":"user","content":"hello"}],"max_tokens":256}'

2. Chat completion over MPP (Tempo)

Any model in the catalog works at https://pay.omnidev.tech/v1/chat/completions. The example uses kimi-k3.

N=$(openssl rand -base64 24 | tr '+/' '-_' | tr -d '=')
npx mppx --method POST -H 'content-type: application/json' \
  -H "X-Omni-Client-Nonce: $N" \
  -d '{"model":"kimi-k3","messages":[{"role":"user","content":"hello"}],"max_tokens":256}' \
  https://pay.omnidev.tech/v1/chat/completions

The response is an OpenAI-style chat completion plus an x_omnipay block with the rail, the amount charged and the settlement reference.

3. Fixed-price routes over x402 (Base)

N=$(openssl rand -base64 24 | tr '+/' '-_' | tr -d '=')
npx agentcash fetch https://pay.omnidev.tech/x402/chat-nano \
  --method POST --header 'content-type: application/json' \
  --header "X-Omni-Client-Nonce: $N" \
  --body '{"prompt":"hello"}' --payment-protocol x402

4. Fixed-price routes over MPP (Tempo)

N=$(openssl rand -base64 24 | tr '+/' '-_' | tr -d '=')
npx mppx --method POST -H 'content-type: application/json' \
  -H "X-Omni-Client-Nonce: $N" -d '{"prompt":"hello"}' \
  https://pay.omnidev.tech/v1/chat/nano

5. Prepaid package with an API key

curl -sS -X POST https://pay.omnidev.tech/v1/packages/OPEN-10M-30D/checkout
# -> JSON with checkout_url, package_id and claim; open checkout_url to pay by card

After paying, the success page returns your API key. Then:

curl -sS -X POST https://pay.omnidev.tech/v1/chat/completions \
  -H 'content-type: application/json' \
  -H "Authorization: Bearer $OMNI_API_KEY" \
  -d '{"model":"kimi-k3","messages":[{"role":"user","content":"hello"}],"max_tokens":256}'

curl -sS https://pay.omnidev.tech/v1/packages/me -H "Authorization: Bearer $OMNI_API_KEY"   # balance

Request bodies

Every paid request must carry X-Omni-Client-Nonce. See Payments and nonces. Full contract: API reference · openapi.json · API llms.txt.