Link business requests, gateway calls, and support tickets.
Recommended headers
| Header | Purpose | Limit |
|---|---|---|
x-trace-id | Your trace id (UUID, snowflake, …) | Truncated to 256 chars |
x-user-id | End-user id in your product | 512 chars |
x-agent-name | Calling agent or service | 512 chars |
Example:
curl -sS "https://51kik.com/v1/chat/completions" \
-H "Authorization: Bearer $API_KEY" \
-H "x-trace-id: order-2024-0001" \
-H "x-user-id: user_abc" \
-H "x-agent-name: billing-bot" \
-H "Content-Type: application/json" \
-d '{"model":"YOUR_MODEL_ID","messages":[{"role":"user","content":"hi"}]}'
The gateway stores these fields on usage records (console UI per product).
Anthropic surface
Same headers apply. Error bodies also include request_id:
{ "request_id": "req_..." }
Provide both x-trace-id and request_id to support.
Logging
trace_id=order-2024-0001 gateway_status=200 model=vendor/model latency_ms=1234
Do not log full API keys or raw user prompts unless policy requires redaction.