API Docs — HefuAI Platform
Get started with the OpenAI-compatible API: one key for all major models, with guides for Claude Code, Cursor, Codex, Cline, OpenClaw, Hermes, Cherry Studio and more.
Quickstart
curl https://hefu.hk/api/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "deepseek-v4-flash", "messages": [{"role": "user", "content": "Hello"}]}'
Endpoints
POST /api/v1/chat/completions— OpenAI-compatible chat completionsPOST /api/v1/messages— Anthropic-compatible messagesPOST /api/v1/responses— OpenAI Responses API (Codex)POST /api/v1/images/generations— Image generationPOST /api/v1/videos/generations · GET /api/v1/videos/tasks/{id}— Async video generation jobsPOST /api/v1/embeddings— Text embeddingsGET /api/v1/balance— Account balance query
Supported clients
- AI Coding: Claude Code, Codex, Cline, Cursor, Continue, Aider, OpenCode
- Agents: OpenClaw, Hermes Agent
- Desktop & Office: Cherry Studio, Chatbox, NextChat, LobeChat, Open WebUI, Dify
All clients connect with the same Base URL and one API key (OpenAI-compatible; Claude Code uses the Anthropic-compatible protocol).