Anthropic

Chat with Claude Opus 5 online

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

Trusted by 790,000+ users

1M tokens

Context

May 2026

Knowledge cutoff

128,000 tokens

Max output

Deliberate

Speed

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.

What you’ll use it for

Agentic coding

Multi-file changes with tests, run to completion rather than sketched.

Long documents

A million tokens of context: whole repos, contract sets, research archives in one thread.

Decisions and reviews

Architecture reviews, trade-off analyses, plans that have to survive scrutiny.

Vision and files

Screenshots, diagrams, PDFs and spreadsheets as part of the conversation.

Prompts to steal

Tuned to this model — click any line to copy.

About Claude Opus 5

Claude Opus 5 is the top of Anthropic's Claude 5 family, released on July 24, 2026 and positioned above Claude Sonnet 5 and Claude Fable 5. It is the model Anthropic points at agentic coding, computer use and long-horizon reasoning: the tasks where a model has to hold a plan across many steps, use tools along the way, and notice when it is wrong. On NinjaChat it is included in every plan, alongside the rest of the catalog, with no Claude subscription needed.

The headline change is that thinking is on by default. Opus 5 decides how much to reason before it answers, and it reasons more when the problem deserves it, so a two-line question comes back quickly while a refactor across a codebase gets the deliberation it needs. Paired with a 1 million token context window and 128K tokens of output, that means you can hand it a whole repository, a contract set or a quarter of research notes in one conversation and ask for something that spans all of it.

In practice Opus 5 is the model to reach for when the work is the kind you would give a senior colleague and check later, rather than a quick assistant task. Multi-file code changes with tests, an architecture review that has to weigh trade-offs, a long document you need argued with rather than summarized. It reads images and files, calls tools, and produces structured output when you ask for JSON, so it fits into workflows as well as conversations.

It is also deliberate. Opus 5 is slower than Sonnet 5 and costs more per token on the API, which is why NinjaChat keeps both in the picker: start with Opus for the hard part, move to Sonnet for the volume. If you mostly need speed, Claude Fable 5 covers everyday chat at a fraction of the effort.

Anthropic reports 96.0% on SWE-bench Verified for Opus 5, the software-engineering benchmark that has become the shorthand for agentic coding ability. Benchmarks are not the job, but that number lines up with what you feel in use: it finishes tasks other models leave half done.

How to use Claude Opus 5

From zero to your first result in under a minute.

01

Create a NinjaChat account and choose a plan

02

Open chat and pick Claude Opus 5 from the model list

03

Give it the whole task, files included, not a fragment

04

Let it think: harder questions take longer on purpose

05

Switch to Sonnet 5 or Fable 5 for quick follow-ups

Tips for better results

  • Ask for a plan first on big tasks, then say go
  • Attach the actual files instead of describing them
  • Ask for JSON or a table when you will paste the answer somewhere
  • Use Opus for the hard part and a faster Claude for the rest

Claude Opus 5 vs the alternatives

Where it wins, and where it doesn't.

vs Claude Sonnet 5

View

Deeper reasoning and more reliable long-horizon agentic work

Sonnet 5 is faster and cheaper for everyday tasks

vs GPT-5.6 Sol

Stronger on agentic coding benchmarks and computer use

Sol has a longer context window and a different tool ecosystem

vs Claude Opus 4.8

Thinking on by default, higher SWE-bench score, better tool use

Opus 4.8 remains available if you have prompts tuned for it

Questions, answered.

Beyond chat — images & video

The same subscription covers the image studio and video generation.

A real FLUX Pro Ultra outputA real Google Imagen 4 outputA real Seedream output
See every model →

Claude Opus 5, and 50 more.

One subscription covers every model on NinjaChat, Claude Opus 5 included.