SDK API v1.0

สร้างแอปที่ขับเคลื่อนด้วย AI
ด้วย iReadCustomer SDK

API ที่ทรงพลังสำหรับการสร้างข้อความ AI, ค้นหาเวกเตอร์, เอเจนต์อัจฉริยะ และระบบอัตโนมัติ เชื่อมต่อความสามารถ AI เข้ากับแอปพลิเคชันของคุณได้ในไม่กี่นาที

รับ API Key ของคุณดูเอกสาร

ความสามารถ AI ที่ทรงพลัง

ทุกสิ่งที่คุณต้องการเพื่อสร้างแอปพลิเคชันอัจฉริยะ

สร้างข้อความ AI

สร้างข้อความและเอาต์พุตแบบมีโครงสร้างด้วย OpenAI, Anthropic, Google และอื่นๆ

ค้นหาเวกเตอร์

ค้นหาเชิงความหมายในเอกสารของคุณด้วย vector embeddings ประสิทธิภาพสูง

เอเจนต์ AI

เอเจนต์แบบกำหนดเองพร้อม RAG, เครื่องมือ plug-and-play (webhook/builtin) และหน่วยความจำการสนทนา

Embeddings

สร้าง vector embeddings สำหรับข้อความใดๆ เพื่อขับเคลื่อนการค้นหาเชิงความหมาย

สร้างรูปภาพ

สร้างรูปภาพด้วย DALL-E, Stable Diffusion และโมเดลชั้นนำอื่นๆ

Workflows

การจัดการ AI หลายขั้นตอนพร้อมระบบอนุมัติโดยมนุษย์

เชื่อมต่อได้ทุกที่

เชื่อมต่อเครื่องมือและแพลตฟอร์มที่คุณชื่นชอบ

SDK API
🌐
แอป Web & Mobile
⚙️
Backend Services
🔗
n8n Workflows
💬
แชทบอท & Widgets
📊
ระบบ CRM/ERP

เริ่มต้นอย่างรวดเร็ว

พร้อมใช้งานได้ในไม่กี่นาที

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.

พร้อมที่จะสร้างแล้วหรือยัง?

รับ API key ของคุณและเริ่มสร้างแอปพลิเคชันที่ขับเคลื่อนด้วย AI วันนี้

รับ API Key ของคุณ

เรียนรู้เพิ่มเติมที่ ireadcustomer.com