NinjaChat
模型API定价博客
开始使用→
模型API定价博客
  1. 首页›
  2. 模型›
  3. Claude Opus 5

Anthropic

在线与 Claude Opus 5 聊天

Anthropic's flagship for the work you would hand a senior colleague — thinking on by default, a million tokens of context.

试用 Claude Opus 5 查看方案
790,000+ 位用户的信赖

1M tokens

上下文窗口

May 2026

知识截止日期

128,000 tokens

最大输出

较慢

速度

Straight from Claude Opus 5

Three prompts, three unedited answers, generated on September 2, 2026 through NinjaChat. Click the prompt to copy it and run it yourself.

Prompt

Write a Python function that merges overlapping intervals, plus three short tests. Keep the whole answer under 40 lines of code.

Claude Opus 5 answered
def merge_intervals(intervals):
    """Merge overlapping intervals.

    Args:
        intervals: iterable of (start, end) pairs with start <= end.

    Returns:
        New list of disjoint (start, end) tuples sorted by start.
        Touching intervals like (1, 2) and (2, 3) are merged.
    """
    merged = []
    for start, end in sorted(tuple(iv) for iv in intervals):
        if merged and start <= merged[-1][1]:
            prev_start, prev_end = merged[-1]
            merged[-1] = (prev_start, max(prev_end, end))
        else:
            merged.append((start, end))
    return merged


def test_overlapping_and_touching():
    assert merge_intervals([(1, 3), (2, 6), (8, 10), (15, 18)]) == [
        (1, 6), (8, 10), (15, 18)]
    assert merge_intervals([(1, 2), (2, 3)]) == [(1, 3)]


def test_unsorted_and_nested():
    assert merge_intervals([(5, 7), (1, 10), (2, 3)]) == [(1, 10)]


def test_edge_cases():
    assert merge_intervals([]) == []
    assert merge_intervals([(4, 4)]) == [(4, 4)]
    assert merge_intervals([(1, 2), (3, 4)]) == [(1, 2), (3, 4)]


if __name__ == "__main__":
    test_overlapping_and_touching()
    test_unsorted_and_nested()
    test_edge_cases()
    print("all tests passed")

A couple of notes on choices worth knowing about:

  • Touching intervals merge. (1, 2) and (2, 3) become (1, 3) because the comparison is start <= prev_end. If your intervals are half-open (e.g. time slots where 2 is an exclusive end), change it to start < merged[-1][1] so they stay separate.
  • Input is not mutated, and the output is a list of tuples regardless of whether you pass lists or tuples in.
  • Invalid intervals aren't validated. A reversed pair like (5, 1) will produce nonsense rather than an error; add a check if the input isn't trusted.

Complexity is O(n log n) time from the sort, O(n) extra space.

Read: We ran the same 3 prompts on 12 AI models — Unedited answers, latency and price for every model, measured through the NinjaChat API in September 2026.

Served by Anthropic as claude-opus-5. Answers vary run to run; these are one take each, not the best of several.

你会用它做什么

智能体编程

带测试的多文件改动,一路做到完成,而不是只写个草稿。

长文档处理

百万 token 上下文:整个代码仓库、成套合同、研究资料库都能放进一个会话。

决策与评审

架构评审、取舍分析,以及经得起推敲的方案。

视觉与文件

截图、图表、PDF 和表格都可以成为对话的一部分。

Prompts to steal

Tuned to this model — click any line to copy.

关于 Claude Opus 5

Claude Opus 5 是 Anthropic Claude 5 系列的顶级模型,于 2026 年 7 月 24 日发布,定位高于 Claude Sonnet 5 和 Claude Fable 5。这是 Anthropic 专为智能体编程、电脑操作和长周期推理打造的模型:这类任务要求模型在多个步骤中始终守住一个计划、在过程中调用工具,并能察觉自己何时出错。在 NinjaChat 上,Claude Opus 5 与其他模型一起包含在所有套餐中。

最大的变化是默认开启思考。Opus 5 会自行判断回答前需要推理多少,并在问题值得时投入更多推理——因此两行字的提问会很快得到回复,而跨代码库的重构则能获得应有的深思。配合 100 万 token 的上下文窗口和 128K token 的输出,你可以在一次对话中交给它整个代码仓库、一整套合同或一个季度的研究笔记,并要求它完成贯穿全部内容的任务。

