Authentication
Claude Api.Tech uses the same authentication method as the official Anthropic API — API key passed in the x-api-key header. The only difference is the base URL.
Key format
Claude Api.Tech keys start with sk-cs2- (official Anthropic keys start with sk-ant-). Do not confuse them.
Endpoints
| Type | Base URL |
|---|---|
| Anthropic (native) | https://api3.claudeapitech.com |
| OpenAI-compatible | https://api3.claudeapitech.com/v1 |
Required Headers
| Header | Value | Required |
|---|---|---|
| x-api-key | sk-cs2-... | Yes |
| anthropic-version | 2023-06-01 | Yes |
| content-type | application/json | Yes |
| anthropic-beta | e.g. interleaved-thinking-2025-05-14 | No (for beta features) |
Environment Variable (Recommended)
Never hardcode your API key. Use environment variables:
.env
ANTHROPIC_API_KEY=sk-cs2-xxxxxxxxxxxxxxxxxxxx ANTHROPIC_BASE_URL=https://api3.claudeapitech.com
Python
import os
import anthropic
client = anthropic.Anthropic(
api_key=os.environ["ANTHROPIC_API_KEY"],
base_url=os.environ["ANTHROPIC_BASE_URL"]
)Using with OpenAI SDK
If your project uses the OpenAI SDK, use the OpenAI-compatible endpoint:
Python (openai SDK)
from openai import OpenAI
client = OpenAI(
api_key="sk-cs2-...",
base_url="https://api3.claudeapitech.com/v1"
)
response = client.chat.completions.create(
model="claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello!"}]
)