Developer Documentation
Complete guide to all 20 AI service endpoints with x402 micropayments
🔐 x402 v2 Payment Required
All endpoints require x402 v2 payment envelope headers:
x-authorization: { "from": "0x...", "to": "0x...", "amount": "1000", "token": "0x...",... }
x-signature: 0x...
💡 Use the Dashboard to test endpoints with automatic payment handling
🎨Vision & Audio Services
POST
/api/ai/analyzeAnalyze images using GPT-4o vision
$0.05🔐 x402
Show example request →
{
"image": "base64_image_data",
"prompt": "Describe this image"
}POST
/api/ai/generateGenerate images with DALL-E 3
$0.15🔐 x402
Show example request →
{
"prompt": "A serene landscape",
"size": "1024x1024"
}POST
/api/ai/transcribeTranscribe audio to text with Whisper
$0.04🔐 x402
Show example request →
{
"audio": "base64_audio_data",
"language": "en"
}POST
/api/ai/synthesizeConvert text to speech
$0.04🔐 x402
Show example request →
{
"text": "Hello world",
"voice": "alloy"
}💬NLP Services
POST
/api/ai/summarizeSummarize long text
$0.03🔐 x402
Show example request →
{
"text": "Long article...",
"maxLength": 200
}POST
/api/ai/translateTranslate between languages
$0.03🔐 x402
Show example request →
{
"text": "Hello",
"targetLang": "es"
}POST
/api/ai/sentimentAnalyze sentiment
$0.02🔐 x402
Show example request →
{
"text": "This is amazing!"
}POST
/api/ai/moderateContent moderation
$0.01🔐 x402
Show example request →
{
"text": "Text to check"
}POST
/api/ai/simplifySimplify complex text
$0.02🔐 x402
Show example request →
{
"text": "Complex explanation...",
"level": "beginner"
}POST
/api/ai/extractExtract entities (NER)
$0.03🔐 x402
Show example request →
{
"text": "Apple Inc. is in California"
}💼Business Tools
POST
/api/ai/email/generateGenerate professional emails
$0.02🔐 x402
Show example request →
{
"context": "Follow-up meeting",
"tone": "professional"
}POST
/api/ai/product/describeCreate product descriptions
$0.03🔐 x402
Show example request →
{
"productName": "Smartwatch",
"features": [
"GPS",
"Heart rate"
]
}POST
/api/ai/seo/optimizeSEO optimization
$0.05🔐 x402
Show example request →
{
"title": "Blog post",
"content": "Article content..."
}⚡Developer Tools
POST
/api/ai/code/generateGenerate code from description
$0.08🔐 x402
Show example request →
{
"description": "Sort array",
"language": "python"
}POST
/api/ai/code/reviewReview code for issues
$0.05🔐 x402
Show example request →
{
"code": "def foo():\\n return x"
}POST
/api/ai/sql/generateGenerate SQL queries
$0.03🔐 x402
Show example request →
{
"description": "Get all users",
"schema": "users(id, name)"
}POST
/api/ai/regex/generateGenerate regex patterns
$0.02🔐 x402
Show example request →
{
"description": "Match email addresses"
}POST
/api/ai/docs/generateGenerate API documentation
$0.05🔐 x402
Show example request →
{
"code": "function add(a, b) { return a + b; }"
}🚀Advanced Services
POST
/api/ai/ocrExtract text from images (OCR)
$0.04🔐 x402
Show example request →
{
"image": "base64_image_data"
}POST
/api/ai/quiz/generateGenerate quiz questions
$0.05🔐 x402
Show example request →
{
"topic": "JavaScript",
"count": 5
}