Developer API Documentation

Integrate Intelligence with Guardrails.

SyncEthic AI provides a unified endpoint for all your LLM needs, automatically protected by enterprise-grade PII filtering and security guardrails.

Unified Chat Endpoint

Post
https://syncethicai.com/api/v1/chat

This single endpoint routes your messages to the most cost-effective and secure AI model, applying your organization's rules in real-time.

Authentication

All requests must be authenticated using the x-api-key header. You can generate multiple keys in the API Keys section of your dashboard.

Request Headers

Content-Type: application/json

x-api-key: sync_live_your_key_here

SDK Integration

Option 1
Quick Start (CDN)

The fastest way to add SyncEthic to any website. No build step required. Just paste this before the closing </body> tag.

<script src="https://syncethicai.com/sdk/syncethic.min.js"></script>
<script>
  SyncEthic.mount({
    apiKey: 'sk_global_YOUR_KEY',
    botSlug: 'your_bot_slug',
    position: 'bottom-right',
    theme: 'auto'
  });
</script>
WordPress

Use a "Header and Footer" plugin to paste the script tag. It will automatically appear on all pages of your site.

Shopify

Edit your theme.liquid file and paste the snippet just before the </body> tag.

Option 2
Frameworks (NPM / React)

For deep integration in Next.js, React, or Vue apps, use our official NPM package or start from one of our professional templates.

Node.js / Core API (Custom Bot)
import { SyncEthic } from '@syncethic/sdk';

// Auto-provision a custom bot on the fly just by naming it
const bot = new SyncEthic({ 
  apiKey: 'sk_global_YOUR_KEY', 
  botSlug: 'my_hr_assistant', // If it doesn't exist, we create it!
  instructions: 'You are an HR expert. Answer questions carefully.'
});

const response = await bot.chat('What is our remote work policy?');
console.log(response);
React UI Component
import { ChatWidget } from '@syncethic/sdk/react';

export default function Layout({ children }) {
  return (
    <>
      {children}
      <ChatWidget 
        apiKey="sk_global_YOUR_KEY" 
        botSlug="support_bot" 
      />
    </>
  );
}

Default Model

Gemini 3.1 Flash-Lite

By default, your requests are routed to Gemini 3.1 Flash-Lite. It provides ultra-fast responses with deep reasoning capabilities at the lowest industry cost.

  • 2.0M Context Window
  • Safe-by-default
  • Multimodal native

Implementation Example

cURL
curl -X POST https://syncethicai.com/api/v1/chat \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "messages": [
      { "role": "user", "content": "Hello, how are you?" }
    ],
    "model": "Gemini 3.1 Flash-Lite"
  }'