API Reference

Payments, x402

Pay per call over HTTP 402 in stablecoin or $GROVE, no subscriptions, settlement in seconds.

Pay per call

The gateway mints an x402 token for a request, verifies it (HMAC), and settles against the actual compute performed. Tokens are replay-protected and expiring.

bash
# 1) quote a call
curl -X POST https://api.grovecompute.xyz/x402/quote \
  -d '{"model":"grove-glm","est_tokens":500}'

# 2) attach the returned token to your request
curl https://api.grovecompute.xyz/v1/chat/completions \
  -H "X-Payment: $X402_TOKEN" -H "Authorization: Bearer $GROVE_KEY" ...

Credits & metering

  • Prepay credits or pay inline, settled against real per-job compute.
  • Paying in $GROVE earns a fee discount versus stablecoin.
  • Transparent per-job accounting; every job carries its certificate.

Agent settlement

An agent mid-task can sub-contract another agent, pay on-chain, and receive the deliverable before its own reply ships, agent-native settlement with no human in the loop. Post work a single agent can't finish to a bounty board and the pool pays whoever delivers.