Skip to main content
The Fenra API provides programmatic access to track AI usage and costs. Send transaction data from your AI provider API calls to get comprehensive analytics and cost tracking.

Base URL

All API requests should be made to:
https://api.fenra.io

Authentication

All API endpoints require authentication using an API key in the X-Api-Key header.

Getting an API Key

To obtain an API key:
  1. Log in to your Fenra dashboard
  2. Navigate to Organization SettingsAPI Keys
  3. Click “Create New Key”
  4. Copy and securely store the key

How to Obtain an API Key

Step-by-step guide to creating and managing API keys
API keys are only displayed once when created. Make sure to copy and store your key securely.

Using Your API Key

Include your API key in the X-Api-Key header for all API requests:
const response = await fetch('https://api.fenra.io/ingest/usage', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': process.env.FENRA_API_KEY
  },
  body: JSON.stringify(transactionData)
});

Request Format

The API accepts JSON request bodies. All requests must include:
  • Content-Type header - Set to application/json
  • X-Api-Key header - Your API key for authentication
  • Valid JSON body - Properly formatted JSON matching the API schema

Rate Limiting

The API is designed for high-throughput scenarios:
  • No explicit rate limits - The ingestion API handles high volume efficiently
  • Asynchronous processing - Transactions are queued immediately for processing
  • Bulk requests - Send multiple transactions in a single request for better performance

OpenAPI Specification

The complete API specification is available in OpenAPI 3.0 format:

OpenAPI Specification

View the complete OpenAPI specification file