All AI providers in one place — a unified TypeScript interface for OpenAI, Anthropic, Gemini, DeepSeek, Grok, and any OpenAI-compatible API.
- Unified API — same interface across all providers, swap models with a one-line change
- Multimodal — images, PDFs and files supported where available
- Structured Output — JSON Schema via Zod, validated and typed
- Tool / Function Calling — consistent across all compatible providers
- Reasoning & Thinking — reasoning and thinking modes for supported models
- Batch Processing — async batch jobs for OpenAI, Anthropic and Gemini
- File Upload — upload
.jsonlfiles for batch inputs - Retry Logic — built-in exponential backoff
- Hooks — intercept every request and response globally
- Langfuse — built-in tracing and monitoring integration
- TypeScript-first — full type safety with discriminated unions
npm install @cubos/ai-suite
# or
pnpm add @cubos/ai-suite
# or
yarn add @cubos/ai-suiteimport { AISuite } from '@cubos/ai-suite';
const aiSuite = new AISuite({
openaiKey: process.env.OPENAI_API_KEY,
anthropicKey: process.env.ANTHROPIC_API_KEY,
geminiKey: process.env.GEMINI_API_KEY,
deepseekKey: process.env.DEEPSEEK_API_KEY,
grokKey: process.env.GROK_API_KEY,
});
const response = await aiSuite.createChatCompletion(
'openai/gpt-4o',
[{ role: 'user', content: 'Hello, world!' }],
);
if (response.success) {
console.log(response.content);
}| Provider | Chat | Embeddings | Batch | Files | Service Tier |
|---|---|---|---|---|---|
| OpenAI | ✓ | ✓ | ✓ | ✓ | ✓ |
| Anthropic | ✓ | — | ✓ | ✓ | ✓ |
| Google Gemini | ✓ | ✓ | ✓ | ✓ | ✓ |
| DeepSeek | ✓ | ✓ | — | — | ✓* |
| Grok | ✓ | — | — | — | ✓* |
| Custom LLM | ✓ | ✓ | — | — | ✓* |
Service Tier selects a processing/priority tier via the serviceTier option. ✓* = forwarded through the OpenAI-compatible path; actual support depends on the endpoint. See Service Tier.
Full documentation, guides and API reference at cubos.github.io/ai-suite.