claude-haiku-4-5

由 Anthropic 提供文本

用结构化 Messages 请求调用 Claude Haiku 4.5,处理长对话、推理、编程和写作。

更新于:
输入提示词messages
模型15款可用
返回方式同步结果链接
价格官方定价按上游公开价
claude-haiku-4-5对话示例
你

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a claude-haiku-4-5 integration.

claude-haiku-4-5 标志
claude-haiku-4-5

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the claude-haiku-4-5 model page.

生成示例

请求与回复示例

01 · 代码审查claude-haiku-4-5
你

Review a TypeScript webhook handler for reliability risks and propose the highest-value fixes. Keep the answer practical for a claude-haiku-4-5 integration.

claude-haiku-4-5 标志
claude-haiku-4-5

Verify signatures against the raw body, reject stale events, deduplicate by event ID, acknowledge quickly, and move slow work to a retried background queue. This example is tailored to the claude-haiku-4-5 model page.

02 · 查询设计claude-haiku-4-5
你

Explain how to choose indexes for a job table filtered by owner, status, and creation time. Keep the answer practical for a claude-haiku-4-5 integration.

claude-haiku-4-5 标志
claude-haiku-4-5

Begin from the most common filter order, use a composite index that supports the leading predicates, measure the actual query plan, and retain a simple retention strategy for old rows. This example is tailored to the claude-haiku-4-5 model page.

03 · 产品简报claude-haiku-4-5
你

Summarize a product brief for a developer API in five concise bullets. Keep the answer practical for a claude-haiku-4-5 integration.

claude-haiku-4-5 标志
claude-haiku-4-5

Cover the customer problem, primary workflow, integration surface, pricing or quota rule, and the measurable outcome that defines adoption. This example is tailored to the claude-haiku-4-5 model page.

模型能力

claude-haiku-4-5 能做什么

根据提示词生成

提交简洁的提示词,通过一个 TTAPI 任务获取回复。

常用参数

设置提示词、模型、输出参数和回调即可接入。

异步查询

通过轮询或 Webhook 接收结果,避免耗时生成阻塞界面。

接入产品

Claude 的输出可以展示、保存或交给后续流程处理。

计费

按 token 计费

支持的文本模型共用 API 密钥和账户余额。

token 计费规则官方定价
平台TTAPI 计费
Claude官方定价
API 请求

请求头与提交参数

使用 TTAPI 密钥,按下方字段向接口发送请求。

POSThttps://api.ttapi.io/v1/messages

请求头

x-api-keystring必填

填写 TTAPI API 密钥。

Content-Typestring必填

使用 application/json。

请求体

modelstring必填

填写支持的 Claude 模型 ID。

messagesarray必填

Anthropic Messages 格式的对话消息。

max_tokensinteger必填

生成 token 的上限。

systemstring选填

发给助手的系统指令。

temperaturenumber选填

采样温度。

streamboolean选填

启用流式响应。

查看 TTAPI 接入文档
接入示例

发送请求并获取结果

复制当前模型的请求地址、鉴权请求头和请求体。

curl --request POST \
  --url https://api.ttapi.io/v1/messages \
  --header "x-api-key: $TTAPI_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"model":"claude-haiku-4-5","messages":[{"role":"user","content":"Explain quantum entanglement simply."}],"max_tokens":1024}'