Skip to content
Berry Docs
Berry Press

Endpoints

Endpoints

Base URL: https://api.berryfi.net

Open to everyone

EndpointReturns
GET /healthwhether the API is up
GET /api/configchain id, current contract addresses, supportedTokens
GET /api/creators/{address}/balancecredited6dp, spent6dp, remaining6dp (USDC, 6 decimals)
GET /api/creators/{address}/inferencetotal credited, plus each press
GET /api/creators/{address}/delegationsagents that can currently spend
GET /api/inference/quote?quoteValue=weia preview of the estimated credit
GET /api/tokens/{address}/resolvefor any Base token: market data, its largest Uniswap V4 pool, the pool settings it would register with, supportedForDeposit

Entering with any token (via KyberSwap)

EndpointReturns
GET /api/entry/quote?tokenIn&amountIn&tokenOuta quote to swap any token into a deposit token
POST /api/entry/buildthe transaction data for that swap
GET /api/zap/quote, POST /api/zap/buildan ordinary Uniswap V4 LP through Zap as a Service, not a Press vault

Signed requests

EndpointSigned byDoes
POST /api/inference/chatthe creator, or an agent with permissionspends inference through an OpenAI-compatible proxy
POST /api/delegationsthe creatorlets an agent spend
POST /api/delegations/revokethe creatortakes that permission away

Messages to sign

  • Spend: berry-inference:{address_lowercase}:{timestamp_ms}, valid 5 minutes
  • Give permission: berry-delegate:{creator}:{agent}:{expiresAtMs}
  • Remove permission: berry-revoke:{creator}:{agent}:{timestamp_ms}, valid 5 minutes