Quickstart
Get a key, send a GPT, Claude or Gemini request at half the official price with your existing SDK, stream it, and see what it cost.
This page takes you from an empty account to a streamed answer and a line in your usage log. It uses the OpenAI SDK because most code already has it, but the same key works with the Anthropic and Google SDKs.
Get a key
Create an account, go to API keys and press New key. The key begins with
ho-and appears only this once, so copy it before closing the dialog.Keep it out of your source files by exporting it:
Shellexport HALFOFF_API_KEY="ho-..."You also need a positive balance. Top up from the dashboard with PayPal; see Billing.
Point your client at Half Off Dev
Point the client at
https://halfoff.dev/v1and pass your key. Nothing else in the call changes.Shellcurl https://halfoff.dev/v1/chat/completions \ -H "Authorization: Bearer $HALFOFF_API_KEY" \ -H "content-type: application/json" \ -d '{ "model": "gpt-6.1-sol", "messages": [{"role": "user", "content": "Explain a race condition in two sentences."}] }'Prefer the native SDKs? Claude through the Anthropic SDK is in Anthropic Messages, Gemini through the Google SDK in Gemini.
Stream tokens as they arrive
Set
streamto true and read the chunks. The event format is exactly what the vendor's own API sends.Shellcurl -N https://halfoff.dev/v1/chat/completions \ -H "Authorization: Bearer $HALFOFF_API_KEY" \ -H "content-type: application/json" \ -d '{"model": "gpt-6.1-sol", "stream": true, "messages": [{"role": "user", "content": "List the planets, one per line."}]}'More detail in Streaming.
See what you paid
Open Logs. Each call shows up within seconds with its input and output tokens, the amount charged, time to first token and tokens per second. Every response also has an
x-halfoff-request-idheader; quote it if you ever ask support about that call.
Finding model ids#
GET /v1/models needs no key and returns every model with its context window and price. The model list page shows the same data.
curl https://halfoff.dev/v1/modelsIds are matched loosely, so claude-sonnet-5.5, claude-sonnet-5-5 and anthropic/claude-sonnet-5.5 all reach the same model.