DOCS
Set the base URL
Create an account, pay with USDT, then point Claude Code, Codex, or the OpenAI SDK at Half API. Keep your client. Only the base URL and API key change. Use the same model names listed in the console.
Quickstart
- 1. Create an accountSign up with email and password in the console.
- 2. Pay with USDTMinimum top-up is $1. Credits are added when the payment completes. Crypto transfers are not refundable.
- 3. Create an API keyCopy the
sk-secret. Use a Claude key for Claude Code, or a GPT key for Codex and the OpenAI SDK. - 4. Set the base URLKeep your existing client. Change only the endpoint and the key.
Guides
Claude Code
Anthropic Messages API. Set
ANTHROPIC_BASE_URL to Half API.
Codex
OpenAI-compatible Codex. Put Half API in ~/.codex/config.toml.
OpenAI SDK
Python or Node. base_url is https://api.halfapi.com/v1.
Endpoints
| Client | Base URL |
|---|---|
| Claude Code / Anthropic | https://api.halfapi.com |
| Codex / OpenAI SDK | https://api.halfapi.com/v1 |
FAQ
- Codex base URL
- Set base_url to https://api.halfapi.com/v1 in ~/.codex/config.toml. Use a GPT key.
- Claude Code base URL
- Set ANTHROPIC_BASE_URL to https://api.halfapi.com with no /v1. Use a Claude key.
- OpenAI SDK base URL
- Set base_url to https://api.halfapi.com/v1. Use a GPT key.
- Payment
- Pay with USDT in the console. The minimum top-up is $1. Prices stay on the model market.
Console: app.halfapi.com. Model names: halfapi.com/models. Support: support@halfapi.com.