x402 Payment Protocol

Pay-per-call AI APIs with USDC

No account. No API key. No subscription. Sign one payment and call any AceData Cloud API — settled on-chain in USDC, per request.

BaseSolanaSKALEschemes: exact & upto (metered)

How it works

1

Call without a key

Hit any x402-enabled endpoint. The gateway answers 402 with the accepted networks, asset and price.

2

Sign an X-Payment header

The SDK plugin signs a USDC payment authorization (EIP-712 / SPL) and retries the request.

3

Get your response

The API runs and the payment settles on-chain in USDC. No invoices, no balance to top up.

One line in your SDK

The AceData Cloud SDK does the API work. The x402 plugin adds one thing: it signs an X-Payment header when the server returns 402 Payment Required.

1 Install

npm install @acedatacloud/sdk @acedatacloud/x402-client ethers

2 Pay per request

import { AceDataCloud } from '@acedatacloud/sdk';
import { createX402PaymentHandler } from '@acedatacloud/x402-client';

// No apiToken — per-request on-chain payment.
const client = new AceDataCloud({
  paymentHandler: createX402PaymentHandler({
    network: 'base',
    evmProvider: window.ethereum,
    evmAddress: '0xYourAddress...'
  })
});

const res = await client.openai.chat.completions.create({
  model: 'gpt-4o-mini',
  messages: [{ role: 'user', content: 'Say hi in 3 words' }]
});

Works with every AceData Cloud API

Chat, search, image, music and video — all callable per-request with USDC, no account required.

Chat & LLM
OpenAI Claude Gemini Grok DeepSeek
Web Search
Google SERP
Image
Flux Nano Banana Seedream
Music
Suno Producer
Video
Veo Sora Kling Seedance Luma

Give your agent a wallet, not an API key

Machine-to-machine payments, micropayments, and usage-based pricing — built in.