Skip to content
English

Quick Start

Create a 1zheai API key, make your first Claude / GPT call with curl or an SDK, then connect it to your favorite clients.

Goal: get an API key within 5 minutes and complete your first Claude or GPT request.

  1. Sign up and top up

    Open 1zheai.com/register to register. Calls deduct from your balance as you go, so you need to top up first. Balance is denominated in USD; WeChat Pay, Alipay, Stripe (bank card) and USDT are supported — the exact methods and amount limits are subject to the wallet order page. Within 7 days of topping up you can request a refund of unused principal to the original payment method; consumed amounts and payment processing service fees are non-refundable. See Top-ups, Refunds and Invoices for the rules.

  2. Create an API key

    Go to the Console, click “API Keys” in the left sidebar, then click “Create API Key” in the top right, give it a name and save. API keys start with sk- — click the copy icon in the list to copy and store it. Details in Getting and Managing API Keys.

  3. Send your first request

    Put the API key into an environment variable, then call the Anthropic native endpoint once with curl:

    macOS / Linux
    export ONEZHE_API_KEY="sk-你的Key"
    curl https://1zheai.com/v1/messages \
    -H "x-api-key: $ONEZHE_API_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "content-type: application/json" \
    -d '{
    "model": "claude-sonnet-5-5",
    "max_tokens": 128,
    "messages": [{"role": "user", "content": "用一句话解释什么是 HTTP"}]
    }'

    ONEZHE_API_KEY is just an example variable name — any name works.

  4. Inspect the response

    On success you get HTTP 200 with a structure identical to the official one. Focus on two things: whether model is the model you requested, and the token counts in usage. Below is an actual response measured on 2026-10-15:

    json
    {
    "model": "claude-sonnet-5-5",
    "id": "msg_011Cg3G8HQmyTrnqSBX6o6Pw",
    "type": "message",
    "role": "assistant",
    "content": [
    {
    "type": "text",
    "text": "HTTP(超文本传输协议)是一种基于请求-响应模式的应用层协议,用于在客户端(如浏览器)和服务器之间传输网页、图片、API 数据等内容。"
    }
    ],
    "container": null,
    "stop_reason": "end_turn",
    "stop_sequence": null,
    "stop_details": null,
    "usage": {
    "input_tokens": 530,
    "cache_creation_input_tokens": 0,
    "cache_read_input_tokens": 0,
    "cache_creation": {
    "ephemeral_5m_input_tokens": 0,
    "ephemeral_1h_input_tokens": 0
    },
    "output_tokens": 69,
    "output_tokens_details": {"thinking_tokens": 0},
    "service_tier": "standard",
    "inference_geo": "global"
    },
    "input_transformations": [],
    "diagnostics": null,
    "context_management": {"applied_edits": []}
    }

    input_tokens is a few hundred more than the question itself — that’s the system prompt attached by this kind of client (curl, SDK, third-party tools) on every request, billed as input; Claude Code does not attach one, see Billing for System Prompts.

    Then go to “Call Logs” on the left of the console to see this call: time, the API key used (the “Token” column), model, input / output tokens, cache read/write and cost.

If you use the OpenAI SDK or plan to integrate Codex, you can choose the GPT protocol directly. Set the ONEZHE_API_KEY above in the same terminal first, then run:

bash
curl --fail-with-body https://1zheai.com/v1/chat/completions \
-H "Authorization: Bearer $ONEZHE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.6-sol","messages":[{"role":"user","content":"用一句话解释 HTTP。"}]}'

This is a macOS / Linux shell example; on Windows you can run the cross-platform Python / Node.js example directly. Text goes in choices[0].message.content; if the model is not in your list, first query available models. Codex requires Responses — follow the Codex configuration tutorial to integrate.

Connect it to your favorite tools:

If a request fails, first check Error Codes and Troubleshooting. To verify returned fields and usage, see Verifying Models and Usage.