Welcome to Cognocient AI Docs

Popular: Attribution Headers, Budget Enforcement, Python Wrapper, CSV Import

Cognocient AI is an AI spend intelligence platform that proxies every API call your application makes to AI providers — OpenAI, Anthropic, Google Gemini, Mistral, Groq, Together AI, Azure OpenAI, AWS Bedrock, Google Vertex AI, and your own OpenAI-compatible servers. Every request is observed, attributed to a feature or team, analysed for waste, and surfaced in real-time dashboards your CFO can actually use.

The integration is a single configuration change. No new SDKs, no new dependencies, no application code to rewrite.

Three ways to get started

The proxy above is the flagship path — live attribution AND pre-call budget enforcement. If you'd rather evaluate without a proxy hop or a production code change, see the Python async wrapper (live attribution, no pre-call enforcement) or the CSV/OTel importer (historical data, no code change at all).

Explore the docs by category

Getting started

The problem

58% of organizations describe their AI costs as a "black box" (Capgemini Research Institute, 2025). Engineering teams see token counts in Datadog. Finance teams get a consolidated line item on the credit card bill — weeks later. Nobody can answer:

  • Which product feature is driving the cost spike?
  • Is this spend waste, or is it generating revenue?
  • Are we about to breach our AI budget before the month ends?

Cognocient AI closes all three gaps — automatically, in real time, without requiring your developers to instrument anything manually.

How Cognocient AI works

Your application code points at https://api.cognocient.com/v1 instead of the AI provider directly. Cognocient AI:

  1. Forwards the request to the original provider — same API surface, same models, same response format. Your application code sees zero difference.
  2. Records metadata — model, token counts, cost, latency, and your optional attribution headers. Prompt and response text are not logged (opt-in response caching is the one exception).
  3. Runs analytics in-path — waste detection, budget enforcement, anomaly scoring, and cache hit analysis — before the response returns to your app.
  4. Surfaces insights — into the Cognocient AI dashboard, your BI tools via the FOCUS-aligned export, or your alerting pipeline via webhooks.
┌─────────────────────────────────────────────────────────────────┐
│                       YOUR APPLICATION                          │
│  client = OpenAI(api_key="sk-cog-...",                          │
│                  base_url="https://api.cognocient.com/v1")  ←─  │
│                     the only change                             │
└───────────────────────────┬─────────────────────────────────────┘
                            │  POST /v1/chat/completions
                            │  X-Cost-Feature: chatbot
                            │  X-Cost-Department: engineering
                            ▼
┌─────────────────────────────────────────────────────────────────┐
│                    COGNOCIENT PROXY                             │
│                                                                 │
│  ① Budget check (Redis, sub-ms) ── over limit? → 429 / degrade │
│  ② Cache lookup (pgvector HNSW) ── hit? → return in <10ms      │
│  ③ max_tokens clamping ─────────── cap to remaining budget     │
│  ④ Attribution tagging ─────────── feature, dept, session      │
│  ⑤ Forward to provider ─────────── with real provider key      │
│  ⑥ Log metadata ────────────────── cost, tokens, latency       │
│                                                                 │
│  ~2–8ms median overhead  ·  Prompt text never logged           │
└───────────────────────────┬─────────────────────────────────────┘
                            │
               ┌────────────┼────────────┐
               ▼            ▼            ▼
          OpenAI       Anthropic      Gemini / Mistral
          GPT-4o      Claude 4       / Groq / Together

The proxy adds about 2–8ms at the median at low concurrency in our published benchmark, which also shows how that grows under heavy load on one instance. Budget checks run in Redis (sub-millisecond) before every call. Cache hits (Growth plan) skip the provider entirely.

One change unlocks everything

Change one line. That's it.

from openai import OpenAI
 
client = OpenAI(
    api_key="sk-cog-YOUR-KEY",                    # Your Cognocient AI proxy key
    base_url="https://api.cognocient.com/v1"       # ← the only change
)
 
# All existing code works unchanged ✓
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}]
)
import OpenAI from 'openai';
 
const openai = new OpenAI({
  apiKey: 'sk-cog-YOUR-KEY',
  baseURL: 'https://api.cognocient.com/v1',        // ← the only change
});
 
// All existing code works unchanged ✓
const response = await openai.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Hello' }],
});

2-minute setup

No SDKs to install. No infrastructure to manage. If you already use the OpenAI SDK — or any SDK that accepts a base_url / baseURL — you are already compatible. The same URL works for every supported provider; the model name picks which one serves the call.

Key capabilities

Cognocient AI is built around nine capability pillars. Each unlocks a different part of the AI spend visibility problem.

Spend Attribution

Tag every AI call by feature, team, session, and GL account using HTTP headers. Slice and dice costs any way finance needs.

Workstream Attribution

Tag calls with X-Cost-Session: JIRA-1234 or pr-456 to see AI cost per story, PR, or agent task run — down to the cent.

Waste Detection

Retry waste, model mismatch, context bloat and context starvation detected automatically by feature, with token maxing and context tax analysis on Growth.

AI Investment ROI

Live dashboard panel showing investment vs. waste split, the productive share of spend, and a one-sentence board summary generated from your actual spend data.

Budget Enforcement

