> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chat402.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Welcome to Chat402

> The first LLM API gateway built for x402. Pay-per-prompt in USDC on Solana.

## 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.

<CardGroup cols={2}>
  <Card title="User Guide" icon="user" href="/user-guide/getting-started">
    Learn how to use Chat402, fund your wallet, and start chatting with AI models.
  </Card>

  <Card title="Integration Guide" icon="wrench" href="/developer/quickstart">
    Code examples in Python, JavaScript, Go, Rust, and more. Get started in minutes.
  </Card>
</CardGroup>

## Why Chat402?

<AccordionGroup>
  <Accordion title="Pay-Per-Use" icon="money-bill">
    Only pay for what you use. No monthly subscriptions, no commitments. Start with as little as \$1 USDC.
  </Accordion>

  <Accordion title="Instant Payments" icon="bolt">
    Powered by x402 protocol. Pay automatically with USDC on Solana. Sub-second confirmations.
  </Accordion>

  <Accordion title="Self-Custodial" icon="shield">
    Your keys, your crypto. Use custodial API keys for convenience or pay directly from your own wallet.
  </Accordion>

  <Accordion title="Multi-Model Access" icon="layer-group">
    Access OpenAI (GPT-3.5, GPT-4), Anthropic (Claude 4.5), Google (Gemini), xAI (Grok), and DeepSeek through one unified API.
  </Accordion>
</AccordionGroup>

## Quick Start

Get up and running in 3 steps:

<Steps>
  <Step title="Generate API Key">
    Connect your wallet, custodial wallets are auto-created. Generate an API key on the API Keys page.
  </Step>

  <Step title="Fund Your Wallet">
    Send USDC to your deposit address on Solana. Minimum: \$1 USDC.
  </Step>

  <Step title="Make Your First Request">
    Send a POST request to the API or use the web chat interface.
  </Step>
</Steps>

### Example cURL Request

```bash theme={null}
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

```javascript theme={null}
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:

<CardGroup cols={2}>
  <Card title="GPT-5.2" icon="fire">
    OpenAI's best model

    **\$0.020/1K tokens**
  </Card>

  <Card title="GPT-3.5 Turbo" icon="message">
    Fast, general-purpose

    **\$0.002/1K tokens**
  </Card>

  <Card title="Claude 4.5 Sonnet" icon="file-lines">
    Best for analysis

    **\$0.018/1K tokens**
  </Card>

  <Card title="Gemini 2.5 Flash" icon="bolt">
    Fast & affordable

    **\$0.003/1K tokens**
  </Card>

  <Card title="Grok" icon="sparkles">
    xAI's latest

    **\$0.001/1K tokens**
  </Card>

  <Card title="DeepSeek Chat" icon="code">
    Best for code

    **\$0.001/1K tokens**
  </Card>
</CardGroup>

## Payment Networks

Pay with USDC on your preferred network:

<Card title="Solana" icon="circle">
  * Ultra-low fees (\~\$0.0001)
  * Fastest transactions
  * Sub-second confirmations (\~400ms)
</Card>

## Additional Resources

<CardGroup cols={2}>
  <Card title="Telegram Bot" icon="telegram" href="https://t.me/chat402bot">
    Chat with AI directly in Telegram
  </Card>

  <Card title="Community" icon="users" href="https://t.me/chatx402">
    Join our community for support
  </Card>
</CardGroup>
