x402
x402
As 30 rotas pagas por chamada, em USDC na Base, sem conta: o que cada uma gera, o corpo que pede e o preço.
A porta vende estilo de imagem, motor de imagem, vídeo, texto, voz, música e dados por chamada, em USDC na Base: sem conta e sem chave. Os campos e as descrições das rotas ficam em inglês, como no OpenAPI que o agente lê.
Como uma chamada anda, do 402 ao recibo: x402. A descoberta pra máquina é o /openapi.json, com a faixa de preço de agora de cada rota dinâmica, e o /.well-known/x402.
As rotas
| Rota | Caminho | Preço |
|---|---|---|
| Krea 2 Big Cities | /api/x402/v1/styles/krea-2-big-cities | US$ 0,05, fixo |
| Krea 2 Sint Pixel | /api/x402/v1/styles/krea-2-sint-pixel | US$ 0,05, fixo |
| Krea 2 Sint Isometric | /api/x402/v1/styles/krea-2-sint-isometric | US$ 0,05, fixo |
| Krea 2 Sint Albedo | /api/x402/v1/styles/krea-2-sint-albedo | US$ 0,05, fixo |
| Krea 2 Stillroom | /api/x402/v1/styles/krea-2-stillroom | US$ 0,05, fixo |
| Krea 2 Night Arrivals | /api/x402/v1/styles/krea-2-night-arrivals | US$ 0,05, fixo |
| GPT Image 2.5 Sunburst | /api/x402/v1/images/gpt-image-2-5-sunburst | dinâmico, exato no 402 |
| GPT Image 2.5 Flare | /api/x402/v1/images/gpt-image-2-5-flare | dinâmico, exato no 402 |
| Nano Banana 2.1 Minimal | /api/x402/v1/images/nano-banana-2-1-minimal | dinâmico, exato no 402 |
| Gemini 3 Pro | /api/x402/v1/images/nano-banana-pro | dinâmico, exato no 402 |
| Generate a photoreal image with FLUX.2 Pro | /api/x402/v1/images/flux-2-pro | dinâmico, exato no 402 |
| Krea 3 | /api/x402/v1/images/krea-3 | dinâmico, exato no 402 |
| recraft-v4 | /api/x402/v1/images/recraft-v4 | dinâmico, exato no 402 |
| Generate a fast, low-cost photoreal image from a text prompt | /api/x402/v1/images/z-image-turbo | dinâmico, exato no 402 |
| Seedance 2.0 Mini, 5 s | /api/x402/v1/videos/seedance-mini | US$ 0,25, fixo |
| Grok Imagine 1.5 Lite, 6 s | /api/x402/v1/videos/grok-lite | US$ 0,15, fixo |
| Seedance 2.0 Mini Text-to-Video | /api/x402/v1/videos/seedance-2-0-mini-text-to-video | dinâmico, exato no 402 |
| Seedance 2.0 Mini Image-to-Video | /api/x402/v1/videos/seedance-2-0-mini-image-to-video | dinâmico, exato no 402 |
| Seedance 2.0 Fast Text-to-Video | /api/x402/v1/videos/seedance-2-0-fast-text-to-video | dinâmico, exato no 402 |
| Seedance 2.0 Fast Image-to-Video | /api/x402/v1/videos/seedance-2-0-fast-image-to-video | dinâmico, exato no 402 |
| Seedance 2.0 Text-to-Video | /api/x402/v1/videos/seedance-2-0-text-to-video | dinâmico, exato no 402 |
| Seedance 2.0 Image-to-Video | /api/x402/v1/videos/seedance-2-0-image-to-video | dinâmico, exato no 402 |
| Seedance 2.5 Text-to-Video | /api/x402/v1/videos/seedance-2-5-text-to-video | dinâmico, exato no 402 |
| Seedance 2.5 Image-to-Video | /api/x402/v1/videos/seedance-2-5-image-to-video | dinâmico, exato no 402 |
| completions | /api/x402/v1/chat/completions | dinâmico, exato no 402 |
| speech | /api/x402/v1/audio/speech | dinâmico, exato no 402 |
| sound-effects | /api/x402/v1/audio/sound-effects | US$ 0,03, fixo |
| music | /api/x402/v1/audio/music | US$ 0,09, fixo |
| model-prices | /api/x402/v1/data/model-prices | US$ 0,005, fixo |
| ai-tools | /api/x402/v1/data/ai-tools | US$ 0,005, fixo |
O guia que o OpenAPI carrega
O texto que o /openapi.json leva em info.x-guidance, em inglês, pro agente que chega pelo x402scan:
text
Sapiens Sintéticos sells AI generation per call over x402: no account, no API key. Every URL below answers 402 with its price to a POST without payment, even with an empty body. Images: each URL under /api/x402/v1/styles/ is one image style of the house (a Krea 2 LoRA of ours), and each URL under /api/x402/v1/images/ is one image model (GPT Image 2.5 Flare and Sunburst at high quality, Nano Banana 2.1 Minimal, Nano Banana Pro, FLUX.2 Pro, Krea 3, Recraft V4, Z-Image Turbo). The price of a model URL comes in its 402 and moves with the upstream price, inside the range the OpenAPI declares. POST a JSON body with `prompt`, the scene to draw; the style or model comes from the URL, so do not send `model`. Optional fields: `n` (images, default 1, price is per image), `size` (1024x1024, 1024x1536 or 1536x1024), `response_format` (`b64_json` by default, or `url`). Without payment the URL answers 402 with the price: x402 v2 in the PAYMENT-REQUIRED header, x402 v1 in the body, scheme `exact`, USDC on Base. Pay with PAYMENT-SIGNATURE (v2) or X-PAYMENT (v1). The image is generated first and the payment settles after it, so a failed generation never charges. Sending the same payment header again returns the same image without paying twice. The receipt comes in PAYMENT-RESPONSE (v2) and X-PAYMENT-RESPONSE (v1). Most images answer 200 within 20 seconds. A slower one answers 202 with a job (`object: image.job`) and its `status_url`: GET it every 5 seconds, free and without a payment header, until it answers 200 with the image URLs and the receipt. Nothing is charged until the image is ready. Video: each URL under /api/x402/v1/videos/ is one video model (Seedance 2.0 Mini, 2.0 Fast, 2.0 and 2.5, text-to-video and image-to-video), plus two fixed-price clips: /videos/seedance-mini (5 s, 480p) and /videos/grok-lite (6 s, 480p). POST a JSON body with `prompt`; the model comes from the URL. Image-to-video URLs also need `image_url` (https). Optional: `aspect_ratio`, and on the per-model URLs `seconds`, `resolution` and `audio`. Without payment the URL answers 402 with the price of that exact body (an empty body gets the starting price). Sign for the 402's amount; up to 25% above it is also accepted, since the upstream price can move a little between the 402 and the paid call. The paid call returns 202 with the job: it does NOT wait for the video. GET the `status_url` every 15 to 30 seconds. The payment settles only when the video is ready, and the mp4 `url` comes in that same answer. A video that fails is never settled: nothing leaves your wallet. The 402 asks for a 30-minute authorization (maxTimeoutSeconds 1800) so a slow take still settles inside it. Sending the same payment header again returns the same job, never a second video. Text, voice, sound and data: /api/x402/v1/chat/completions (OpenAI chat format, no stream), /api/x402/v1/audio/speech (OpenAI speech format, returns the audio file), /api/x402/v1/audio/sound-effects and /api/x402/v1/audio/music (return JSON with the file URL), /api/x402/v1/data/model-prices and /api/x402/v1/data/ai-tools (JSON lists). Chat and speech are priced by the body (the worst case of that exact body); the other four have a fixed price. The 402 always carries the exact amount for the body you sent. Chat, speech and music need the payment signed with at least 4 minutes of validity (validBefore) when it arrives, sound effects 2.5 minutes; the 402's maxTimeoutSeconds (300) covers it. Music can take one to two minutes: if the track is not ready before the request ends, the answer is 409 generation_in_progress: send the same body with the same payment header again and you get the track, paid once. Everything is generated before the payment settles: a failed generation never charges, and the same payment header always returns what it bought (text and data kept 7 days).