Skip to main content
Get Fenra tracking your AI costs in three steps.
1

Get Your API Key

Sign in to app.fenra.io and navigate to Settings → API Keys. Click Create New Key, give it a name, and copy the key.
2

Send a Test Transaction

After your next AI provider call, send the usage data to Fenra:
curl -X POST 'https://api.fenra.io/ingest/usage' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -d '{
    "provider": "openai",
    "model": "gpt-4o",
    "usage": [{
      "type": "tokens",
      "metrics": {
        "input_tokens": 150,
        "output_tokens": 50,
        "total_tokens": 200
      }
    }],
    "context": {
      "billable_customer_id": "my-company"
    }
  }'
A successful response returns 202 Accepted:
{
  "status": "queued",
  "events_queued": 1,
  "message": "1 transaction(s) queued for processing"
}
3

See It in Your Dashboard

Head back to app.fenra.io. Your transaction appears in the dashboard within seconds, with costs automatically calculated.

Transaction Schema

Every transaction needs:
FieldRequiredDescription
providerYesopenai, anthropic, gemini, bedrock, xai, deepseek, or custom
modelYesModel identifier (e.g., gpt-4o, claude-3-5-sonnet-20241022)
usageYesWhat resources the AI call consumed: tokens for text, images for image generation, etc.
context.billable_customer_idYesRequired identifier for billing/grouping

Context

The context object only requires billable_customer_id. You can add any other fields you want. They will appear in your dashboard and can be used for filtering, alerts, and reports. See the Transactions Guide for examples of useful context fields.

Next Steps