Claude Opus 4.8 Text generation API

anthropic / claude-opus-4-8

An Anthropic model for careful coding, long-document analysis, and visual understanding with optional adaptive thinking.

Use anthropic/claude-opus-4-8 through the sjolt LLM API.

Model IDanthropic/claude-opus-4-8
Input
TextImage
Output
Text
Pricing

Token rates

Input
$2 / 1M tokens
Cache read
$0.2 / 1M tokens
Cache write (5 min)
$2.5 / 1M tokens
Cache write (1 hour)
$4 / 1M tokens
Output
$10 / 1M tokens
Claude Opus 4.8anthropic/claude-opus-4-8

Start a conversation

Write a message below to begin.

Playground Examples

Try production-style prompt starters.

Conceptual illustration of code review, not model output

Review this JavaScript function for correctness: function average(values) { return values.reduce((sum, value) => sum + value, 0) / values.length; }. Define behavior for empty arrays and non-finite values, suggest a minimal fix, and provide three focused test cases.

Conceptual illustration of connecting source documents, not model output

Reconcile these project notes into a decision brief. Product: launch on October 12, with CSV export required. Engineering: CSV export needs two weeks after schema approval; the schema is not approved. Operations: launch support must be scheduled ten days ahead. List confirmed facts, conflicts, dependencies, and the next three decisions. Do not invent dates or owners.

Conceptual illustration of visual analysis, not model output

Explain how to review a dashboard screenshot for clarity and accessibility. Organize the review around hierarchy, chart labels, contrast, and missing context. Separate directly observable evidence from assumptions, and finish with a reusable checklist.

Model overview

Claude Opus 4.8 for deliberate coding and analysis

Review code, connect long documents, and interpret images through native Anthropic Messages with optional adaptive thinking.

Claude Opus 4.8 text generation model cover
01 · Text generation

Review code against clear requirements

Supply the relevant implementation, expected behavior, and acceptance criteria. Ask for concrete failure cases and focused changes, and state which findings should be reported.

  • Send one required user prompt with optional system instructions.
  • Review the exact non-streaming API request before running it.
  • Inspect assistant text, finish reason, response ID, and token usage together.
Claude Opus 4.8 long-context text generation model cover
02 · Input and output

Connect evidence across long documents

Use up to 1,000,000 context tokens for specifications, source material, and conversation history. Label sources and request explicit evidence for conclusions.

Input
TextImage
Output
Text
Claude Opus 4.8: Ask precise questions about images
03 · API integration

Ask precise questions about images

Attach screenshots, diagrams, or other images alongside your question. The response is text. Page artwork illustrates these workflows and is not output from this language model.

  • Compare enabled language models in one place.
  • Copy the request preview to keep application requests aligned with the Playground.
  • Handle assistant responses and provider availability states in the same workflow.

Model characteristics

Context, thinking, and native API workflow

01

Context and output

Up to 1,000,000 context tokens and 128,000 output tokens. max_tokens includes both thinking and the final response.

02

Optional adaptive thinking

Enable thinking with thinking.type set to adaptive, or turn it off with disabled. Effort levels are low, medium, high, xhigh, max; the default effort is high. The Playground starts with adaptive thinking enabled.

03

Native Messages workflow

Send model, messages, and max_tokens to /v1/messages. Put system instructions in the top-level system field. Preserve native content blocks when continuing client-side tool conversations.

04

Prompt guidance

State the task, relevant evidence, constraints, and output format. Specify the desired response length, and ask the model to distinguish observations from assumptions.

FAQ

These are the first questions to answer when evaluating this model.

Which model ID and endpoint should I use?

Send model anthropic/claude-opus-4-8 to the Anthropic Messages endpoint /v1/messages with messages and max_tokens. Public API requests can use native streaming.

Can I turn thinking off?

Yes. Set thinking.type to disabled, or omit thinking to retain the upstream default of off. To enable it, use adaptive and select low, medium, high, xhigh, max through output_config.effort; the default effort is high.

How much output can I request?

Set max_tokens to a positive integer up to 128,000. This limit covers thinking and final output within the 1,000,000-token context window.

What can I provide in the Playground?

Send text and image attachments, then ask follow-up questions using the visible conversation. The example cards are prompt starters with conceptual illustrations, not recorded model responses.