# deepseek-v4.1-flash-heretic — agent guide

OpenAI-compatible chat completions on an uncensored (abliterated) DeepSeek V4.1 Flash.
No account, no signup; crypto payments need no identity check. Pay per request with x402 (USDC on Base),
or prepay for a bearer key with crypto (USDT, USDC, BTC, ETH, SOL, BNB, LTC, TRX, DOGE), card or PayPal.

- Base URL: `https://api.flashctx.xyz/v1`
- Model id: `deepseek-v4.1-flash-heretic`
- Machine-readable: `https://api.flashctx.xyz/openapi.json`, `https://api.flashctx.xyz/pricing`, `https://api.flashctx.xyz/.well-known/x402`
- Health: `GET https://api.flashctx.xyz/health` → `{"ok": true, ...}`

## Price

| | per 1M tokens |
|---|---|
| Input | $0.4125 |
| Output | $1.65 |

Flat across the whole context, no long-context surcharge. Currently: launch price — 50% off: half the usual rate while the service fills up; reverts to $0.825 / $3.30 per M.
Minimum charge per x402 request: $0.001.

## Performance (measured on this node, 2026-11-12)

| Workload | Result |
|---|---|
| Prefill, single stream | 5.7k tok/s at 6K prompt, 7.2k at 23K, 7.6k at 69K |
| Time to first token | 0.2 s short prompt, 1.0 s at 6K, 3.2 s at 23K, 9 s at 69K |
| Decode, one stream | ~65 tok/s (400-token answers) |
| Decode, aggregate | ~150 tok/s at 4 concurrent, ~200 at 8, ~320 at 16 (the most served at once; ~21 tok/s each) |

Plain streaming completions, no speculative decoding. Long prompts raise prefill; busy seats split
the aggregate.

## Payment rails

| Rail | Minimum | Notes |
|---|---|---|
| x402 (USDC on Base) | $0.001/request | per-request, no account |
| Prepaid crypto (see the rail table below) | $1–$10 by network | invoice + claim token, live market price for non-stablecoins |
| Card (Stripe-hosted, via PayGate) — `rail: "card"` | $6 | name, DOB and address are collected by the provider |
| Card, US (ePayVista / Stripe) — `rail: "epv"` | $5 | Stripe may ask first-time US buyers for DOB and SSN |
| PayPal, US (via PayGate) — `rail: "card", "provider": "paypal"` | $5 | guest checkout takes a card; PayPal may ask to verify identity |
| Telegram Stars (`@flashcontextbot`) | $1 | **+35% price offset** — Telegram and the app stores keep ~a third, so $5 of credit costs the star equivalent of $6.75 |

## Quick start (prepaid or trial key)

```python
from openai import OpenAI
c = OpenAI(base_url="https://api.flashctx.xyz/v1", api_key="sk-...", timeout=600)
for chunk in c.chat.completions.create(model="deepseek-v4.1-flash-heretic", stream=True,
        messages=[{"role": "user", "content": "hello"}], max_tokens=2048):
    print(chunk.choices[0].delta.content or "", end="")
```

Free trial: `POST https://api.flashctx.xyz/trial` (no body) → `{"key": "sk-...", "budget_usd": 0.1}`.
One per client per day, limited daily supply. A trial key that makes no request within 24 hours is revoked.

## Paying

### 1. x402, per request (no account)

1. `POST /v1/chat/completions` with your body and no auth → `402`.
   - v1: JSON body `{"x402Version": 1, "accepts": [...]}`.
   - v2: same status, plus header `PAYMENT-REQUIRED` (base64 JSON, `x402Version: 2`).
2. Sign an `exact` USDC payment (EIP-3009) for the quoted amount:
   network Base mainnet (`base` / `eip155:8453`), asset `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`,
   payTo `0x5Ab610B2C88438548b03511b943BeBF4C324348e`, `maxTimeoutSeconds` 120.
3. Resend the **identical body** with `X-PAYMENT: <base64>` (v1) or `PAYMENT-SIGNATURE: <base64>` (v2).
   The receipt comes back in `X-PAYMENT-RESPONSE` / `PAYMENT-RESPONSE`.

The quote is for *that exact body*: (estimated prompt tokens × input price) + (`max_tokens` × output price).
Change the body (messages, `max_tokens`) and you must fetch a new quote — a v2 payment whose
`accepted` requirements differ from the current quote is rejected before anything is charged.
You pay for `max_tokens` whether or not the model uses them all, so set it to what you need.
Each payment is good for exactly one request (replays → `409`).

Any standard x402 client (e.g. `x402-fetch`, `x402-axios`, `x402` for Python) handles steps 1–3.

### 2. Prepaid bearer key (crypto, $1–$1000)

1. `POST /invoice` `{"rail": "<rail id from the table>", "amount_usd": 5}` →
   `{"invoice_id", "claim_token", "pay_exactly", "unit", "network", "address", "token_contract", "pay_uri", "qr",
   "quote_usd_per_unit", "expires_in_s"}`. Stablecoins count 1:1; other coins are quoted at the live
   market price when the invoice is created.
2. Send `pay_exactly` of `unit` on `network` to `address` within 24 h (`pay_uri` is a wallet link /
   QR payload with the amount filled in). The trailing digits tag the payment so it matches instantly;
   if an exchange takes its fee out or rounds, what actually arrives is credited instead, as long as
   no other open order could explain it. Split payments are not combined.
