◆ Autopilot Studio

AI API for agents — pay per call with x402

No account, no API key, no subscription. Call an endpoint, receive an HTTP 402 with the price, sign a USDC payment on Base with any x402 client and retry. You get the result; the money goes straight to one wallet. Built for autonomous agents and for developers who want to try pay-per-request AI.

Endpoints

MethodEndpointPrice (USDC)What you get
POST/v1/image$0.02Text-to-image (SDXL-Lightning). JSON: prompt, orientation (square | phone | desktop). Returns a base64 image (JPEG or PNG, see mimeType).
POST/v1/translate$0.003Neural machine translation (M2M100), 15+ languages. JSON: text (≤ 2000 chars), to (pt, en, es, fr, de…), optional from.
POST/v1/prompt$0.005Turns an idea into 5 optimized text-to-image prompts. JSON: idea, optional style.
POST/v1/tts$0.01Text-to-speech (MeloTTS) in English, Spanish, French, Chinese, Japanese or Korean. JSON: text (≤ 600 chars), lang (en, es, fr, zh, jp, kr). Returns a base64 WAV (16-bit PCM, 44.1 kHz).
POST/v1/embed$0.001Multilingual embeddings (BGE-M3, 1024 dimensions). JSON: texts (up to 16 strings).
POST/v1/summarize$0.004Summary of a text (80–12000 chars) as bullets, a paragraph or a TL;DR. JSON: text, format, max_words.
POST/v1/transcribe$0.01Speech-to-text (Whisper large-v3-turbo) for short clips. JSON: audio (base64 WAV/MP3/FLAC, ≤ ~1.5 MB; a 30 s WAV at 16 kHz is ~1 MB), optional language.
GET/v1/pack/latest$0.99PromptVault Pro Pack: pro prompts with variations and example outputs (JSON, or ?format=md for Markdown).

Quickstart (JavaScript)

npm i @x402/fetch @x402/evm viem

import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const signer = privateKeyToAccount(process.env.PRIVATE_KEY);      // a wallet holding a little USDC on Base
const client = new x402Client().register("eip155:*", new ExactEvmScheme(signer));
const pay = wrapFetchWithPayment(fetch, client);                 // handles the 402 → sign → retry for you

const res = await pay("https://autopilot-studio.kariguetoazul.workers.dev/v1/translate", {
  method: "POST", headers: { "content-type": "application/json" },
  body: JSON.stringify({ text: "Good morning, how can I help you?", to: "pt" }),
});
console.log(await res.json());   // { translated_text: "...", from: "en", to: "pt" }

What the 402 looks like

curl -i -X POST https://autopilot-studio.kariguetoazul.workers.dev/v1/translate -H 'content-type: application/json' -d '{"text":"Good morning","to":"pt"}'
# HTTP/2 402
# PAYMENT-REQUIRED: <base64 JSON> → x402 v2 · scheme "exact" · network eip155:8453 (Base) · asset USDC · amount "3000" · payTo 0x13dd72Fa0E7504790585D92bD98c720f6fD2aBa6

Guides for builders

Good to know