实际使用中,当工作属于那种你会交给资深同事、之后再来验收的类型,而不是随手的助理小活,Opus 5 就是首选。带测试的多文件代码改动、需要权衡取舍的架构评审、需要被辩驳而非简单摘要的长文档,都属于此类。它能读取图片和文件、调用工具,也能在你要求 JSON 时输出结构化结果,因此既适合对话,也能嵌入工作流。

它也很审慎。Opus 5 比 Sonnet 5 更慢,API 上每 token 成本更高,所以 NinjaChat 在模型选择器里同时保留了两者:难的部分用 Opus 起步,量大的部分转到 Sonnet。如果你主要看重速度,Claude Fable 5 能以更低的开销覆盖日常对话。

Anthropic 公布 Opus 5 在 SWE-bench Verified 上取得 96.0%——这项软件工程基准已成为衡量智能体编程能力的代名词。基准不等于实际工作,但这个数字与你的使用体感一致:别的模型做到一半的任务,它能做完。

如何使用 Claude Opus 5

从零到第一个结果,不到一分钟。

01

创建 NinjaChat 账户并选择套餐

02

打开聊天,在模型列表中选择 Claude Opus 5

03

把完整任务连同文件一起交给它,而不是只给片段

04

让它思考:越难的问题耗时越久,这是有意为之

05

后续快速追问可切换到 Sonnet 5 或 Fable 5

获得更好结果的技巧

  • 大任务先让它给出方案,确认后再让它开始
  • 直接上传原始文件,而不是描述文件内容
  • 如果答案要粘贴到别处,就让它输出 JSON 或表格
  • 难的部分用 Opus,其余交给更快的 Claude

Claude Opus 5 与同类模型对比

客观对比——{model} 的优势所在,以及它的不足之处。

对比 Claude Sonnet 5

查看模型

+推理更深入,长周期智能体任务更可靠

–日常任务上 Sonnet 5 更快也更便宜

对比 GPT-5.6 Sol

+在智能体编程基准和电脑操作上表现更强

–Sol 的上下文窗口更长,工具生态也不同

对比 Claude Opus 4.8

+默认开启思考、SWE-bench 分数更高、工具使用更出色

–如果你已有针对 Opus 4.8 调好的提示词,它依然可用

常见问题解答

不止于对话——图像与视频

每个 NinjaChat 方案均包含 50+ 个模型、完整图像工作室和视频生成功能。

A real FLUX Pro Ultra outputA real Google Imagen 4 outputA real Seedream output
查看所有模型 →

Claude Opus 5,还有另外 50 多个模型。

一个订阅即可使用 NinjaChat 上的所有模型,包括 Claude Opus 5。

开始使用对比方案
Download on the App Store

更多模型,等你探索

Claude Opus 4.6

Anthropic 于 2026 年 2 月发布的 Opus 模型,面向复杂推理、编程和智能体任务

→

Claude Sonnet 5

Anthropic's newest Sonnet — near-Opus intelligence for coding and agents

→

GPT 5.6 Sol

OpenAI 最新的前沿模型,擅长推理、编程与智能体任务

→
NinjaChat

所有 AI。 一个应用。

在 App Store 上下载

产品

  • 控制台
  • ninja
  • 定价
  • Enterprise
  • 免费 AI 工具
  • Cinema
  • 推广合作
  • iOS 应用

开发者

  • API
  • API 模型
  • Router
  • MCP / Agents
  • Search API
  • API Pricing
  • Migration Guides
  • API 文档

模型

  • Model Council
  • Seed 1.8
  • Gemini 2.5 Flash
  • Gemini 2.5 Pro
  • Gemini 3 Flash Preview
  • 查看全部模型

公司

  • 博客
  • 社区
  • 加入我们
  • 客服支持
  • 隐私政策
  • 服务条款
  • Safety Protocol
  • Do Not Sell or Share My Personal Information

版权所有 © 2026 NinjaChat AI。 旗下产品 Bloon 保留所有权利。