SDK API v1.0

Build AI-Powered Apps
with iReadCustomer SDK

A powerful API for AI text generation, vector search, intelligent agents, and workflow automation. Integrate AI capabilities into your applications in minutes.

Get Your API KeyView Documentation

Powerful AI Capabilities

Everything you need to build intelligent applications

AI Generation

Generate text and structured output using OpenAI, Anthropic, Google, and more.

Vector Search

Semantic search across your documents with high-performance vector embeddings.

AI Agents

Custom agents with RAG knowledge retrieval, plug-and-play tools (webhook/builtin), and conversation memory.

Embeddings

Create vector embeddings for any text to power semantic search and similarity.

Image Generation

Generate images with DALL-E, Stable Diffusion, and other leading models.

Workflows

Multi-step AI orchestration with human-in-the-loop approval support.

Integrate Anywhere

Connect your favorite tools and platforms

SDK API
🌐
Web & Mobile Apps
⚙️
Backend Services
🔗
n8n Workflows
💬
Chatbots & Widgets
📊
CRM/ERP Systems

Quick Start

Get up and running in minutes

JavaScript
// Text Generation - Multiple Model Providers
// Supported providers: openai, anthropic, google, xai, perplexity

// GPT-4o (OpenAI)
const gpt_response = await fetch('https://api.ireadcustomer.com/v1/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer irc_live_xxxxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    prompt: 'Write a product description for a smart home device',
    model: { provider: 'openai', name: 'gpt-4o' },
    options: { temperature: 0.7 }
  })
});

// Claude Sonnet (Anthropic)
const claude_response = await fetch('https://api.ireadcustomer.com/v1/generate', {
  body: JSON.stringify({
    prompt: 'Analyze this business strategy',
    model: { provider: 'anthropic', name: 'claude-sonnet-4-20250514' }
  })
  // ... headers same as above
});

// Gemini (Google)
const gemini_response = await fetch('https://api.ireadcustomer.com/v1/generate', {
  body: JSON.stringify({
    prompt: 'Explain quantum computing',
    model: { provider: 'google', name: 'gemini-2.0-flash' }
  })
});

// Grok (xAI)
const grok_response = await fetch('https://api.ireadcustomer.com/v1/generate', {
  body: JSON.stringify({
    prompt: 'Latest tech trends',
    model: { provider: 'xai', name: 'grok-3' }
  })
});
JavaScript
// Invoke AI Agent with RAG, Tools & Memory
const response = await fetch('https://api.ireadcustomer.com/v1/agents/invoke', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer irc_live_xxxxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    agent: 'my_sales_agent', // Custom or built-in agent
    message: 'What products do we have in stock?',
    context: {
      project_id: 'proj_123',
      session_id: 'sess_abc', // Enables conversation memory
      variables: { language: 'thai' }
    }
  })
});

const data = await response.json();
console.log(data.data.response);
// RAG sources: data.data.rag?.sources
// Tool calls: data.data.tool_calls
// Memory: data.data.memory?.message_count
JavaScript
// Register Agent with Plug-and-Play Tools
// Connect your own APIs via webhooks - no code changes needed!

await fetch('https://api.ireadcustomer.com/v1/agents/register', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer irc_live_xxxxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    type: 'inventory_assistant',
    name: 'Inventory AI',
    prompt: { system_prompt: 'You help check product inventory.' },
    features: {
      tools: {
        custom: {
          // Webhook Tool - calls YOUR API
          check_stock: {
            description: 'Check product stock levels',
            parameters: {
              product_id: { type: 'string', required: true },
              warehouse: { type: 'string', enum: ['BKK', 'CNX'] }
            },
            handler: {
              type: 'webhook',
              webhook_url: 'https://your-api.com/stock',
              webhook_auth: 'Bearer your_secret_key',
              timeout_ms: 10000
            }
          },
          // Built-in Tool - uses our services
          calculate: {
            description: 'Calculate expressions',
            parameters: { expression: { type: 'string', required: true } },
            handler: { type: 'builtin', builtin_name: 'calculate' }
          }
        }
      }
    }
  })
});

// When AI calls check_stock, we POST to your webhook:
// { tool_name: 'check_stock', arguments: { product_id: 'SKU123' } }

See more examples in the API documentation.

Ready to Build?

Get your API key and start building AI-powered applications today.

Get Your API Key

Learn more at ireadcustomer.com