Ontwikkelaarstools & Documentatie
Alles wat u nodig hebt om Divinci AI in uw applicaties te integreren. SDK's voor elk platform, een krachtige CLI en uitgebreide REST API-toegang.
Choose Your Tool
Pick the right integration for your use case — from terminal workflows to browser chat widgets.
Divinci CLI
Manage workspaces, chat with AI, search knowledge bases, and control releases from your terminal. Supports profiles, scripting, and CI/CD.
Server SDK
Full Node.js platform access — workspaces, releases, RAG operations, API key management, and x402 blockchain payments.
Client SDK
Browser SDK for headless chat integration. Streaming responses, RAG context bubbles, thread management, and external user auth.
MCP SDK
Model Context Protocol integration for Claude Desktop, Cursor, and other AI assistants. SSE transport, tool invocation, and x402 payments.
Embed Client
Drop-in chat widget for any website. White-label customization, conversation starters, RAG context display, and product recommendations.
REST API
Direct HTTP access to the Divinci platform. Manage workspaces, releases, RAG collections, API keys, and analytics via REST endpoints.
Quick Start
Get up and running in minutes with these examples.
# Install and authenticate npm install -g @divinci-ai/cli divinci auth login# Start chatting divinci workspace list divinci workspace use ws_abc123 divinci chat
import { DivinciServer } from "@divinci-ai/server";const divinci = new DivinciServer({ apiKey: process.env.DIVINCI_API_KEY, });
// Upload documents to RAG await divinci.rag.uploadDocument({ workspaceId: “ws_abc123”, ragVectorId: “rag_xyz”, file: fs.createReadStream(“./knowledge.pdf”), });
// Search the knowledge base const results = await divinci.rag.search({ workspaceId: “ws_abc123”, query: “return policy”, });
import { DivinciClient } from "@divinci-ai/client";const client = new DivinciClient({ releaseId: “rel_abc123”, apiKey: “divinci_key_…”, });
// Stream a response for await (const chunk of client.chat.stream(“Tell me about your products”)) { process.stdout.write(chunk.content); }
import { McpClient } from "@divinci-ai/mcp";const client = new McpClient({ serverUrl: “https://mcp.divinci.app”, apiKey: “divinci_key_…”, });
await client.connect(); const tools = await client.listTools(); const result = await client.callTool(“search_knowledge”, { query: “return policy” });
SDK Comparison
Each SDK serves different use cases. Use this table to find the right fit.
| Feature | CLI | Client | Server | MCP |
|---|---|---|---|---|
| Environment | Terminal | Browser | Node.js | Both |
| Chat Messages | Yes | Yes | — | Yes |
| Streaming | Yes | Yes | Yes | — |
| Workspace Management | Yes | — | Yes | — |
| Release Management | Yes | — | Yes | — |
| RAG Operations | Yes | — | Yes | Yes |
| API Key Management | — | — | Yes | — |
| x402 Payments | — | — | Yes | Yes |
| Auth0 PKCE | — | Yes | — | Yes |
| MCP Protocol | — | — | — | Yes |
| Raw API Access | Yes | — | Yes | — |
Authentication
Three authentication methods to fit your architecture.
API Key (Server)
Best for backend services and CI/CD. Pass your key via environment variable or constructor.
const divinci = new DivinciServer({ apiKey: process.env.DIVINCI_API_KEY, });
API Key + External User
Best for embed clients that identify end users for personalized experiences.
const client = new DivinciClient({ releaseId: "rel_abc123", apiKey: "divinci_key_...", externalUser: { id: "user_123" }, });
JWT Token (Browser)
Best for browser apps with your own backend handling token exchange.
const client = new DivinciClient({ releaseId: "rel_abc123", getToken: async () => { return fetch("/api/token"); }, });
Start building with Divinci AI
Get your API key and integrate AI capabilities into your application in minutes.