跳转到主要内容

Documentation Index

Fetch the complete documentation index at: https://docs.omniakey.com/llms.txt

Use this file to discover all available pages before exploring further.

Claude Code 可以通过 OmniaKey 调用 Claude 模型。把 Anthropic base URL 设置为 https://api.omniakey.com,并把你的 OmniaKey API key 填到认证变量里即可。
Claude Code 的 base URL 不要加 /v1。Claude Code 和 Anthropic SDK 会自动拼接 /v1/messages

直接答案

export ANTHROPIC_BASE_URL="https://api.omniakey.com"
export ANTHROPIC_AUTH_TOKEN="your-omniakey-api-key"
claude

第 1 步:创建 OmniaKey API key

打开 API Keys dashboard,为本机或 CI 环境创建一把 key,并复制保存。

第 2 步:设置 Claude Code 环境变量

Claude Code 使用 Anthropic Messages API。OmniaKey 的 Anthropic 兼容入口是裸域名:
export ANTHROPIC_BASE_URL="https://api.omniakey.com"
export ANTHROPIC_AUTH_TOKEN="your-omniakey-api-key"
claude

第 3 步:选择 Claude 模型

支持模型 复制模型 id,例如 claude-opus-4-8claude-sonnet-4-6claude-haiku-4-5。你请求的模型 id 就是实际运行的模型。

常见问题

Claude Code 应该使用什么 base URL?

使用 https://api.omniakey.com,不要加 /v1

认证变量应该填哪个?

把 OmniaKey API key 填到 ANTHROPIC_AUTH_TOKEN

OmniaKey 会替换 Claude 模型吗?

不会。OmniaKey 不会静默替换、量化或蒸馏模型。