Hard budget limits enforced at the proxy — before the charge reaches your provider bill. Hierarchical: run → feature → department → org. The tightest limit wins.

max_tokens Clamping

Budget reservations are enforced physically, not just logically. Forwarded max_tokens is clamped to what the remaining budget can actually afford.

AI Optimization

Semantic caching via pgvector HNSW, prompt-cache routing, and AI-generated one-click recommendations that right-size your spend.

Agent & MCP Attribution

Full cost tree across multi-agent workflows: which agent called which tool, how much each step cost, and which team was responsible.

Reports & Exports

Board-ready PDF executive reports with 3 narrative tones. FOCUS-aligned CSV export. Scheduled monthly delivery to finance teams.

Routing & Reliability

One OpenAI-compatible endpoint for every provider, with the Auto Router, load-balanced model groups, provider failover and content guardrails for PII and prompt injection.

Emergency Freeze & Shadow Spend

A one-click kill switch for proxied spend, dollar-denominated velocity limits for image/video generation floods, and daily reconciliation against what OpenAI, Anthropic, Google Cloud, AWS and Azure actually billed.

Claude Code & Coding Tools

Run Claude Code through the proxy with ANTHROPIC_BASE_URL for per-developer cost and budgets, and see Cursor and GitHub Copilot spend alongside it.

Customer Margin

Tag calls with X-Cost-Customer and see each of your customers' AI cost next to what they pay you, from Stripe or your own figures.

Finding features in the dashboard

The sidebar groups pages into Observe, Monitor, Control, Intelligence and Executive. The most-used ones:

To...OpenPlan
See every call and check your tagsMonitor → Live Callsevery plan
See today's cost, errors and retry wasteObserve → Overviewevery plan
Set or check a limitControl → Budgetsevery plan
Stop all spend nowControl → Safety & Limits (Emergency Freeze)every plan
Check an agent run's costMonitor → Run Budgetsevery plan
Find recoverable wasteMonitor → WasteBase
Charge spend back to teamsControl → ChargebackBase
Apply one-click savingsIntelligence → RecommendationsGrowth
Brief the CFOExecutive → Executive ViewGrowth

The status of every budget is also available to orchestration code at GET /api/budgets/status.

Read the full Dashboard Walkthrough →

Who Cognocient AI is for

Engineering teams use Cognocient AI to understand which features drive AI costs, catch runaway usage before it hits the bill, right-size models with one-click recommendations, and debug anomalies with per-request attribution trails.

FinOps and finance teams use Cognocient AI to allocate AI spend to the right cost centres, enforce monthly budgets in real time, produce chargeback reports for internal GL accounts, and export FOCUS-aligned data for the cloud cost management platforms they already use.

CTOs and CFOs use Cognocient AI's Executive View to answer the board question every quarter: "We spent $X on AI last month — what did we actually get for it?" Unit economics (cost per ticket resolved, cost per report generated, cost per sale influenced) make the answer concrete.

Free forever on one provider — no credit card

Real-time proxy and attribution on day one. Your first attribution dashboard in under 5 minutes. Find my waste — start free

Supported AI providers

Cognocient AI proxies all major providers through a single base_url configuration. No separate keys or SDK changes per provider.

See Supported Providers for SDK-specific configuration examples for each provider.

Security and privacy

Cognocient AI is built on a metadata-only logging principle:

  • Prompt and response text is not logged. We log model, token counts, cost, latency, and your attribution headers. The one exception is opt-in response caching, which keeps a cached response for up to 24 hours.
  • Provider API keys are encrypted at rest using Fernet symmetric encryption. Keys are never logged or exposed in API responses.
  • All traffic is encrypted in transit (TLS 1.2+).
  • No SOC 2 report yet. See Security & Privacy for the full, current state of what's built.

Step-by-step walkthroughs for the most common tasks. Each is self-contained and takes under 30 minutes. See all 16 how-to guides ↓

All how-to guides

GuideTime
Tag your first AI call5 min — add 2 headers and see per-feature spend immediately
Set a monthly spending limit5 min — hard budget enforced at the proxy
Cut your AI bill with one-click recommendations30 min — AI Advisor finds savings, one click applies them
Get Slack alerts on spend spikes10 min — anomaly and budget alerts in your Slack channel
Track cost per agent run15 min — per-execution cost breakdown and per-run budget
Map spend to GL accounts10 min — finance-ready chargeback reports with GL codes
Set up hierarchical budgets15 min — enforce limits at every level simultaneously
Debug runaway agent loops— find, stop, and prevent looping agents
Prepare an AI ROI board report30 min — cost per outcome, efficiency trend, board-ready PDF
Enable semantic caching5 min — eliminate duplicate calls, 25–35% bill reduction
Track cost per business outcome15 min — cost per ticket, contract, or conversion with one header
Set up MCP agent attribution15 min — full cost tree for Claude + MCP tool call workflows
Apply routing rules to auto-switch models10 min — no code changes, savings apply immediately
Schedule monthly AI spend reports5 min — automated PDF delivery to your finance team
Export AI spend to your FinOps platform10 min — FOCUS-aligned CSV for Apptio, CloudZero, or Spot
Migrate from LiteLLM, Langfuse, or Helicone15 min — side-by-side comparison and first-5-minutes checklist

Frequently asked questions


Ready to start? Find my waste — start free

On this page