Skip to content

claude-3

claude-3 媒体宣传媲美 gpt-4

  • 2024.03.06 本站已经支持 claude-3-sonnet-20240229 claude-3-opus-20240229
  • 资费为官网5折 官方价格
  • 相关模型参数说明
  • 输入最大支持 120Ktokens,输出最大支持 4096(可考虑写长篇小说)
  • 如何使用 访问 https://claude-3.ddaiai.com 看下面的 在线测试
  • 支持模型 claude-3-sonnet-20240229 claude-3-opus-20240229 claude-3-5-sonnet-20240620 claude-3-haiku-20240307

在线测试

注意

1.访问 https://claude-3.ddaiai.com (如果被墙了,换下二级域名前缀 suibian)
2.如果发现被墙了 可以自己换地址 https://suibian.ddaiai.comsuibian 换其他的 如 https://2024.ddaiai.com 都能访问

设置

然后在下图相应的地方设置 OpenAi接口地址:https://api.openai-hk.com OpenAi API KEY: hk-你的apiKey

cover

效果

  • 将模型设置为 claude-3-opus-20240229
  • 输入框 提问对话 cover

Claude API

openai chat模式

已经跟openai接口对齐,仅需将模型修改下就好

shell
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "claude-3-sonnet-20240229",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [
        {
            "role": "system",
            "content": "You are Claude, a large language model trained by Anthropic. Answer as concisely as possible."
        },
        {
            "role": "user",
            "content": "你是谁请介绍下,你有哪些功能?"
        }
    ]
}'
curl --request POST \
  --url https://api.openai-hk.com/v1/chat/completions \
  --header 'Authorization: Bearer hk-你的key' \
  --header 'content-type: application/json' \
  --data '{
    "max_tokens": 800,
    "model": "claude-3-sonnet-20240229",
    "temperature": 0.8,
    "top_p": 1,
    "presence_penalty": 1,
    "stream":false,
    "messages": [
        {
            "role": "system",
            "content": "You are Claude, a large language model trained by Anthropic. Answer as concisely as possible."
        },
        {
            "role": "user",
            "content": "你是谁请介绍下,你有哪些功能?"
        }
    ]
}'

claude 原生模式

使用原生 /v1/messages 接口,参考官网

shell
curl https://api.openai-hk.com/v1/messages \
     --header "x-api-key: hk-your-key" \
     --header "anthropic-version: 2023-06-01" \
     --header "content-type: application/json" \
     --data \
'{
    "model": "claude-3-5-sonnet-20240620",
    "max_tokens": 1024,
    "messages": [
        {"role": "user", "content": "Hello, world"}
    ]
}'
curl https://api.openai-hk.com/v1/messages \
     --header "x-api-key: hk-your-key" \
     --header "anthropic-version: 2023-06-01" \
     --header "content-type: application/json" \
     --data \
'{
    "model": "claude-3-5-sonnet-20240620",
    "max_tokens": 1024,
    "messages": [
        {"role": "user", "content": "Hello, world"}
    ]
}'