3. `POST /claim` `{"claim_token": "ct_..."}` → `{"key": "sk-...", "budget_usd": ...}`.
   Before confirmation it returns `404 payment not confirmed yet` — retry every minute.
   Most networks confirm in 1–5 minutes; Ethereum ~3, Litecoin ~8, Dogecoin ~8, Bitcoin ~20.
   Keep the claim token secret: whoever holds it can claim the key.
4. Use the key as `Authorization: Bearer sk-...`. A prepaid key is billed on actual tokens
   used, against its budget.

Crypto rails (all EVM networks share one address):

| rail | coin | network | min | address |
|---|---|---|---|---|
| `usdt_tron` | USDT | Tron (TRC-20) | $2 | `TKxm5L5MgPaPYX2gGNJ98b4rGixYRWWFgw` |
| `usdt_bsc` | USDT | BNB Chain (BEP-20) | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdt_sol` | USDT | Solana | $1 | `A1Sx2meGf3Q7Kjq6qfqyNVxnyqWNcduUSMMgPpjiHwUN` |
| `usdt_arb` | USDT | Arbitrum | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdt_polygon` | USDT | Polygon | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdt_eth` | USDT | Ethereum (ERC-20) | $10 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdc_base` | USDC | Base | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdc_sol` | USDC | Solana | $1 | `A1Sx2meGf3Q7Kjq6qfqyNVxnyqWNcduUSMMgPpjiHwUN` |
| `usdc_arb` | USDC | Arbitrum | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdc_polygon` | USDC | Polygon | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdc_bsc` | USDC | BNB Chain (BEP-20) | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `usdc_eth` | USDC | Ethereum (ERC-20) | $10 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `btc` | BTC | Bitcoin | $5 | `bc1qvrjtc9xuwnkq32aac493x627m9sgs65akvgsku` |
| `eth_base` | ETH | Base | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `eth_arb` | ETH | Arbitrum | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `eth_eth` | ETH | Ethereum | $10 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `sol` | SOL | Solana | $1 | `A1Sx2meGf3Q7Kjq6qfqyNVxnyqWNcduUSMMgPpjiHwUN` |
| `bnb` | BNB | BNB Chain | $1 | `0x5Ab610B2C88438548b03511b943BeBF4C324348e` |
| `ltc` | LTC | Litecoin | $1 | `ltc1qq6h4kajfzwqt6hczlj092wfmffdthp2fle69s2` |
| `trx` | TRX | Tron | $1 | `TKxm5L5MgPaPYX2gGNJ98b4rGixYRWWFgw` |
| `doge` | DOGE | Dogecoin | $2 | `D5DcJsWppXH7ShuZJxX3uebXuCpUKsFyVH` |
| `zec_shielded` | ZEC | Zcash (shielded) | $1 | `u1gzfq208q7lsgla5aaay9jhzswtfwq30upy0x58p37t2txrkg59s6c7kf8m3zk5m8pvfujrv6plkuvt4apur6ycgmzctac5s8v8whvxvylz5sclf566rm9736kmppzunl9uepgzgevuyseeqm64y3wfq2vzqhyuyjpxxj2ycdp5ew35ja` |
| `zec` | ZEC | Zcash (transparent) | $1 | `t1Hsou1ejiVawyWkVD2jLhqPCGh1xHEWHan` |

`rail: "card"` (optionally `"provider": "paypal"`) and `rail: "epv"` return a hosted `checkout_url`
instead; claim the same way once paid. Monero: email the operator.

## Limits

| | |
|---|---|
| `max_tokens` | 1–8192, default 512 (`max_completion_tokens` is ignored) |
| Prompt | about 256K tokens (1,048,576 characters) → `413` above that |
| Completions per request | `n` is forced to 1 |
| Images | inline `data:` URIs only; remote image URLs → `400` |
| Concurrency | a few shared seats; a request waits up to 90 s for one, then `429` |

## Speed, streaming and timeouts

- Output runs at roughly 65 tokens/s for a single request (~21 when all 16 seats are busy); a full 8K answer takes about two minutes.
- `"stream": true` (server-sent events, OpenAI format) is supported and recommended for long outputs.
- Non-streaming requests work at any length. If the answer is not ready within ~20 s, the
  server sends `200` headers early and keeps the connection alive by sending **spaces before
  the JSON body**. That is valid JSON and every standard client parses it, but:
  - set your HTTP read timeout to **at least 600 s**;
  - on such a slow request an upstream failure arrives as status `200` with an
    `{"error": {...}}` body — check for `error` before reading `choices`.
- This is a reasoning model: `max_tokens` covers reasoning plus the answer. Very small
  `max_tokens` can end (`finish_reason: "length"`) before any answer text; give it room.

## Errors

| Status | Meaning | Charged? |
|---|---|---|
| 400 | bad JSON, bad `max_tokens`, remote image URL, unknown model | no |
| 402 | payment required, or payment rejected (reason in body) | no |
| 409 | x402 payment already used | no (already spent on its first request) |
| 413 | prompt too large | no |
| 422 | bad `/invoice` or `/claim` input | no |
| 429 | no free seat / rate limited / trial already issued — retry later (honour `Retry-After` when sent) | no |
| 503 | model temporarily unavailable — "you were not charged" | no |
| 502 | upstream failed **after** an x402 payment settled; body includes `transaction` | yes — the failure is logged and the operator is alerted automatically; keep the transaction hash |

## Privacy

Prompts and completions are retained for 14 days and are never used for
training. No account or identity is required for any payment method.

## Contact

**`agent@flashctx.xyz`** — a human reads it. Also in `https://api.flashctx.xyz/openapi.json` →
`info.contact`. For a payment problem, include the transaction hash or invoice id; for anything
else, describe the request and the time (UTC). The same address is on the landing page.
