# Spraay Batch Gas Estimator

> Spraay Batch Gas Estimator is a paid API for AI agents from gateway.spraay.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Estimates the total gas cost for a batch transaction given a number of recipients on Solana or EVM-compatible chains.

## Facts

- Endpoint: POST https://gateway.spraay.app/api/v1/batch/estimate
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spraay-batch-gas-estimator-b21dcc67
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2phLq-df_rXVlZyIp_Qts

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 spraay-batch-gas-estimator-b21dcc67 -d '<json body>'
```

Example prompt: Before I do a batch token send on Spraay, estimate the gas cost for sending to 250 recipients.

## When to prefer this

Use this endpoint when you need a pre-flight gas estimate before submitting a batch transaction through Spraay — especially useful for budgeting multi-recipient token sends or airdrops without executing on-chain.

## Known failure modes

- Missing or invalid recipientCount returns a 400 validation error
- recipientCount of zero or negative number may return an error or zero estimate
- Service unavailable returns 5xx
- Exceeded rate limit or payment failure returns 402 or 429

## How this service works

Estimate batch gas.

## Output

Returns an estimated gas cost or fee for executing a batch transaction with the specified number of recipients, allowing the caller to anticipate costs before committing to on-chain execution.

## Example request

```json
{
 "recipientCount": 250
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "string"
  },
  "sender": {
   "type": "string"
  },
  "amounts": {
   "type": "array"
  },
  "recipients": {
   "type": "array"
  },
  "recipientCount": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spraay-batch-gas-estimator-b21dcc67/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from gateway.spraay.app](https://www.zero.xyz/host/gateway.spraay.app/llms.txt)
