When building AI applications, you often need to track and analyze requests by different dimensions like project, feature, or workflow stage. Custom Properties let you tag LLM requests with metadata, enabling advanced filtering, cost analysis per user or feature, and performance tracking across different parts of your application.
Helicone Custom Properties feature for filtering and segmenting data in the Request table.

Custom Properties appear as headers in the `Request` table.

Why use Custom Properties

  • Track unit economics: Calculate cost per user, conversation, or feature to understand your application’s profitability
  • Debug complex workflows: Group related requests in multi-step AI processes for easier troubleshooting
  • Analyze performance by segment: Compare latency and costs across different user types, features, or environments

Quick Start

Use headers to add Custom Properties to your LLM requests.
1

Define the Header

Name your header in the format Helicone-Property-[Name] where Name is the name of your custom property.
2

Define the Value

The value is a string that labels your request for this custom property. Here are some examples:
import { OpenAI } from "openai";

const client = new OpenAI({
  baseURL: "https://ai-gateway.helicone.ai",
  apiKey: process.env.HELICONE_API_KEY,
  defaultHeaders: {
    "Helicone-Property-Conversation": "support_issue_2",
    "Helicone-Property-App": "mobile",
    "Helicone-Property-Environment": "production",
  },
});

const response = await client.chat.completions.create({
  model: "gpt-4o-mini",
  messages: [{ role: "user", content: "Hello, how are you?" }]
});

Understanding Custom Properties

How Properties Work

Custom properties are metadata attached to each request that help you: What they enable:
  • Filter requests in the dashboard by any property
  • Calculate costs and metrics grouped by properties
  • Export data segmented by custom dimensions
  • Set up alerts based on property values

Use Cases

Track performance and costs across different environments and deployments:
import { OpenAI } from "openai";

const client = new OpenAI({
  baseURL: "https://ai-gateway.helicone.ai",
  apiKey: process.env.HELICONE_API_KEY,
});

// Production deployment
const response = await client.chat.completions.create(
  {
    model: "gpt-4o-mini",
    messages: [{ role: "user", content: "Process this customer request" }]
  },
  {
    headers: {
      "Helicone-Property-Environment": "production",
      "Helicone-Property-Version": "v2.1.0",
      "Helicone-Property-Region": "us-east-1"
    }
  }
);

// Staging deployment with different version
const testResponse = await client.chat.completions.create(
  {
    model: "gpt-4o-mini", 
    messages: [{ role: "user", content: "Test new feature" }]
  },
  {
    headers: {
      "Helicone-Property-Environment": "staging",
      "Helicone-Property-Version": "v2.2.0-beta",
      "Helicone-Property-Region": "us-west-2"
    }
  }
);

// Compare performance and costs across environments

Configuration Reference

Header Format

Custom properties use a simple header-based format:
Helicone-Property-[Name]
string
Any custom metadata you want to track. Replace [Name] with your property name.Example: Helicone-Property-Environment: staging
Helicone-User-Id
string
Special reserved property for user tracking. Enables per-user cost analytics and usage metrics. See User Metrics for detailed tracking capabilities.Example: Helicone-User-Id: user-123

Advanced Features

Updating Properties After Request

You can update properties after a request is made using the REST API:
// Get the request ID from the response
const { data, response } = await client.chat.completions
  .create({ /* your request */ })
  .withResponse();

const requestId = response.headers.get("helicone-id");

// Update properties via API
await fetch(`https://api.helicone.ai/v1/request/${requestId}/property`, {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${HELICONE_API_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "Environment": "production",
    "PostProcessed": "true"
  })
});