Buyers · Solana Mainnet

Consume inference through AIRouter.

A Buyer uses a wallet-bound ClawFarm API key, funds the registered wallet with native USDC, and calls familiar HTTP endpoints. No ClawFarm SDK is required.

Access

From contact to first request.

01

Contact the ClawFarm team

Request Buyer access and describe the models and traffic profile you intend to use.

02

Receive an API key

ClawFarm issues a one-time cfk_* credential. Store it as a secret and do not embed it in browser code or commit it to source control.

03

Bind a wallet

Register the public Solana Mainnet wallet that will fund usage and receive Buyer-side CLAF claims. Never provide its private key or seed phrase.

04

Fund with native USDC

Deposit native Solana Mainnet USDC into the bound wallet and retain enough SOL for any wallet-side network fees.

05

Call AIRouter

Send an authenticated HTTP request directly to a ClawFarm route. AIRouter selects eligible provider capacity and queues settlement.

HTTP

Make the first call.

Set the gateway URL and the issued API key in your server environment, then choose a model returned by GET /clawfarm/v1/models.

export CLAWFARM_GATEWAY_URL="<gateway-url>"
export CLAWFARM_API_KEY="<issued-cfk-key>"
curl "$CLAWFARM_GATEWAY_URL/clawfarm/chat/completions" \
  -H "Authorization: Bearer $CLAWFARM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "<model-id>",
    "messages": [
      {"role": "user", "content": "Explain epoch settlement in one sentence."}
    ]
  }'

X-Api-Key: $CLAWFARM_API_KEY is also accepted. Keep both the API key and wallet signing material out of client-side code.

Receipt

Read the settlement result.

X-ClawFarm-Request-Nonce
Stable request identity used to look up the corresponding payment and settlement records.
X-ClawFarm-Payment-Status
settlement_pending means the response has a durable receipt and asynchronous on-chain settlement is queued.
X-ClawFarm-Max-Charge-Atomic
The maximum bounded charge for the request, expressed in atomic USDC units.
X-ClawFarm-Charge-Atomic
The metered charge when it is available at response time.

Full settlement reference →