Spraay Contract API

The contract API from Spraay — 2 operation(s) for contract.

GitHub OpenAPI

Operations 2

POST /api/v1/contract/read Call any view/pure function on any EVM contract — $0.002 #
POST /api/v1/contract/write Encode and broadcast transaction via agent wallet — $0.015 #

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-contract-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-contract-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spraay App Contract 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 contract 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: Contract
paths:
  /api/v1/contract/read:
    post:
      operationId: contract-read
      summary: Call any view/pure function on any EVM contract — $0.002
      tags:
      - Contract
      description: Paid endpoint — $0.002 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.002000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  chain:
                    type: string
                  result:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chain:
                  type: string
                address:
                  type: string
                method:
                  type: string
                args:
                  type: array
              required:
              - address
              - method
    servers:
    - url: https://gateway.spraay.app
      description: Production (Base mainnet)
  /api/v1/contract/write:
    post:
      operationId: contract-write
      summary: Encode and broadcast transaction via agent wallet — $0.015
      tags:
      - Contract
      description: Paid endpoint — $0.015 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.015000'
          currency: USD
        protocols:
        - mpp: {}
        - x402: {}
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  tx_hash:
                    type: string
                  from:
                    type: string
                  explorer:
                    type: string
        '402':
          description: Payment Required
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                chain:
                  type: string
                address:
                  type: string
                method:
                  type: string
                args:
                  type: array
                walletId:
                  type: string
              required:
              - address
              - method
    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: []