Skip to main content
Use the custom logging endpoint to log any operation to Helicone - database queries, API calls, ML inference, or any other operation you want to track.

Example

Understanding the Structure

All custom logs have three main parts:

1. Provider Request

What you’re about to do. Must include:
  • url: "custom-model-nopath" - Required for custom logs
  • json._type: "data" - Identifies this as a custom data log
  • json.name - A descriptive name for your operation
  • Any custom fields you want to track (query, endpoint, model, etc.)

2. Provider Response

What happened. Should include:
  • json._type: "data" - Identifies this as a custom data response
  • json.name - Same name as the request
  • json.status - Success or error state
  • status - HTTP status code (typically 200)
  • Any result data you want to track

3. Timing

When it happened:
  • startTime - When the operation began (Unix epoch)
  • endTime - When the operation completed (Unix epoch)

Examples

Database Query

External API Call

ML Model Inference

API Reference

Endpoint

Note: The endpoint may vary depending on your Helicone setup:
  • US: https://api.us.helicone.ai/custom/v1/log
  • Elsewhere: https://api.helicone.ai/custom/v1/log

Headers

Request Body