Alchemy Paymaster API

Sponsor user operations via ERC-4337 paymaster endpoints.

Operations 1

POST /sponsorUserOperation Alchemy Gas Manager Sponsor User Operation #

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/alchemy-paymaster-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

alchemy-paymaster-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alchemy Gas Manager Paymaster API
  description: The Alchemy Gas Manager API enables developers to sponsor gas fees for end users via the ERC-4337 Account Abstraction standard. Using a Gas Manager policy, developers can define rules for which transactions to sponsor, covering ETH gas fees so users never need to hold native tokens to interact with dApps. Supports gasless transactions, ERC-20 gas payments, and policy-based sponsorship controls.
  version: '1.0'
  contact:
    name: Alchemy Support
    url: https://www.alchemy.com/support
  x-generated-from: documentation
servers:
- url: https://manage.g.alchemy.com/api
  description: Alchemy Gas Manager Management API
- url: https://eth-mainnet.g.alchemy.com/v2/{apiKey}
  description: Ethereum Mainnet RPC
  variables:
    apiKey:
      default: your-api-key
      description: Your Alchemy API key.
tags:
- name: Paymaster
  description: Sponsor user operations via ERC-4337 paymaster endpoints.
paths:
  /sponsorUserOperation:
    post:
      operationId: sponsorUserOperation
      summary: Alchemy Gas Manager Sponsor User Operation
      description: Submits a user operation for gas sponsorship via the ERC-4337 paymaster. Returns a signed paymaster response that the bundler uses to cover gas fees on behalf of the user, enabling gasless transactions.
      tags:
      - Paymaster
      security:
      - apiKeyHeader: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SponsorUserOperationRequest'
            examples:
              SponsorUserOperationRequestExample:
                summary: Default sponsorUserOperation request
                x-microcks-default: true
                value:
                  id: 1
                  jsonrpc: '2.0'
                  method: alchemy_requestGasAndPaymasterAndData
                  params:
                  - policyId: pol-abc123
                    entryPoint: '0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789'
                    userOperation:
                      sender: '0xd8da6bf26964af9d7eed9e03e53415d37aa96045'
                      nonce: '0x0'
                      initCode: 0x
                      callData: 0x
      responses:
        '200':
          description: User operation sponsored successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SponsorUserOperationResponse'
              examples:
                SponsorUserOperation200Example:
                  summary: Default sponsorUserOperation 200 response
                  x-microcks-default: true
                  value:
                    id: 1
                    jsonrpc: '2.0'
                    result:
                      paymasterAndData: 0xabc123paymaster
                      preVerificationGas: '0x5208'
                      verificationGasLimit: '0x15f90'
                      callGasLimit: '0x9c40'
        '400':
          description: Bad request - operation rejected by policy.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ErrorResponse:
      type: object
      title: Error Response
      description: Standard error response.
      properties:
        error:
          type: string
          description: Error code.
          example: UNAUTHORIZED
        message:
          type: string
          description: Human-readable error message.
          example: Invalid API key.
        statusCode:
          type: integer
          description: HTTP status code.
          example: 401
    SponsorUserOperationRequest:
      type: object
      title: Sponsor User Operation Request
      description: JSON-RPC request to sponsor a user operation via the Gas Manager paymaster.
      properties:
        id:
          type: integer
          description: Request ID.
          example: 1
        jsonrpc:
          type: string
          description: JSON-RPC version.
          example: '2.0'
        method:
          type: string
          description: Alchemy paymaster method.
          example: alchemy_requestGasAndPaymasterAndData
        params:
          type: array
          description: Sponsorship parameters array.
          items: {}
    SponsorUserOperationResult:
      type: object
      title: Sponsor User Operation Result
      description: Paymaster response data for a sponsored user operation.
      properties:
        paymasterAndData:
          type: string
          description: Encoded paymaster address and data for the user operation.
          example: 0xabc123paymaster
        preVerificationGas:
          type: string
          description: Pre-verification gas estimate in hexadecimal.
          example: '0x5208'
        verificationGasLimit:
          type: string
          description: Verification gas limit in hexadecimal.
          example: '0x15f90'
        callGasLimit:
          type: string
          description: Call gas limit in hexadecimal.
          example: '0x9c40'
    SponsorUserOperationResponse:
      type: object
      title: Sponsor User Operation Response
      description: JSON-RPC response for sponsored user operation requests.
      properties:
        id:
          type: integer
          example: 1
        jsonrpc:
          type: string
          example: '2.0'
        result:
          $ref: '#/components/schemas/SponsorUserOperationResult'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token for Gas Manager Management API authentication.
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Alchemy-Token
      description: Alchemy API key for RPC endpoint authentication.