How do I set up Cognocient in 2 minutes?
Connect your OpenAI, Anthropic, or Gemini app to Cognocient in 2 minutes. Change one line of code. See every AI call attributed and costed instantly.
Cognocient setup takes one configuration change: replace your AI provider's base_url with the Cognocient proxy URL. No new SDK, no code rewrite — your existing calls work exactly as before, now with full cost attribution.
Not a developer?
Share this page with your engineering team. Or if you're a CFO / FinOps lead, go directly to the CFO setup guide — no code needed.
Step 1 — Get your proxy key
Go to cognocient.com and click Sign in or Get started for free. Authenticate with Google, Microsoft, or email. New accounts automatically get a 10-day free trial with full access — no credit card required. Complete the quick onboarding and copy your proxy key. Your key starts with sk-cog-.
10-day free trial
No credit card required. You get full access to every feature — attribution, budgets, waste detection, and reports — for 10 days.
Step 2 — Change one line of code
Replace your OpenAI (or Anthropic, Gemini, etc.) base URL with the Cognocient proxy. That is the only change required. All your existing calls, models, and parameters work exactly as before.
Where to find the line to change — In your code editor, search across all files for one of these patterns:
| If you use | Search for | Language |
|---|---|---|
| OpenAI Python | from openai import or OpenAI( | Python |
| OpenAI Node.js | new OpenAI( | TypeScript/JS |
| Anthropic Python | anthropic.Anthropic( | Python |
| Anthropic Node.js | new Anthropic( | TypeScript/JS |
| LangChain | ChatOpenAI( or ChatAnthropic( | Python |
| CrewAI | OPENAI_API_KEY in your .env | env file |
| AutoGen | config_list with api_key | Python |
Cognocient proxies OpenAI, Anthropic, Gemini, Mistral, Groq, Together, and Azure. See Supported Providers for all SDKs.
Step 3 — Make a test call
Run any existing API call. It will appear in your Cognocient dashboard within seconds with cost, tokens, latency, and model — automatically tracked.
Onboarding shows "Waiting for your first API call…"?
The onboarding page detects your first call automatically — it's waiting for you to run the code in your local terminal, not in the browser. Paste the snippet above into a terminal (Python, Node.js) and the page will update within a few seconds.
Getting 'No API key configured'?
This means you haven't connected a provider key yet. On the onboarding page, a yellow banner will appear — enter your OpenAI (or Anthropic, Gemini, etc.) key there and save it. Or go to Settings → Providers at any time.
What you'll see in your dashboard after the first call:
| Metric | Example |
|---|---|
| Cost | $0.00023 |
| Model | gpt-4o-mini |
| Tokens | 234 |
| Latency | 312ms |
Step 4 — Add attribution headers (recommended)
Attribution headers tell Cognocient which feature and team generated each API call. This is what turns a single monthly total into per-feature cost dashboards, team chargebacks, and waste detection.
You only need 2 headers to start:
Or set them once at the client level so every call is tagged automatically:
After the first tagged call, the Spend by Feature and Spend by Department charts update immediately. When you're ready to add more context (user IDs, session tracking, GL account codes), see Attribution Headers for the full guide.
| Header | What it tags | Example |
|---|---|---|
X-Cost-Feature | Product feature | chatbot, search, reports |
X-Cost-Department | Business unit | engineering, cx, sales |
X-Cost-User | Customer ID (internal) | user_abc123 |
X-Cost-Session | Conversation or task ID | sess-uuid-here |
X-Cost-GL-Account | GL account code | 5100-software |
How the proxy works
Cognocient sits transparently between your application and the AI provider. Each request passes through in 10–30ms of overhead, with no payload modification. We log metadata only — never your prompt content.
What you do NOT need to do:
- Modify your logging pipeline
- Reshape your data warehouse schema
- Wrap individual SDK calls with metadata
- Change how you store API call data
- Migrate historical logs
What Cognocient does automatically:
- Tags every call with cost, tokens, model, latency
- Attributes spend to features, teams, and users
- Enforces budgets before calls reach the provider
- Detects waste patterns across all your calls
- Stores structured call data in your dashboard
Next steps: Attribution Headers · Budget Enforcement · Waste Detection