# POST /chat/premium: $0.03 per call

Pay-per-call LLM chat (Llama 3.3 70B): Strongest model for harder reasoning, coding and careful writing; supports JSON output. No API key or account. POST JSON {"prompt": "..."} or OpenAI-style {"messages": [{"role": "user", "content": "..."}]}, optional "system", "max_tokens" (up to 1536), "temperature", "json": true. Up to about 36,000 characters of English in. Failed calls are not charged.

- **Price:** $0.03 in USDC, the same on Base, Solana, Polygon, Arbitrum. Failed calls are never charged.
- **Free trial:** no, paid only (it uses a paid AI model or data source, or costs more than the trial covers). Other ways to pay: x402 or [prepaid credits](/credits).
- **Answers cached for:** not cached
- **Data sources:** Workers AI (metered)
- **Lane:** LLM gateway ([OpenAPI](/openapi/llm.json))
- **Live health:** [status page](/status)

## Free sample

See an answer for the demo input first, free (no payment, 10 a minute): [https://aayatai.com/sample/chat-premium](/sample/chat-premium). It is a stored real answer when we have one, otherwise an example marked `"kind": "illustrative"`.

```bash
curl "https://aayatai.com/sample/chat-premium"
```

## 1. See the price (free)

Call it without paying: you get `402 Payment Required` and a `PAYMENT-REQUIRED` header with the exact price and where to pay.

```bash
curl -i -X POST https://aayatai.com/chat/premium -H "content-type: application/json" -d '{"prompt":"In one sentence, what is the x402 payment protocol?"}'
```

## 2. Pay and call (TypeScript)

```bash
npm install @x402/fetch @x402/evm viem
```

```ts
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";

// A wallet used only by your agent, holding a little USDC on Base.
const account = privateKeyToAccount(process.env.WALLET_PRIVATE_KEY as `0x${string}`);
const pay = wrapFetchWithPaymentFromConfig(fetch, {
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});

const res = await pay("https://aayatai.com/chat/premium", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"prompt":"In one sentence, what is the x402 payment protocol?"}),
});
console.log(await res.json());
```

## 3. Or as an MCP tool

```ts
// MCP server: https://aayatai.com/mcp (Streamable HTTP). With the x402 MCP client (see /start):
const result = await client.callTool("chat-premium", {"prompt":"In one sentence, what is the x402 payment protocol?"});
```

## Inputs

- `prompt` (string): A single user message (use this or messages).
- `messages` (array): Conversation so far, OpenAI style: [{role, content}].
- `system` (string): System instructions.
- `max_tokens` (integer): Most tokens to generate (default 512).
- `temperature` (number; default `0.3`): Randomness, 0-2.
- `json` (boolean; default `false`): Ask for JSON-only output.

Bad inputs are rejected with HTTP 400 before any payment is asked for.

## Example answer

```json
{
  "text": "x402 is an open protocol that lets clients pay for HTTP requests with stablecoins using the 402 status code.",
  "model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast",
  "usage": {
    "promptTokens": 24,
    "completionTokens": 26
  }
}
```

## Related

- [POST /chat/fast](/services/chat-fast) ($0.003): Pay-per-call LLM chat (Llama 3.2 3B): Fast, cheap model for classification, extraction, short answers and routing.
- [POST /chat](/services/chat) ($0.01): Pay-per-call LLM chat (Mistral Small 3.1 24B): Balanced multilingual model (140+ languages) for writing, reasoning and long inputs.
- [POST /embeddings](/services/embeddings) ($0.002): Text embeddings for semantic search, clustering and RAG: 1024-dimension multilingual vectors (BGE-M3, 100+ languages).
- [POST /summarise](/services/summarise) ($0.02): Summarise text or any public web page with AI.
- [POST /translate](/services/translate) ($0.01): Translate text between 100+ languages with AI.

New here? [Getting started in 60 seconds](/start). All services: [Aayat AI](/).