Spraay Payments API

The payments API from Spraay — 9 operation(s) for payments.

GitHub OpenAPI

Operations 9

POST /api/v1/batch/execute Batch USDC payments on Base or peaq (amounts[] in RAW base units) — $0.02 #
POST /api/v1/batch/estimate Estimate batch gas and fee (amounts[] in RAW base units) — $0.001 #
POST /api/v1/swap-and-pay/execute Swap ETH to USDC and pay many recipients in one Base transaction (amounts[] in… #
POST /api/v1/swap-and-pay/estimate Estimate an ETH-to-USDC swap-and-pay (amounts[] in RAW USDC units) — $0.001 #
POST /api/v1/stellar/batch Batch XLM payments on Stellar — $0.02 #
POST /api/v1/stellar/estimate Estimate Stellar batch cost — $0.001 #
POST /api/v1/xrp/batch Batch XRP payments on XRP Ledger — $0.02 #
POST /api/v1/xrp/estimate Estimate XRP batch cost — $0.001 #
GET /api/v1/xrp/info XRP Ledger fee and reserve info — $0.001 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spraay-app:spraay-app-payments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spraay-app-payments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spraay App Payments API
  version: 3.8.3
  contact:
    name: Spraay
    url: https://spraay.app
    email: hello@spraay.app
  license:
    name: MIT
  x-guidance: Spraay is a multi-chain payment and AI inference gateway with 160 paid endpoints. Use POST /api/v1/chat/completions for LLM chat (200+ models, OpenAI-compatible). POST /api/v1/batch/execute for batch USDC payments. GET /api/v1/oracle/prices for real-time price feeds. POST /api/v1/robots/task to dispatch robot tasks via RTP. POST /api/v1/search/qna for structured Q&A. Bittensor decentralized AI at /bittensor/v1/chat/completions. Supply chain at /api/v1/sctp/*. All endpoints accept micropayments via x402 and MPP (USDC on Base). No API keys needed — just pay per call.
  description: 'Operations tagged payments across 2 of this provider''s published API definitions: gateway.spraay.app.json, spraay-app-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://gateway.spraay.app
  description: Production (Base mainnet)
security:
- x402: []
tags:
- name: Payments
paths:
  /api/v1/batch/execute:
    post:
      operationId: batch-execute
      summary: Batch USDC payments on Base or peaq (amounts[] in RAW base units) — $0.02
      tags:
      - Payments
      description: Paid endpoint — $0.02 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.020000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  contract:
                    type: string
                    description: Spraay contract the transaction targets.
                  token:
                    type: object
                    properties:
                      symbol:
                        type: string
                      address:
                        type: string
                      decimals:
                        type: number
                      isETH:
                        type: boolean
                  batch:
                    type: object
                    description: Human-readable summary. Every amount here is a HUMAN-DECIMAL string, not base units.
                    properties:
                      recipientCount:
                        type: number
                      totalAmount:
                        type: string
                        description: Human decimal, e.g. "1.5".
                      fee:
                        type: string
                        description: Human decimal. 0.3% protocol fee.
                      feePercent:
                        type: string
                      totalWithFee:
                        type: string
                        description: Human decimal. totalAmount + fee.
                  transaction:
                    type: object
                    description: Unsigned transaction to sign and broadcast.
                    properties:
                      to:
                        type: string
                      data:
                        type: string
                        description: Hex calldata.
                      value:
                        type: string
                        description: RAW wei as a decimal string. "0" for ERC-20 batches.
                      chainId:
                        type: number
                      gasLimit:
                        type: string
                        description: HEX quantity, e.g. "0x38270".
                  approvalRequired:
                    type: object
                    description: ERC-20 batches only; absent for native ETH. Approve before broadcasting the transaction.
                    properties:
                      token:
                        type: string
                      spender:
                        type: string
                      amount:
                        type: string
                        description: RAW base units. Pass this value verbatim as the approve() allowance.
                      amountFormatted:
                        type: string
                        description: The same allowance as a human decimal, for display only.
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: 'Symbol (Base: USDC, USDT, EURC, DAI, WETH, or ETH for native; peaq: USDC), an ERC-20 address on the chosen chain, or ETH for native. Defaults to USDC.'
                recipients:
                  type: array
                  description: Recipient addresses, parallel to amounts[]. Max 200.
                amounts:
                  type: array
                  description: 'RAW base units as integer strings, parallel to recipients[]. NOT human decimals: USDC has 6 decimals, so "1500000" = $1.50.'
                sender:
                  type: string
                  description: Payer address. Used to estimate gas against real allowance state.
                chain:
                  type: string
                  description: 'Settlement chain: "base" (default) or "peaq". Any other value is rejected — a chain is settleable only once its contract bytecode has been verified byte-identical to Base. Omitting this field behaves exactly as before peaq was added.'
              required:
              - token
              - recipients
              - amounts
              - sender
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/batch/estimate:
    post:
      operationId: batch-estimate
      summary: Estimate batch gas and fee (amounts[] in RAW base units) — $0.001
      tags:
      - Payments
      description: Paid endpoint — $0.001 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.001000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  token:
                    type: object
                    properties:
                      symbol:
                        type: string
                      address:
                        type: string
                      decimals:
                        type: number
                      isETH:
                        type: boolean
                  recipientCount:
                    type: number
                  totalAmount:
                    type: string
                    description: Detailed form only. HUMAN-DECIMAL string.
                  fee:
                    type: string
                    description: Detailed form only. HUMAN-DECIMAL string. 0.3% protocol fee.
                  feePercent:
                    type: string
                  totalWithFee:
                    type: string
                    description: Detailed form only. HUMAN-DECIMAL string.
                  suggestedGasLimit:
                    type: string
                    description: DECIMAL string — note this differs from batch/execute's transaction.gasLimit, which is hex.
                  estimatedGas:
                    type: string
                    description: Count-only form. DECIMAL string, cold-recipient worst case.
                  note:
                    type: string
                    description: Count-only form. Explains that the figure is a conservative ceiling.
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                token:
                  type: string
                  description: Same token input as batch/execute. Defaults to USDC.
                recipients:
                  type: array
                  description: 'Detailed form: recipient addresses, parallel to amounts[]. Omit for the count-only form.'
                amounts:
                  type: array
                  description: 'RAW base units as integer strings, parallel to recipients[] — identical semantics to batch/execute. USDC 6dp: "1500000" = $1.50.'
                sender:
                  type: string
                  description: Optional payer address, used to sharpen the gas estimate.
                recipientCount:
                  type: number
                  description: 'Count-only form: number of recipients, when exact amounts are not known yet. Returns a worst-case gas ceiling and no totals.'
                chain:
                  type: string
                  description: 'Settlement chain: "base" (default) or "peaq". Same allowlist batch/execute enforces, so a quote can never be produced for a chain execute would refuse.'
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/swap-and-pay/execute:
    post:
      operationId: swap-and-pay-execute
      summary: Swap ETH to USDC and pay many recipients in one Base transaction (amounts[] in…
      tags:
      - Payments
      description: Paid endpoint — $0.10 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.100000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  chainId:
                    type: number
                  router:
                    type: string
                    description: SwapAndSprayRouter, the transaction target.
                  sprayContract:
                    type: string
                    description: SprayContract v2 the router pays through (skip-on-fail).
                  inputToken:
                    type: object
                  outputToken:
                    type: object
                  supportedInputTokens:
                    type: array
                  pool:
                    type: object
                    description: Uniswap v4 PoolKey, poolId and spot price snapshot.
                  payout:
                    type: object
                    description: totalAmount/fee/totalWithFee are HUMAN-DECIMAL USDC; requiredOutputRaw is RAW USDC (swap output).
                  quote:
                    type: object
                    description: ethIn/maxEthIn are RAW wei strings; maxEthIn = ethIn × (1 + slippageBps). priceImpactBps includes the pool's 0.30% LP fee.
                  deadline:
                    type: number
                  transaction:
                    type: object
                    description: Unsigned transaction to sign and broadcast from sender.
                    properties:
                      from:
                        type: string
                      to:
                        type: string
                      data:
                        type: string
                        description: Hex calldata for swapAndSpray (selector 0x04846b1d).
                      value:
                        type: string
                        description: RAW wei as a decimal string (= quote.maxEthIn). Unused ETH is refunded.
                      chainId:
                        type: number
                      gasLimit:
                        type: string
                        description: HEX quantity.
                  gasLimitSource:
                    type: string
                    description: '"estimate" (eth_estimateGas × 1.5) or "floor" (estimation failed, e.g. sender lacks ETH).'
                  note:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sender:
                  type: string
                  description: Payer address. Signs the transaction, pays the ETH, and receives any unused ETH and any refund for skipped recipients.
                recipients:
                  type: array
                  description: Recipient addresses, parallel to amounts[]. 1 to 200. Not the zero address, the router or the Spray contract.
                amounts:
                  type: array
                  description: RAW USDC base units as integer strings. USDC has 6 decimals, so "1500000" = $1.50. Each must be > 0.
                inputToken:
                  type: string
                  description: Input token. Only "ETH" (the default) is supported; anything else is rejected with supportedInputTokens.
                slippageBps:
                  type: number
                  description: Max extra ETH over the quote, in bps. Integer 0 to 500. Default 50 (0.5%).
                deadline:
                  type: number
                  description: Unix seconds after which the transaction reverts. Must be in the future. Default now + 300.
              required:
              - sender
              - recipients
              - amounts
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/swap-and-pay/estimate:
    post:
      operationId: swap-and-pay-estimate
      summary: Estimate an ETH-to-USDC swap-and-pay (amounts[] in RAW USDC units) — $0.001
      tags:
      - Payments
      description: Paid endpoint — $0.001 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.001000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  router:
                    type: string
                  sprayContract:
                    type: string
                  pool:
                    type: object
                  payout:
                    type: object
                  quote:
                    type: object
                  suggestedGasLimit:
                    type: string
                    description: DECIMAL string — unlike execute's transaction.gasLimit, which is hex.
                  gasLimitSource:
                    type: string
                  note:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sender:
                  type: string
                  description: Payer address. Used for the gas estimate.
                recipients:
                  type: array
                  description: Recipient addresses, parallel to amounts[]. 1 to 200.
                amounts:
                  type: array
                  description: RAW USDC base units as integer strings — identical semantics to swap-and-pay/execute.
                inputToken:
                  type: string
                  description: Only "ETH" (default).
                slippageBps:
                  type: number
                  description: Integer 0 to 500. Default 50.
              required:
              - sender
              - recipients
              - amounts
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/stellar/batch:
    post:
      operationId: stellar-batch
      summary: Batch XLM payments on Stellar — $0.02
      tags:
      - Payments
      description: Paid endpoint — $0.02 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.020000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  hash:
                    type: string
                  status:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sourceSecret:
                  type: string
                recipients:
                  type: array
                amounts:
                  type: array
              required:
              - sourceSecret
              - recipients
              - amounts
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/stellar/estimate:
    post:
      operationId: stellar-estimate
      summary: Estimate Stellar batch cost — $0.001
      tags:
      - Payments
      description: Paid endpoint — $0.001 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.001000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  estimatedFee:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                recipientCount:
                  type: number
              required:
              - recipientCount
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/xrp/batch:
    post:
      operationId: xrp-batch
      summary: Batch XRP payments on XRP Ledger — $0.02
      tags:
      - Payments
      description: Paid endpoint — $0.02 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.020000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  hash:
                    type: string
                  status:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                senderSecret:
                  type: string
                recipients:
                  type: array
                amounts:
                  type: array
              required:
              - senderSecret
              - recipients
              - amounts
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/xrp/estimate:
    post:
      operationId: xrp-estimate
      summary: Estimate XRP batch cost — $0.001
      tags:
      - Payments
      description: Paid endpoint — $0.001 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.001000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  estimatedFee:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                recipientCount:
                  type: number
              required:
              - recipientCount
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/xrp/info:
    get:
      operationId: xrp-info
      summary: XRP Ledger fee and reserve info — $0.001
      tags:
      - Payments
      description: Paid endpoint — $0.001 per call via x402/MPP. See https://gateway.spraay.app/.well-known/x402.json for full payment details.
      x-payment-info:
        price:
          mode: fixed
          amount: '0.001000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  baseFee:
                    type: string
                  reserveBase:
                    type: string
        '402':
          description: Payment Required
      parameters: []
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
components:
  securitySchemes:
    x402:
      type: http
      scheme: x402
      description: Pay per-call with USDC on Base to 0x86e43BD1d94802bcF431707b67ff4c8F5B7267Ec
externalDocs:
  description: Full docs
  url: https://docs.spraay.app
x-refined-from:
- gateway.spraay.app.json
- spraay-app-openapi.json
x-discovery:
  ownershipProofs: []