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.

2 min
to first tracked call
$40K
avg waste found in week 1
31%
avg cost reduction in 90 days
10 days
free trial, no credit card

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 useSearch forLanguage
OpenAI Pythonfrom openai import or OpenAI(Python
OpenAI Node.jsnew OpenAI(TypeScript/JS
Anthropic Pythonanthropic.Anthropic(Python
Anthropic Node.jsnew Anthropic(TypeScript/JS
LangChainChatOpenAI( or ChatAnthropic(Python
CrewAIOPENAI_API_KEY in your .envenv file
AutoGenconfig_list with api_keyPython

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.

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello, Cognocient!"}]
)
print(response.choices[0].message.content)
# That call now appears in your dashboard — cost, tokens, model, latency

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:

MetricExample
Cost$0.00023
Modelgpt-4o-mini
Tokens234
Latency312ms

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:

response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Summarise this ticket"}],
    extra_headers={
        "X-Cost-Feature":    "ticket-resolver",   # your product feature name
        "X-Cost-Department": "customer-success",  # your team or business unit
    }
)

Or set them once at the client level so every call is tagged automatically:

client = OpenAI(
    api_key="sk-cog-YOUR-PROXY-KEY",
    base_url="https://api.cognocient.com/v1",
    default_headers={
        "X-Cost-Feature":    "ticket-resolver",
        "X-Cost-Department": "customer-success",
    }
)
# No extra_headers needed on individual calls

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.

HeaderWhat it tagsExample
X-Cost-FeatureProduct featurechatbot, search, reports
X-Cost-DepartmentBusiness unitengineering, cx, sales
X-Cost-UserCustomer ID (internal)user_abc123
X-Cost-SessionConversation or task IDsess-uuid-here
X-Cost-GL-AccountGL account code5100-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.

Your App

    │  POST /v1/chat/completions
    │  Authorization: Bearer sk-cog-...
    │  X-Cost-Feature: chatbot

Cognocient Proxy  ──→  Logs: cost, tokens, model, feature, latency

    │  Checks: budget limits, caching, routing rules

    │  POST /v1/chat/completions
    │  Authorization: Bearer sk-openai-REAL-KEY

OpenAI / Anthropic / Gemini / Mistral / Groq / Together / Azure


Response forwarded transparently to your app

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

On this page