# NanoAPI Solana Fee Recommender

> NanoAPI Solana Fee Recommender is a paid API for AI agents from nanoapi.org, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-10).

Returns recommended Solana transaction priority fees (in microlamports, lamports, and SOL) for a given set of writable accounts and compute unit budget

## Facts

- Endpoint: POST https://nanoapi.org/sol/fees/recommend?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nanoapi-solana-fee-recommender-ce80d38d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JgX5h-yDDxphJAuxqYDC7

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nanoapi-solana-fee-recommender-ce80d38d -d '<json body>'
```

Example prompt: What's the recommended medium priority fee for a Solana transaction involving accounts 7Np41oeYqPefeafQeh6AjKZ4aKxjCNJRFNfXBtb7nFCP and 9xQeWvG816bUx9EPjHmaT23yvVM2ZWbrrpZb9PusVFin with a compute unit limit of 200000?

## When to prefer this

Use this endpoint when building Solana transaction submission logic and you need a real-time, data-driven priority fee recommendation rather than a static guess. Especially useful when targeting specific writable accounts that may have elevated congestion. Prefer this over hardcoded fee values or generic estimates when transaction landing rate matters.

## Known failure modes

- Invalid Solana public key format returns validation error
- computeUnits out of range (below 1000 or above 1400000) returns 400
- Payment not included or insufficient causes 402 response requiring x402 payment
- Unknown priority enum value causes 400 bad request
- Network congestion data unavailable may cause 503 or degraded estimates

## How this service works

Pay-per-use APIs for AI agents: image processing and Solana data endpoints. $0.001-$0.01 USDC per call on Base or Solana via x402 protocol. No signup or API keys required.

## Output

A JSON object containing the recommended priority fee in microlamports per compute unit, the compute unit limit, priority fee in lamports and SOL, base fee in lamports, estimated total fee in both lamports and SOL, and the priority level used for the estimate. If no priority level is specified, all four levels (low, medium, high, veryHigh) are returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "accounts": {
   "type": "array",
   "items": {
    "type": "string",
    "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$",
    "description": "Solana public key (base58)"
   },
   "maxItems": 64,
   "description": "Writable accounts for the transaction (optional; empty = global estimate)"
  },
  "priority": {
   "enum": [
    "low",
    "medium",
    "high",
    "veryHigh"
   ],
   "type": "string",
   "description": "Priority level; omit to receive all levels in `levels` object"
  },
  "computeUnits": {
   "type": "integer",
   "maximum": 1400000,
   "minimum": 1000,
   "description": "Compute unit limit for the intended tx (default 200000). Used to compute lamport totals."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": "{\"microLamportsPerCU\":50000,\"computeUnitLimit\":200000,\"priorityFeeLamports\":10000,\"priorityFeeSOL\":0.00001,\"baseFeeLamports\":5000,\"estimatedTotalFeeLamports\":15000,\"estimatedTotalFeeSOL\":0.000015,\"priorityLevel\":\"medium\"}"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nanoapi-solana-fee-recommender-ce80d38d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nanoapi.org](https://www.zero.xyz/host/nanoapi.org/llms.txt)
