One-line Python SDK. Per-feature cost attribution. Budget alerts before you blow past your limits. Works with OpenAI, Anthropic, and Google.
Costara is a Python SDK and web dashboard for AI API cost monitoring. It works by wrapping LLM API calls with a single decorator or context manager, tagging each call with a feature_tag parameter, and aggregating costs per feature across OpenAI, Anthropic, and Google Gemini providers. Setup requires one line: pip install costara. Costara stores only metadata (model, tokens, cost, timestamp, feature tag) — zero prompt or response content is captured.
“The indie developer spending $200/month on OpenAI who can't tell which feature is eating the budget.”
“The 5-person startup that got a $3,000 AI bill and couldn't explain it to their investor.”
“The platform team managing 10+ AI features across three providers who needs one dashboard.”
“The CTO who wants budget alerts before the monthly invoice arrives, not after.”
One pip command. Works in any Python app, framework, or script.
pip install costaraCall costara.track() after each LLM call. The feature_tag is how costs get attributed.
costara.init(api_key='cst_xxx', project='my-app')
costara.track(
provider='openai',
model='gpt-4o',
prompt_tokens=response.usage.prompt_tokens,
completion_tokens=response.usage.completion_tokens,
cost=costara.estimate_cost('openai', 'gpt-4o', response.usage),
latency_ms=elapsed_ms,
feature_tag='customer-support-chat',
)Your dashboard shows cost-per-feature in real time. Set budget alerts and get notified before you overspend.
# Dashboard updates in real time.
# No more surprise bills at month-end.Add Costara to an existing Python app without changing how you call your LLM provider.
import costara
import openai, time
# Initialise once at app startup
costara.init(api_key='cst_live_xxxxxxxxxxxx', project='chatbot', environment='production')
# Make your LLM call as normal
client = openai.OpenAI()
start = time.time()
response = client.chat.completions.create(
model='gpt-4o',
messages=[{"role": "user", "content": "Summarize this: ..."}],
)
elapsed = (time.time() - start) * 1000
# Track it — one call, full attribution
costara.track(
provider='openai',
model='gpt-4o',
prompt_tokens=response.usage.prompt_tokens,
completion_tokens=response.usage.completion_tokens,
cost=costara.estimate_cost('openai', 'gpt-4o', response.usage),
latency_ms=elapsed,
feature_tag='customer-support-chat', # ← the key field
)
From zero to real-time cost tracking in under 5 minutes.
pip install costaraOne terminal command. No dependencies to configure, no infrastructure to provision. Works in any Python 3.8+ environment.
@costara.track(feature_tag="your_feature")Add the decorator to each LLM call with a feature label. Use any string that describes the product feature — 'chat_summarizer', 'doc_search', 'email_draft'.
costara.novahaven.techReal-time cost breakdowns by feature. Set budget alerts at 80% and 100% of your monthly limit. Costs grouped by provider, model, and feature.
Tag every LLM call with the product feature that triggered it. Costara groups and aggregates costs by tag — so you see exactly how much your customer-support chatbot costs vs your document summarizer vs your code-review bot. Per-feature cost visibility that no other tool gives you.
Cost by feature_tag — March 2026
Running OpenAI for some features and Anthropic for others? Mixing providers is smart — but tracking them separately is a nightmare. Costara gives you a single dashboard showing costs, tokens, and latency across all your providers. Switch models and see the cost delta instantly.
Provider overview — all projects
Set a monthly budget per project or per feature tag. Costara tracks your daily burn rate, projects whether you'll hit the limit, and sends a Slack or email alert at 80% and 100% of budget — before you breach it, not after. Optional hard-stop mode prevents overspend entirely.
Budget alerts
⚠️ Budget alert (80%): Project my-app has spent ₹1,20,000 of ₹1,50,000 this month.
Subject: Costara: my-app reached 100% budget limit
Costara captures token counts, costs, latency, and model names. It never sees your prompts or completions — ever. This isn't a settings toggle; it's how the SDK is built. Your data stays yours. Costara is safe to run in HIPAA-sensitive or otherwise privacy-critical applications.
What Costara captures
Planned pricing — all prices in INR, billed monthly. Subject to change before launch.
Planned pricing — launching soon. See full pricing & FAQ →
Install the Costara Python SDK with: pip install costara. Then import the tracker, initialize it with your API key, and wrap your LLM calls with the Costara decorator or context manager. Setup takes under 5 minutes.
No. Costara captures only metadata: the model name, token count, computed cost, timestamp, and your feature_tag label. Zero prompt or response content is stored or transmitted. This is a core architectural decision — privacy by design.
LangSmith is primarily an LLM tracing and evaluation platform. Costara focuses exclusively on cost observability and attribution. If you need to know which feature costs what, Costara gives you that answer with simpler setup and at a fraction of the price.
Langfuse requires self-hosting for full control. Costara is a fully managed SaaS — no infrastructure to maintain. Costara also focuses specifically on cost attribution rather than general LLM observability.
Datadog's LLM monitoring is part of their enterprise observability platform, typically costing $500+/month for meaningful usage. Costara starts free and the Pro plan is ₹2,499/month (~$30). It's purpose-built for AI cost tracking, not bolted onto a general infrastructure monitoring tool.
A feature_tag is a string label you attach to each LLM API call to identify which product feature triggered it. For example, you might use 'chat_summarizer', 'doc_search', or 'email_draft'. Costara aggregates all costs by feature_tag so you can see exactly which feature is driving your AI spending.
Join the waitlist and get early access. We'll reach out personally before we open the doors.
Join the waitlist and get early access. We'll reach out personally before we go live.