Loading...
    • 开发者指南
    • API 参考
    • MCP
    • 资源
    • 发布说明
    Search...
    ⌘K

    第一步

    Claude 简介快速开始

    模型与定价

    模型概览选择模型Claude 4.5 的新功能迁移到 Claude 4.5模型弃用定价

    使用 Claude 构建

    功能概览使用 Messages API上下文窗口提示词最佳实践

    功能

    提示词缓存上下文编辑扩展思考流式消息批处理引用多语言支持Token 计数嵌入向量视觉PDF 支持Files API搜索结果Google Sheets 插件

    工具

    概述如何实现工具使用令牌高效的工具使用细粒度工具流式传输Bash 工具代码执行工具计算机使用工具文本编辑器工具Web fetch 工具网络搜索工具记忆工具

    代理技能

    概述在 API 中开始使用 Agent Skills技能创作最佳实践通过 API 使用 Agent Skills

    Agent SDK

    概览TypeScript SDKPython SDK

    指南

    流式输入处理权限会话管理托管 Agent SDK修改系统提示词SDK 中的 MCP自定义工具SDK 中的子代理SDK 中的斜杠命令SDK 中的代理技能跟踪成本和使用情况待办事项列表SDK 中的插件

    API 中的 MCP

    MCP 连接器远程 MCP 服务器

    Claude 在第三方平台上

    Amazon BedrockVertex AI

    提示词工程

    概述提示词生成器使用提示模板提示词改进器保持清晰和直接使用示例(多示例提示)让 Claude 思考(思维链)使用XML标签给Claude分配角色(系统提示)预填充 Claude 的响应链式复杂提示长文本技巧扩展思考技巧

    测试与评估

    定义成功标准开发测试用例使用评估工具减少延迟

    加强防护措施

    减少幻觉提高输出一致性缓解越狱handle-streaming-refusals减少提示词泄露保持Claude的角色特征

    管理和监控

    Admin API 概述使用量和成本 APIClaude Code 分析 API
    Console
    模型与定价

    模型弃用

    随着我们推出更安全和更强大的模型,我们定期停用较旧的模型。依赖 Anthropic 模型的应用程序可能需要偶尔更新以保持正常工作。受影响的客户将始终通过电子邮件和我们的文档获得通知。

    本页列出了所有 API 弃用及其推荐的替代品。

    概述

    Anthropic 使用以下术语来描述我们模型的生命周期:

    • 活跃:该模型得到完全支持,推荐使用。
    • 遗留:该模型将不再接收更新,将来可能被弃用。
    • 已弃用:该模型不再可供新客户使用,但对现有用户继续可用,直到停用。我们在此时分配停用日期。
    • 已停用:该模型不再可用。对已停用模型的请求将失败。

    请注意,已弃用的模型可能不如活跃模型可靠。我们敦促您将工作负载迁移到活跃模型,以保持最高级别的支持和可靠性。

    迁移到替代品

    一旦模型被弃用,请在停用日期之前将所有使用迁移到合适的替代品。对停用日期之后的模型的请求将失败。

    为了帮助衡量替代模型在您的任务上的性能,我们建议在停用日期之前充分测试您的应用程序与新模型的兼容性。

    有关从 Claude 3.7 迁移到 Claude 4.5 模型的具体说明,请参阅迁移到 Claude 4.5。

    通知

    Anthropic 通知具有即将停用模型的活跃部署的客户。我们在公开发布的模型停用前至少提供 60 天的通知。

    审计模型使用情况

    为了帮助识别已弃用模型的使用情况,客户可以访问其 API 使用情况的审计。请按照以下步骤操作:

    1. 转到 https://console.anthropic.com/settings/usage
    2. 点击"导出"按钮
    3. 查看下载的 CSV 文件,查看按 API 密钥和模型分解的使用情况

    此审计将帮助您找到应用程序仍在使用已弃用模型的任何实例,允许您在停用日期之前优先更新到较新的模型。

    最佳实践

    1. 定期检查我们的文档以了解模型弃用的更新。
    2. 在当前模型的停用日期之前充分测试您的应用程序与较新模型的兼容性。
    3. 尽快更新您的代码以使用推荐的替代模型。
    4. 如果您需要迁移方面的帮助或有任何问题,请联系我们的支持团队。

    模型状态

    所有公开发布的模型及其状态如下所示:

    API 模型名称当前状态已弃用暂定停用日期
    claude-3-opus-20240229已弃用2025 年 6 月 30 日2026 年 1 月 5 日
    claude-3-haiku-20240307活跃N/A不早于 2025 年 3 月 7 日
    claude-3-5-haiku-20241022活跃N/A不早于 2025 年 10 月 22 日
    claude-3-7-sonnet-20250219已弃用2025 年 10 月 28 日2026 年 2 月 19 日
    claude-sonnet-4-20250514活跃N/A不早于 2026 年 5 月 14 日
    claude-opus-4-20250514活跃N/A不早于 2026 年 5 月 14 日
    claude-opus-4-1-20250805活跃N/A不早于 2026 年 8 月 5 日
    claude-sonnet-4-5-20250929活跃N/A不早于 2026 年 9 月 29 日
    claude-haiku-4-5-20251001活跃N/A不早于 2026 年 10 月 15 日

    弃用历史

    所有弃用情况如下所示,最新的公告在顶部。

    2025-10-28:Claude Sonnet 3.7 模型

    2025 年 10 月 28 日,我们通知使用 Claude Sonnet 3.7 模型的开发者其在 Claude API 上即将停用。

    停用日期已弃用模型推荐替代品
    2026 年 2 月 19 日claude-3-7-sonnet-20250219claude-sonnet-4-5-20250929

    2025-08-13:Claude Sonnet 3.5 模型

    这些模型已于 2025 年 10 月 28 日停用。

    2025 年 8 月 13 日,我们通知使用 Claude Sonnet 3.5 模型的开发者其即将停用。

    停用日期已弃用模型推荐替代品
    2025 年 10 月 28 日claude-3-5-sonnet-20240620claude-sonnet-4-5-20250929
    2025 年 10 月 28 日claude-3-5-sonnet-20241022claude-sonnet-4-5-20250929

    2025-06-30:Claude Opus 3 模型

    2025 年 6 月 30 日,我们通知使用 Claude Opus 3 模型的开发者其即将停用。

    停用日期已弃用模型推荐替代品
    2026 年 1 月 5 日claude-3-opus-20240229claude-opus-4-1-20250805

    2025-01-21:Claude 2、Claude 2.1 和 Claude Sonnet 3 模型

    这些模型已于 2025 年 7 月 21 日停用。

    2025 年 1 月 21 日,我们通知使用 Claude 2、Claude 2.1 和 Claude Sonnet 3 模型的开发者其即将停用。

    停用日期已弃用模型推荐替代品
    2025 年 7 月 21 日claude-2.0claude-sonnet-4-5-20250929
    2025 年 7 月 21 日claude-2.1claude-sonnet-4-5-20250929
    2025 年 7 月 21 日claude-3-sonnet-20240229claude-sonnet-4-5-20250929

    2024-09-04:Claude 1 和 Instant 模型

    这些模型已于 2024 年 11 月 6 日停用。

    2024 年 9 月 4 日,我们通知使用 Claude 1 和 Instant 模型的开发者其即将停用。

    停用日期已弃用模型推荐替代品
    2024 年 11 月 6 日claude-1.0claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-1.1claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-1.2claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-1.3claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-instant-1.0claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-instant-1.1claude-3-5-haiku-20241022
    2024 年 11 月 6 日claude-instant-1.2claude-3-5-haiku-20241022
    • 2025-10-28:Claude Sonnet 3.7 模型
    • 2025-08-13:Claude Sonnet 3.5 模型
    • 2025-06-30:Claude Opus 3 模型
    • 2025-01-21:Claude 2、Claude 2.1 和 Claude Sonnet 3 模型
    • 2024-09-04:Claude 1 和 Instant 模型
    © 2025 ANTHROPIC PBC

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy

    Products

    • Claude
    • Claude Code
    • Max plan
    • Team plan
    • Enterprise plan
    • Download app
    • Pricing
    • Log in

    Features

    • Claude and Slack
    • Claude in Excel

    Models

    • Opus
    • Sonnet
    • Haiku

    Solutions

    • AI agents
    • Code modernization
    • Coding
    • Customer support
    • Education
    • Financial services
    • Government
    • Life sciences

    Claude Developer Platform

    • Overview
    • Developer docs
    • Pricing
    • Amazon Bedrock
    • Google Cloud’s Vertex AI
    • Console login

    Learn

    • Blog
    • Catalog
    • Courses
    • Use cases
    • Connectors
    • Customer stories
    • Engineering at Anthropic
    • Events
    • Powered by Claude
    • Service partners
    • Startups program

    Company

    • Anthropic
    • Careers
    • Economic Futures
    • Research
    • News
    • Responsible Scaling Policy
    • Security and compliance
    • Transparency

    Help and security

    • Availability
    • Status
    • Support center

    Terms and policies

    • Privacy policy
    • Responsible disclosure policy
    • Terms of service: Commercial
    • Terms of service: Consumer
    • Usage policy
    © 2025 ANTHROPIC PBC