AI API Hub
AI API Hub
  • 模型广场
AI API Hub

让企业用 AI,像用水电一样简单

更多链接
模型广场控制台API Keys用量查询
AI API Hub. 保留所有权利|隐私政策|服务条款
C

anthropic/claude-sonnet-4

发布时间

-

模型系列

Claude

输入模态

输出模态

输入价格

¥0 / 1M tokens

输出价格

¥0 / 1M tokens

缓存写入价格

¥0 / 1M tokens

缓存读取价格

¥0 / 1M tokens

上下文窗口

128,000

最大输出长度

128,000

anthropic 最新的功能最强大的多模态模型,支持文本、图片输入,适用于复杂、多步骤的任务

anthropic/claude-sonnet-4的供应商

AI API Hub 根据调度策略向最合适的供应商发起请求,并自动回退至可用性最高的供应商。

排序
亚
亚马逊 Amazon AWS
国外

首字延迟

3.60s

吞吐量

70.31tps

可用性

89.00%

供应商模型名

amazon/claude-sonnet-4

支持的参数

近期可用性

10月16日 4 PM暂无数据
暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据暂无数据

推理

-

支持的响应格式

OpenAI Chat CompletionsOpenAI ResponsesAnthropic MessagesGoogle VertexAI

上下文长度

128,000

最大输出

128,000

输入价格

¥0 / 1M tokens

输出价格

¥0 / 1M tokens

缓存写入

¥0 / 1M tokens

缓存读取

¥0 / 1M tokens

anthropic/claude-sonnet-4的性能

在AI API Hub 上对比不同供应商的表现

吞吐量

75.84 tok/s

首字延迟

3.48 s

anthropic/claude-sonnet-4的可用性

anthropic/claude-sonnet-4的各供应商可用性

暂无数据

anthropic/claude-sonnet-4示例代码与 API

获取 API Key

AI API Hub 为您统一各供应商的请求与响应格式

当前模型可能不支持 OpenAI Chat Completions 协议,请注意
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.aiapihub.ai/v1",
  apiKey: process.env.AI_API_HUB_API_KEY,
});

const response = await client.chat.completions.create({
  model: "anthropic/claude-sonnet-4",
  messages: [
    { role: "user", content: "Hello, how are you?" }
  ],
  temperature: 0.7,
  max_tokens: 1000,
});

console.log(response.choices[0].message.content);