Set up Respan
Set up Respan
- Sign up — Create an account at platform.respan.ai
- Create an API key — Generate one on the API keys page
- Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Overview
“How much does our summarization feature cost?” “Which users are the most expensive?” These questions are hard to answer when all your LLM calls look the same in billing. This cookbook shows how to tag requests with metadata so you can break down costs by feature, user, team, or any dimension you care about.Tag requests with metadata
Addmetadata and customer_identifier to every LLM call:
Recommended metadata schema
Be consistent across your codebase. Here’s a practical schema:| Key | Purpose | Examples |
|---|---|---|
feature | Which product feature made the call | "summarization", "chat", "search" |
team | Which team owns this feature | "content", "support", "product" |
environment | Deployment environment | "production", "staging" |
version | Feature or prompt version | "v2", "2024-01" |
Create a helper function
Centralize your metadata tagging so it’s consistent:Analyze costs on the dashboard
Once your requests are tagged, go to the Dashboard:- Cost by feature: Filter by
metadata.featureto see cost per feature over time - Cost by user: Go to Users to see total cost per customer
- Cost by model: Use model breakdown to see which models drive the most spend
- Custom views: Create saved views with preset filters for recurring cost analysis
Set user budgets
For per-user cost control, set budgets on individual customers:429 status. See User budgets for details.