Skip to main content
Edgee provides complete visibility into your AI infrastructure with real-time metrics on costs, token usage, compression savings, performance, and errors. Every request is tracked and exportable for analysis, budgeting, and optimization.

In the Edgee Console

The Edgee Console provides a comprehensive view of your AI infrastructure with real-time metrics on costs, token usage, compression savings, performance, and errors.

Dashboard

The dashboard regroups everything in one place: costs, token usage, compression savings, performance, and errors.
Edgee dashboard

Logs

The logs page provides a comprehensive view of your AI infrastructure with real-time metrics on costs, token usage, compression savings, performance, and errors. It also allows you to debug individual requests and see the full request and response. See Debug Logs for details on enabling debug mode and inspecting request payloads.
Edgee logs

With our SDKs

Token Usage Tracking

Every Edgee response includes detailed token usage information for tracking and cost analysis:
const response = await edgee.send({
  model: 'gpt-5.2',
  input: 'Your prompt here',
});

console.log(response.usage.prompt_tokens); // Compressed input tokens
console.log(response.usage.completion_tokens); // Output tokens
console.log(response.usage.total_tokens); // Total for billing

// Compression savings (when applied)
if (response.compression) {
  console.log(response.compression.saved_tokens); // Tokens saved by compression
  console.log(response.compression.cost_savings); // Cost savings in micro-units (e.g. 27000 = $0.027)
  console.log(response.compression.reduction); // Percentage reduction (e.g. 48 = 48%)
  console.log(response.compression.time_ms); // Time taken for compression in milliseconds
}
Track usage by:
  • Model (GPT-5.2 vs Claude vs Gemini)
  • Project or application
  • Environment (production vs staging)
  • User or tenant (for multi-tenant apps)
  • Time period (daily, weekly, monthly)
Use token usage data with provider pricing to calculate costs. The Edgee dashboard automatically calculates costs based on real-time provider pricing.

Request Tags for Analytics

Tags allow you to categorize and label requests for filtering and grouping in your analytics dashboard. Add tags to track requests by environment, feature, user, team, or any custom dimension. Using tags in native SDKs:
import Edgee from 'edgee';

const edgee = new Edgee("your-api-key");

const response = await edgee.send({
  model: 'gpt-5.2',
  input: {
    messages: [{ role: 'user', content: 'Hello!' }],
    tags: ['production', 'chat-feature', 'user-123', 'team-backend']
  }
});
Using tags with OpenAI/Anthropic SDKs via headers: If you’re using the OpenAI or Anthropic SDKs with Edgee, add tags via the x-edgee-tags header (comma-separated):
import OpenAI from "openai";

const openai = new OpenAI({
  baseURL: "https://api.edgee.ai/v1",
  apiKey: process.env.EDGEE_API_KEY,
  defaultHeaders: {
    "x-edgee-tags": "production,chat-feature,user-123,team-backend"
  }
});
Common tagging strategies:

Environment taggingTag by environment: production, staging, development

Feature taggingTag by feature: chat, summarization, code-generation, rag-qa

User/tenant taggingTrack per-user or per-tenant usage: user-123, tenant-acme, customer-xyz

Team taggingOrganize by team: team-backend, team-frontend, team-data
Use tags consistently across your application to enable powerful filtering and cost attribution in your analytics dashboard. You can filter by multiple tags to drill down into specific segments (e.g., “production + chat-feature + team-backend”).

Compression Metrics

See exactly how much token compression is saving you on every request:
const response = await edgee.send({
  model: 'gpt-5.2',
  input: 'Long prompt with lots of context...',
  compression_model: "agentic",
});

// Compression details
if (response.compression) {
  console.log(response.compression.saved_tokens); // Tokens saved
  console.log(response.compression.cost_savings); // Cost savings in micro-units (e.g. 27000 = $0.027)
  console.log(response.compression.reduction); // Percentage reduction (e.g. 48 = 48%)
  console.log(response.compression.time_ms); // Time taken for compression in milliseconds
}