Build with CognyFlow
Everything you need to integrate, orchestrate, and scale AI models in production.
Getting Started
Quick Start
Go from zero to your first API call in under 3 minutes.
Installation
Install the SDK via npm, pip, or use our REST API directly.
Authentication
Configure API keys, JWT tokens, and environment variables.
Core Concepts
Model Orchestration
Learn how CognyFlow routes requests across providers with smart fallbacks.
SSE Streaming
Token-by-token streaming with real-time latency metrics and backpressure.
Fallback Chains
Configure automatic failover from primary to secondary models.
Providers
Google Gemini
Integrate Gemini 2.5 Flash, Pro, and Nano models via the Google AI SDK.
NVIDIA NIM
Connect to Llama, Mistral, Nemotron and other models via NVIDIA endpoints.
Custom Endpoints
Register vLLM, Ollama, TGI, or any OpenAI-compatible server.
Security & Deployment
Encryption
How CognyFlow stores API keys with AES-256-GCM encryption at rest.
Rate Limiting
Configure per-model and per-user rate limits with sliding window counters.
Self-Hosting
Deploy CognyFlow on your own infrastructure with Docker Compose.
Quick Start
Get started with your first API call in any language.
import { Flow } from '@cognyflow/sdk';
const hub = new Flow({ apiKey: 'CF_KEY_...' });
const stream = await hub.stream({
model: 'gemini-2.5-flash',
fallback: 'llama-3.1-405b',
prompt: 'Explain quantum entanglement',
});
for await (const token of stream) {
process.stdout.write(token);
}