Skip to main content

What is Chat402?

The first LLM API gateway built for x402. Pay-per-prompt in USDC on Solana. Access GPT-4, Claude, Gemini, Grok, DeepSeek and more. No subscriptions, just pay for what you use.

User Guide

Learn how to use Chat402, fund your wallet, and start chatting with AI models.

Integration Guide

Code examples in Python, JavaScript, Go, Rust, and more. Get started in minutes.

Why Chat402?

Only pay for what you use. No monthly subscriptions, no commitments. Start with as little as $1 USDC.
Powered by x402 protocol. Pay automatically with USDC on Solana. Sub-second confirmations.
Your keys, your crypto. Use custodial API keys for convenience or pay directly from your own wallet.
Access OpenAI (GPT-3.5, GPT-4), Anthropic (Claude 4.5), Google (Gemini), xAI (Grok), and DeepSeek through one unified API.

Quick Start

Get up and running in 3 steps:
1

Generate API Key

Connect your wallet, custodial wallets are auto-created. Generate an API key on the API Keys page.
2

Fund Your Wallet

Send USDC to your deposit address on Solana. Minimum: $1 USDC.
3

Make Your First Request

Send a POST request to the API or use the web chat interface.

Example cURL Request

curl -X POST https://api.chat402.xyz/api/v1/prompt \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo",
    "prompt": "Explain blockchain in simple terms"
  }'

Example JavaScript

const response = await fetch('https://api.chat402.xyz/api/v1/prompt', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    model: 'gpt-4',
    prompt: 'Write a haiku about AI'
  })
});

const data = await response.json();
console.log(data.text);

Supported Models

Access premium AI models through one unified API:

GPT-5.2

OpenAI’s best model$0.020/1K tokens

GPT-3.5 Turbo

Fast, general-purpose$0.002/1K tokens

Claude 4.5 Sonnet

Best for analysis$0.018/1K tokens

Gemini 2.5 Flash

Fast & affordable$0.003/1K tokens

Grok

xAI’s latest$0.001/1K tokens

DeepSeek Chat

Best for code$0.001/1K tokens

Payment Networks

Pay with USDC on your preferred network:

Solana

  • Ultra-low fees (~$0.0001)
  • Fastest transactions
  • Sub-second confirmations (~400ms)

Additional Resources

Telegram Bot

Chat with AI directly in Telegram

Community

Join our community for support