Skip to content

Claude-compatible API ​

For the official Claude SDK, Claude Code, and other clients that speak the Anthropic Messages format.

text
POST https://uni.sointech.com.cn/v1/messages

This is not chat completions. Chat completions use OpenAI's /v1/chat/completions. Claude clients should use this API. Use a Claude model name published on the site, such as claude-sonnet-4-6. The catalog is the list that matters.

Request ​

Send either key header:

HeaderValue
x-api-keysk-your-token
AuthorizationBearer sk-your-token
anthropic-version2023-06-01
Content-Typeapplication/json

Common body fields:

FieldMeaning
modelClaude model name
max_tokensMaximum tokens to generate. This format requires the field
messagesArray of messages with role and content
streamOptional. true returns a server-sent event stream
bash
curl https://uni.sointech.com.cn/v1/messages \
  -H "x-api-key: sk-your-token" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d "{\"model\":\"claude-sonnet-4-6\",\"max_tokens\":1024,\"messages\":[{\"role\":\"user\",\"content\":\"Introduce yourself in one sentence\"}]}"

Response ​

Text is in the content array. Read content[0].text for a text block. Usage is in usage. The charge still follows that model's rule in the catalog.

SDK ​

Set base_url to the site origin. The SDK requests /v1/messages itself.

python
import anthropic

client = anthropic.Anthropic(
    api_key="sk-your-token",
    base_url="https://uni.sointech.com.cn",
)

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Introduce yourself in one sentence"}],
)
print(message.content[0].text)

Install the package with pip install anthropic.

Claude Code uses the same origin:

bash
export ANTHROPIC_BASE_URL=https://uni.sointech.com.cn
export ANTHROPIC_API_KEY=sk-your-token

If the request URL becomes /v1/v1/messages, remove the extra /v1 from base_url.

Prices are whatever the model catalog shows at request time.