Skip to main content
OpenAI supports two CostHawk integration modes. Use an OpenAI organization admin key for low-friction reporting.
  • Endpoint coverage:
    • /v1/organization/usage/completions
    • /v1/organization/costs
  • No app code changes required
  • Best for quick organization-wide visibility

Admin API Setup

Use this first for reporting coverage.

Mode B: Proxy + Wrapped Key (Advanced controls)

Use proxy routing when you need strict runtime controls and enforcement.
A wrapped key only works against the CostHawk proxy. Do not send ch_sk_... directly to api.openai.com.
If you are not sure whether you have a wrapped key or a CostHawk access token, read Wrapped Keys first.

Proxy URL

This replaces https://api.openai.com/v1/chat/completions.

Python (OpenAI SDK)

Node.js (OpenAI SDK)

curl

  1. Start with Admin API sync for baseline visibility.
  2. Keep MCP enabled for assistant-native analysis and operations.
  3. Add proxy routing for workloads that need policy enforcement or hard-stop limits.