Skip to main content
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page
Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.
{
  "mcpServers": {
    "respan-docs": {
      "url": "https://docs.respan.ai/mcp"
    }
  }
}
Respan’s Users page lets you track per-user LLM usage, set budgets, and apply rate limits. Pass a customer_identifier with your logs or traces to enable user analytics.
Users Page

Enable user analytics

Pass customer_params to associate logs and traces with a user.
import requests

url = "https://api.respan.ai/api/request-logs/"
payload = {
    "model": "gpt-4o-mini",
    "input": [{"role": "user", "content": "Hi"}],
    "output": {"role": "assistant", "content": "Hello!"},
    "customer_params": {
        "customer_identifier": "customer_1",
        "name": "Hendrix Liu",
        "email": "hendrix@respan.ai"
    }
}
headers = {
    "Authorization": "Bearer YOUR_RESPAN_API_KEY",
    "Content-Type": "application/json"
}
response = requests.post(url, headers=headers, json=payload)
See Log fields & parameters for all available fields.

See user data on the platform

After you pass customer_identifier, user data appears in 3 places: 1. Users page — per-user detail and LLM usage.
Users Page
2. Dashboard — top users, daily active users, cost by user.
Dashboard user metrics
3. Logs page — filter logs by user identifier.
Logs user filter
You can also create users via the User Creation endpoint without sending a log.

Rate limits

This feature is only available for AI gateway users.
Set a per-user rate limit (requests per minute) to prevent abuse. Pass rate_limit inside customer_params:
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={
        "customer_params": {
            "customer_identifier": "customer_1",
            "rate_limit": 100  # requests per minute
        }
    }
)

Budgets

Only available for users using the LLM Gateway.
Set spending limits per user by passing budget parameters inside customer_params:
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
    extra_body={
        "customer_params": {
            "customer_identifier": "customer_1",
            "budget_duration": "monthly",
            "period_budget": 1000,
            "total_budget": 10000
        }
    }
)

Budget parameters

ParameterTypeDescription
budget_durationstringyearly, monthly, weekly, or daily
period_budgetfloatBudget limit for the current period (USD)
total_budgetfloatLifetime budget limit (USD)
period_startstringCustom period start (YYYY-MM-DD). Defaults to today.
period_endstringCustom period end (YYYY-MM-DD). Auto-calculated from budget_duration if omitted.
markup_percentagefloatMarkup percentage applied to usage reports for this user
You can use period_start and period_end instead of budget_duration for custom budget periods.
You can also set budgets via the User Update endpoint or the User Creation endpoint.