Documentation

Build with CognyFlow

Everything you need to integrate, orchestrate, and scale AI models in production.

Getting Started

5 min read

Quick Start

Go from zero to your first API call in under 3 minutes.

Read more
Setup

Installation

Install the SDK via npm, pip, or use our REST API directly.

Read more
Essential

Authentication

Configure API keys, JWT tokens, and environment variables.

Read more

Core Concepts

Architecture

Model Orchestration

Learn how CognyFlow routes requests across providers with smart fallbacks.

Read more
Advanced

SSE Streaming

Token-by-token streaming with real-time latency metrics and backpressure.

Read more
Reliability

Fallback Chains

Configure automatic failover from primary to secondary models.

Read more

Providers

Provider

Google Gemini

Integrate Gemini 2.5 Flash, Pro, and Nano models via the Google AI SDK.

Read more
Provider

NVIDIA NIM

Connect to Llama, Mistral, Nemotron and other models via NVIDIA endpoints.

Read more
Provider

Custom Endpoints

Register vLLM, Ollama, TGI, or any OpenAI-compatible server.

Read more

Security & Deployment

Security

Encryption

How CognyFlow stores API keys with AES-256-GCM encryption at rest.

Read more
Security

Rate Limiting

Configure per-model and per-user rate limits with sliding window counters.

Read more
DevOps

Self-Hosting

Deploy CognyFlow on your own infrastructure with Docker Compose.

Read more

Quick Start

Get started with your first API call in any language.

typescript
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);
}

Need help?

Our team is here to support your integration.