Claude/claude-sonnet-4-6-fast
Claude Sonnet 4.6 在 Sonnet 系列的均衡定位上进一步提升复杂任务处理能力,适合更长上下文分析、严谨写作、代码审查、方案推演和多轮任务执行。它适合希望在成本和效果之间取得更高质量平衡的场景。
Output
Send a message on the left. The reply appears here.
Pricing
This model is priced by the usage dimensions listed here. Compare all pricing.
List prices in USD. Your effective price also depends on the billing group attached to your API key.
claude-sonnet-4-6-fastclaude-sonnet-4-6-fastclaude-sonnet-4-6-fastclaude-sonnet-4-6-fastAPI
/v1/messagesconst BASE_URL = "https://api.dreamtoai.com";
const API_KEY = process.env.MIX_API_KEY;
const headers = {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
};
const payload = {
"model": "claude-sonnet-4-6-fast",
"messages": [
{
"content": "你好,世界",
"role": "user"
}
],
"system_instruction": "请用简洁中文回答。",
"max_tokens": 4096,
"temperature": 0.7,
"top_p": 0.95,
"top_k": 40,
"thinking": {
"budget_tokens": 1024,
"type": "enabled"
},
"tools": [],
"tool_choice": "auto",
"stream": false
};
const submit = await fetch(`${BASE_URL}/v1/jobs`, {
method: "POST",
headers,
body: JSON.stringify(payload),
}).then((r) => r.json());
const status = await fetch(`${BASE_URL}/v1/jobs/${submit.id}`, { headers })
.then((r) => r.json());
console.log(status);
Create a key in Console → API Keys and replace the placeholder in the sample.
README
claude-sonnet-4-6-fast
Claude Sonnet 4.6 在 Sonnet 系列的均衡定位上进一步提升复杂任务处理能力,适合更长上下文分析、严谨写作、代码审查、方案推演和多轮任务执行。它适合希望在成本和效果之间取得更高质量平衡的场景。
Why Choose This?
- Language and reasoning
- Handles writing, analysis, coding and multi-turn conversation in one model.
- Pay per token
- $0.45 per 1M input tokens and $2.25 per 1M output tokens, with no subscription.
- Prompt caching
- Cached input is billed at $0.04 per 1M tokens, which cuts the cost of repeated context.
- Works with your existing SDK
- Call it in the Anthropic Messages / OpenAI Chat Completions format, so existing clients only need a new base URL and key.
- One key for every model
- The same API key works for every model on dreamtoai.
Parameters
| Parameter | Required | Description |
|---|---|---|
messagesarray | Required | Conversation history as a list of role and content messages. |
system_instructionstring | Optional | Instructions that set the assistant behavior. |
max_tokensinteger | Optional | Maximum number of tokens to generate. Default: 4096. |
temperaturenumber | Optional | Sampling temperature. Lower is more focused, higher is more varied. |
top_pnumber | Optional | Nucleus sampling threshold. |
top_kinteger | Optional | Top K |
thinkingobject | Optional | 扩展思考 |
toolsarray | Optional | 工具列表 |
tool_choicestring | Optional | 工具选择 |
streamboolean | Optional | Stream the reply as server-sent events. Default: false. |
How to Use
- Try it here first — Sign in and run the model in the playground above to check the output before you write code.
- Create an API key — Open Console → API Keys and create a key. The same key works for every model.
- Write your messages — Put the task and its context in the messages array; add a system prompt to set the assistant behavior.
- Set optional parameters — Adjust the optional parameters listed above to control the output.
- Send the request — Call POST /v1/messages with the model ID claude-sonnet-4-6-fast.
- Read the reply — The reply and its token usage come back in the response and are logged in the console.
Writing Effective Prompts
Clear instructions get better answers. Tell the model who it is, what you need and how the answer should look.
1. Set the role and goal
Open with who the model should act as and what the task is. Put rules that never change in the system prompt.
You are a senior Python reviewer. Review the function below for bugs and readability.
2. Give the context
Paste what the answer depends on: documents, code, data or earlier decisions. Separate each part with a heading or tag.
3. Specify the output
Name the format, length and tone: a table, JSON with given keys, five bullet points, a 200-word summary.
4. Show an example
One or two input and output examples fix the style faster than a long description.
5. Iterate
When an answer misses, add the missing constraint to the prompt instead of starting over.
| Prompt | |
|---|---|
| Weak | Write about our product. |
| Strong | You are a B2B copywriter. Write three 40-word LinkedIn posts announcing our invoicing API for small accounting firms. Tone: confident, plain English, no emojis. End each post with a question. |
Pricing
| Billing item | Price | Official price |
|---|---|---|
| 输入token | $0.45 per 1M | |
| 输出token | $2.25 per 1M | |
| 缓存读token | $0.045 per 1M | |
| 缓存写token | $0.5625 per 1M |
That is 85% below the official list price.
Example: a request with 10,000 input tokens and 1,000 output tokens costs about $0.0067.
List prices in USD. Your effective price also depends on the billing group attached to your API key. Compare all pricing
Best Use Cases
- Coding assistants — Generate, review and refactor code, or explain an unfamiliar codebase.
- Agents and automation — Plan multi-step tasks and call tools from your own workflows.
- Knowledge work — Summarize reports, draft documents and answer questions over your own content.
- Customer support — Power help-desk bots and draft replies in a consistent tone.
- Data extraction — Turn unstructured text into structured JSON for downstream systems.
- Translation and localization — Translate and adapt copy across languages.
Pro Tips
- Put stable instructions in the system prompt and keep user messages for the task itself.
- Set max_tokens to cap the length and cost of each reply.
- Keep a long shared prefix identical across requests so repeated input is billed at the cache price.
- Ask for JSON with the exact keys you need when a program reads the answer.
- Test prompts in the playground above before wiring them into code.
- Check token usage in the console to spot unusually expensive prompts.
Related models
- claude-sonnet-4-6
- claude-sonnet-4-6-aws
- Claude Opus 4.7 —
claude-opus-4-7 - Claude Opus 4.6 —
claude-opus-4-6 - Claude Haiku 4.5 —
claude-haiku-4-5
Browse all LLMsBrowse API Market
FAQ
What is claude-sonnet-4-6-fast?
Claude Sonnet 4.6 在 Sonnet 系列的均衡定位上进一步提升复杂任务处理能力,适合更长上下文分析、严谨写作、代码审查、方案推演和多轮任务执行。它适合希望在成本和效果之间取得更高质量平衡的场景。
How do I call the claude-sonnet-4-6-fast API?
Send POST /v1/messages with the model ID claude-sonnet-4-6-fast and your API key. Ready-to-run samples are in the API section above.
How is billing calculated?
Requests are billed at the prices listed above and charged to your wallet. Final cost depends on usage and the billing group attached to your API key.
Where do I get an API key?
Create one in Console → API Keys. The same key works for every model on the gateway.
Can I use the output commercially?
Yes. You can use what you generate in commercial projects, subject to the model provider’s terms.
About claude-sonnet-4-6-fast on dreamtoai
Claude Sonnet 4.6 在 Sonnet 系列的均衡定位上进一步提升复杂任务处理能力,适合更长上下文分析、严谨写作、代码审查、方案推演和多轮任务执行。它适合希望在成本和效果之间取得更高质量平衡的场景。