Skip to content

Claude Opus 4.8

claude-opus-4-8

Claude Opus 4.8 is Anthropic's most capable generally available model in the Opus family, designed for highly autonomous agents, long-horizon workflows, and advanced knowledge work. It supports text, image, and file inputs with text output, includes reasoning capabilities, and features a 1M-token context window for maintaining coherence across extended tasks and sessions. The model excels at multi-step reasoning, complex coding, and end-to-end project orchestration, including large codebases, multi-stage debugging, and long-running asynchronous agent pipelines. Beyond software engineering, it is highly effective for document drafting, presentation creation, data analysis, and memory-driven workflows, delivering consistent quality across very long outputs and complex projects.

Context
1M tokens
Endpoint
Get API KeyCompare

Pricing

Input$4.00 / 1M
Output$20.00 / 1M
Cache Write (5m)$5.00 / 1M
Cache Write (1h)$8.00 / 1M
Cache Read$0.40 / 1M
Web Search$0 / 1M

Quick Start

Select an endpoint and copy a working example for this model.

Endpoint:
python
from openai import OpenAI client = OpenAI(    api_key="YOUR_API_KEY",    base_url="https://api.apertis.ai/v1") response = client.chat.completions.create(    model="claude-opus-4-8",    messages=[        {"role": "user", "content": "Hello!"}    ],    max_tokens=1024,    temperature=0.7) print(response.choices[0].message.content) # Optional: Enable context compression to reduce token usage# response = client.chat.completions.create(#     model="claude-opus-4-8",#     messages=[{"role": "user", "content": "Hello!"}],#     extra_body={"compression": {"enabled": True, "model": "gpt-4.1-mini"}}# )

Supported Parameters

API docs
Common7 params
modelmessagesmax_tokenstemperaturetop_pstreamtools
Extended4 params
reasoning_effortstream_optionsthinkingextra_body

Cursor IDE Model IDs

Use these namespaced identifiers in Cursor IDE to avoid conflicts with built-in models.

claude-opus-4-8

Decision guidance

Fit the request contract before production.

Use this model when

  • The workload includes code generation or code-oriented text tasks listed in the current catalog record.
  • The required task matches the listed capabilities: text-to-text, text-to-code, translation.
  • The request depends on listed features such as thinking, vision, function-calling.
  • The input fits within the published 1M-token context record, with output and system overhead budgeted separately.

Check before production

  • Confirm the production client uses one of the listed request surfaces: /v1/chat/completions, /v1/responses, /v1/messages.
  • Estimate a representative request from the current Pay As You Go price fields instead of extrapolating from a tiny prompt.
  • Check the observed-availability card and run your own timeout, retry, and fallback test before relying on the model.

Compare with Other Models

See how this model compares to others from the same provider.

Claude Fable 5.1

Claude Fable 5.1 is an upgraded version of Fable 5, delivering broad improvements with particularly strong gains in agentic coding, long-running workflows, and professional knowledge work. It excels at large code refactors, front-end and visual code generation, financial analysis, and complex analytical tasks. Compared with Fable 5, it also produces more concise plans and summaries while maintaining strong performance across extended tasks, making it a natural upgrade for existing Fable workflows and a strong option alongside Opus 5 for reasoning-intensive applications.

Context
1M
Input
$10.00/M
Output
$50.00/M

Claude Sonnet 4.5 (Thinking)

Claude Sonnet 4.5 is Anthropic's most advanced Sonnet model, built for real-world agents and coding workflows. It delivers top-tier coding performance (including SWE-bench Verified) with stronger system design, security, and spec adherence, and supports long-running autonomous work with progress tracking. It introduces more powerful agent features — better tool orchestration, speculative parallel execution, and smarter context/memory management — making it especially effective for complex, multi-context workflows across engineering, security, finance, and research.

Context
1M
Input
$1.50/M
Output
$7.50/M

Claude Haiku 4.5 (Thinking)

Claude Haiku 4.5 is Anthropic's fastest, most efficient model, offering near-frontier capability at much lower cost and latency. It now supports extended, controllable reasoning and full tool-assisted workflows, including coding and computer use. With >73% on SWE-bench Verified, it matches Sonnet-level performance while staying highly responsive for real-time and large-scale deployments.

Context
200K
Input
$0.50/M
Output
$2.50/M

Claude Sonnet 4

Claude Sonnet 4 is a major upgrade over Sonnet 3.7, delivering stronger coding and reasoning with better precision and control. It reaches 72.7% on SWE-bench, while staying efficient and responsive, making it useful for everything from everyday coding to complex software projects. Improvements include better autonomous codebase navigation, fewer agent workflow errors, and more reliable handling of complex instructions.

Context
200K
Input
$1.00/M
Output
$5.00/M