Half APIHalf API
USDT Top up from $1. Group prices are on the model market.

HALF API / MODEL GATEWAY

GPT, Codex, and Claude Code.
Same models. Your client.

Official models. Same names, the client you already run. Codex and the OpenAI SDK use https://api.halfapi.com/v1. Claude Code uses https://api.halfapi.com. Pay with USDT from $1.

  • 01 / Same model names
  • 02 / USDT from $1
  • 03 / Change the base URL
Drop into the tools you already use Claude Code Codex OpenAI SDK

MODELS

Claude, Codex, Gemini, Grok, and China models.

Keep Claude Code, Codex, or the OpenAI SDK. Change the base URL. Model names are on the models page. Prices stay on the model market.

Open console
ANTHROPIC

Claude

Messages API and Claude Code.

OPENAI

Codex and GPT

Codex and chat completions.

GEMINI · GROK

Gemini and Grok

Gemini and Grok, each on its own group.

CHINA

China models

China models, then DeepSeek, Kimi, and GLM on their own groups.

QUICKSTART

A few lines. Then you call.

Use the OpenAI or Anthropic interface. Model names follow the console list.

  1. 01 Create an account
  2. 02 Create a key
  3. 03 Point the client
POST /v1/chat/completionsapi.halfapi.com
curl https://api.halfapi.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "YOUR_MODEL",
    "messages": [
      {"role": "user", "content": "ping"}
    ]
  }'

FAQ

Base URL, keys, and payment

What is the Codex base URL?
Set base_url to https://api.halfapi.com/v1 in ~/.codex/config.toml. Use a GPT key. The env key name is HALFAPI_KEY.
What is the Claude Code base URL?
Set ANTHROPIC_BASE_URL to https://api.halfapi.com with no /v1. Use a Claude key in ANTHROPIC_API_KEY.
What is the OpenAI SDK base URL?
Set base_url to https://api.halfapi.com/v1 in the OpenAI Python or Node SDK. Use a GPT key.
How do I pay?
Pay with USDT in the console. The minimum top-up is $1. Prices stay on the model market.
Do model names change?
Use the same model names listed on the models page and in the console.