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/analyze

Analyze images using GPT-4o vision

$0.05🔐 x402
Show example request →
{
  "image": "base64_image_data",
  "prompt": "Describe this image"
}
POST/api/ai/generate

Generate images with DALL-E 3

$0.15🔐 x402
Show example request →
{
  "prompt": "A serene landscape",
  "size": "1024x1024"
}
POST/api/ai/transcribe

Transcribe audio to text with Whisper

$0.04🔐 x402
Show example request →
{
  "audio": "base64_audio_data",
  "language": "en"
}
POST/api/ai/synthesize

Convert text to speech

$0.04🔐 x402
Show example request →
{
  "text": "Hello world",
  "voice": "alloy"
}

💬NLP Services

POST/api/ai/summarize

Summarize long text

$0.03🔐 x402
Show example request →
{
  "text": "Long article...",
  "maxLength": 200
}
POST/api/ai/translate

Translate between languages

$0.03🔐 x402
Show example request →
{
  "text": "Hello",
  "targetLang": "es"
}
POST/api/ai/sentiment

Analyze sentiment

$0.02🔐 x402
Show example request →
{
  "text": "This is amazing!"
}
POST/api/ai/moderate

Content moderation

$0.01🔐 x402
Show example request →
{
  "text": "Text to check"
}
POST/api/ai/simplify

Simplify complex text

$0.02🔐 x402
Show example request →
{
  "text": "Complex explanation...",
  "level": "beginner"
}
POST/api/ai/extract

Extract entities (NER)

$0.03🔐 x402
Show example request →
{
  "text": "Apple Inc. is in California"
}

💼Business Tools

POST/api/ai/email/generate

Generate professional emails

$0.02🔐 x402
Show example request →
{
  "context": "Follow-up meeting",
  "tone": "professional"
}
POST/api/ai/product/describe

Create product descriptions

$0.03🔐 x402
Show example request →
{
  "productName": "Smartwatch",
  "features": [
    "GPS",
    "Heart rate"
  ]
}
POST/api/ai/seo/optimize

SEO optimization

$0.05🔐 x402
Show example request →
{
  "title": "Blog post",
  "content": "Article content..."
}

Developer Tools

POST/api/ai/code/generate

Generate code from description

$0.08🔐 x402
Show example request →
{
  "description": "Sort array",
  "language": "python"
}
POST/api/ai/code/review

Review code for issues

$0.05🔐 x402
Show example request →
{
  "code": "def foo():\\n  return x"
}
POST/api/ai/sql/generate

Generate SQL queries

$0.03🔐 x402
Show example request →
{
  "description": "Get all users",
  "schema": "users(id, name)"
}
POST/api/ai/regex/generate

Generate regex patterns

$0.02🔐 x402
Show example request →
{
  "description": "Match email addresses"
}
POST/api/ai/docs/generate

Generate API documentation

$0.05🔐 x402
Show example request →
{
  "code": "function add(a, b) { return a + b; }"
}

🚀Advanced Services

POST/api/ai/ocr

Extract text from images (OCR)

$0.04🔐 x402
Show example request →
{
  "image": "base64_image_data"
}
POST/api/ai/quiz/generate

Generate quiz questions

$0.05🔐 x402
Show example request →
{
  "topic": "JavaScript",
  "count": 5
}