Coolhand LLM Request Logging API (v2)
LLM Request Logging API Documentation.
This API allows clients to log and store request/response data from Large Language Model (LLM) API calls for monitoring, analysis, and debugging purposes. The API accepts any JSON structure in the raw_request field, making it flexible for different LLM providers and use cases.
API uses API Key authentication. Clients are issued unique API keys that must be included in requests using one of these methods:
- X-API-Key header:
X-API-Key: your_api_key_here - Authorization Bearer header:
Authorization: Bearer your_api_key_here
Contact your administrator to obtain an API key.
Every client is issued two independent keys:
- Public key (
ch_pub_...) — safe to embed in SDK setup snippets, agent-facing code, or anywhere else it might be exposed to an end user. It only permits ingest-style writes (e.g. logging a new request, submitting feedback) — it cannot read back any data. - Private key (
ch_priv_...) — required for read endpoints and other sensitive operations (e.g. optimization evidence links). Never embed a private key in client-side or agent-facing code; treat it like a server-side secret.
Each endpoint below documents which key type(s) it accepts. Endpoints that require a private key are marked accordingly.
Log requests and responses from OpenAI's chat completions, embeddings, and other endpoints.
Store conversation data and model responses from Claude API calls.
The flexible JSON structure supports any LLM provider's request/response format.
Aggregate usage statistics, token consumption, and performance metrics across LLM calls.
When interacting with the LLM Request Logging API, you'll encounter standard error response formats for different types of failures.
Understanding the HTTP status codes for this API:
| HTTP Status Code | Description |
|---|---|
201 Created | LLM request log successfully created |
400 Bad Request | Malformed request or invalid JSON structure |
401 Unauthorized | Missing, invalid, or expired API key |
422 Unprocessable Entity | Validation error - required fields missing or invalid format |
5xx Server Errors | Server-side issues - please report these for investigation |