Lewati ke konten utama
Logo Anthropic

API Claude Opus 4.8

Anthropic

Claude Opus 4.8 merupakan bagian dari keluarga model ClaudeLihat semua model Claude

Model tingkat teratas Anthropic untuk penalaran tersulit dan tugas multi-langkah.

anthropic/claude-opus-4-8

Dokumentasi

Percakapan

Mulai percakapan

Model tingkat teratas Anthropic untuk penalaran tersulit dan tugas multi-langkah.

Enter untuk kirim · Shift+Enter untuk baris baru

UnificAlly tidak menyimpan prompt dan balasan LLM Anda. Kami hanya menyimpan informasi penggunaan token untuk keperluan penagihan.

Menggunakan POST /v1/chat/completions dengan kunci API UnificAlly Anda. Mendukung system prompt dan user prompt, tools, streaming, dan mode berpikir bila tersedia.

Diperbarui

What is the Claude Opus 4.8 API?

The Claude Opus 4.8 API is live on UnificAlly as anthropic/claude-opus-4-8, from $0.75/1M tokens of input. Claude Opus 4.8 is Anthropic's May 28, 2026 Opus model, built for agentic coding, computer use, and enterprise knowledge work. It follows Claude Opus 4.7 by 41 days and runs on UnificAlly as anthropic/claude-opus-4-8. The specs carry over from 4.7: a 1M-token context window, up to 128k output tokens, and adaptive thinking. The gains are in behavior. It scores higher on agentic coding, computer use, and knowledge-work benchmarks, reviews its own code more honestly, and spends fewer thinking tokens on turns that never needed them. Treat it as a real step up from Opus 4.7 for long agent runs, not a redesign of the model.

Claude Opus 4.8 API specs

Model IDanthropic/claude-opus-4-8
EndpointPOST https://direct-api.unifically.com/v1/chat/completions
Request typesChat Completions, Responses (/v1/responses), Messages (/v1/messages)
OutputText, returned in the same response or streamed
Tool useTools in the OpenAI tools and tool_choice format
Input rate$0.75/1M tokens
Output rate$3.75/1M tokens
Cache read rate$0.075/1M tokens
Cache creation rate$0.9375/1M tokens

Billing is per token, with no subscription. The Claude API pricing guide covers the full rate table for every Claude model.

How to use the Claude Opus 4.8 API

  1. Create an API key on the API keys page.
  2. Send a POST request to /v1/chat/completions with the model ID and a messages array.
  3. Read the reply from choices[0].message.content in the response.
curl -X POST https://direct-api.unifically.com/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -d '{
    "model": "anthropic/claude-opus-4-8",
    "messages": [
      { "role": "user", "content": "Review this diff and call out any bug it introduces." }
    ]
  }'

The response comes back synchronously with the completion:

{
  "id": "3f8e2a1c-7b4d-4e9a-9c2f-5d1e8b7a6c40",
  "object": "chat.completion",
  "created": 1710000000,
  "model": "anthropic/claude-opus-4-8",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "The diff introduces one bug..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 28,
    "completion_tokens": 64,
    "total_tokens": 92,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 0
    }
  }
}

The usage object holds the token counts the request is billed on. Set "stream": true to receive tokens as they generate. Send requests to direct-api.unifically.com so long replies finish in full.

Claude Opus 4.8 API parameters

ParameterTypeDefaultWhat it does
modelstringrequiredModel identifier. Use anthropic/claude-opus-4-8.
messagesarrayrequiredNon-empty array of message objects with role and content. Allowed roles: system, developer, user, assistant, tool, and function.
streambooleanfalseIf true, the response is streamed using server-sent events.
stream_optionsobjectnoneSet { "include_usage": true } to get a final chunk with token usage. Only used when stream is true.
max_tokensintegernoneMaximum number of tokens to generate in the completion.
max_completion_tokensintegernoneAccepted as an alias for max_tokens.
stopstring or arraynoneUp to four sequences where the model stops generating further tokens.
toolsarraynoneList of tools the model may call. Each tool requires a type and function definition.
tool_choicestring or objectnoneControls which tool is called: none, auto, required, or a specific tool.
response_formatobjectnoneSet { "type": "json_object" } to enable JSON mode.

Full Claude Opus 4.8 API docs live at docs.unifically.com/models/llm/anthropic/claude-opus-4-8.

Messages format

The same model ID also works on /v1/messages, the Anthropic-style endpoint. Use it when you need Claude's thinking text, which the Chat Completions endpoint does not return.

curl -X POST https://direct-api.unifically.com/v1/messages   -H "Content-Type: application/json"   -H "Authorization: Bearer YOUR_API_KEY"   -H "anthropic-version: 2023-06-01"   -d '{
    "model": "anthropic/claude-opus-4-8",
    "max_tokens": 4096,
    "messages": [
      {"role": "user", "content": "Plan a multi-step research workflow for analyzing market trends."}
    ]
  }'

Key features of Claude Opus 4.8

1M token context window

Large codebases, long agent traces, and dense document sets fit in one call, with a callable max output of 128k tokens.

Stronger agentic coding

It scores 88.6% on SWE-bench Verified and 69.2% on SWE-bench Pro, up from 87.6% and 64.3% on Opus 4.7, with better long-context handling late in long coding runs.

Better computer use

It reaches 83.4% on OSWorld-Verified, ahead of GPT-5.5 at 78.7%, and scores 84% on Online-Mind2Web for browser tasks that click, type, and read screens.

Knowledge work gains

It scores 1890 on GDPval-AA versus 1753 for Opus 4.7, improves Finance Agent v2 to 53.9%, and is the first model past 10% on the Harvey Legal Agent all-pass standard.

More honest code review

It is about four times less likely than Opus 4.7 to let a flaw in its own code pass without comment, and its measured misaligned-behavior rate is well below Opus 4.7 and Sonnet 4.6.

Adaptive thinking and effort control

Thinking triggers only on turns that need it, and effort defaults to high, so simple steps stay fast and hard problems still get deep reasoning in the same model.

What Claude Opus 4.8 is best for

  • Long-horizon coding agents

    Multi-hour sessions across a large repo, with fewer derailments late in the run.

  • Computer-use agents

    Desktop and browser tasks that click, type, and read screens, with clear action limits.

  • Finance and legal drafts

    First-pass memos and analysis built from filings, contracts, and spreadsheets.

  • Long document review

    Contracts, filings, and research packs held together in one context.

  • Multi-step research

    Search, synthesis, and careful citations across many sources.

  • Code review

    Review passes that flag flaws instead of letting them slide.

Claude Opus 4.8 use cases

Build a coding agent that works through a large repo for hours, keeps its plan intact, and flags its own mistakes instead of hiding them. Use it for computer-use agents that operate dense internal tools, fill unforgiving forms, or compare options across browser tabs. It also fits knowledge-work pipelines: turn filings and spreadsheets into a first-pass finance memo, run contract review across a long document set, or draft legal analysis for human check. For research teams, Claude Opus 4.8 is a good base for agents that search, read many sources, and write up findings with usable citations.

Claude Opus 4.8 limitations

Terminal-heavy coding is not a clean win. On Terminal-Bench 2.1 with the same Terminus-2 harness, GPT-5.5 scores 78.2% to Opus 4.8's 74.6%.

Deep science Q&A did not improve. GPQA Diamond comes in at 93.6%, a touch below Opus 4.7 at 94.2%.

Chat preference lags the agentic gains. Arena's Text board ranks claude-opus-4-8-thinking at #9 with 1484±5, below the Opus 4.6 and 4.7 thinking variants. If everyday chat quality is the goal, the older Opus models still rate higher there.

The API rejects temperature, top_p, and top_k, and adaptive thinking is the only thinking mode. Steering happens through prompts and effort, not sampling knobs.

High-stakes finance, legal, medical, and security outputs still need human review. One-pass output is a draft, not final work.

Claude Opus 4.8 vs Claude Opus 4.7

Claude Opus 4.8 is the better agent. It improves SWE-bench Pro from 64.3% to 69.2%, Terminal-Bench 2.1 from 66.1% to 74.6%, OSWorld-Verified from 82.8% to 83.4%, Humanity's Last Exam with tools from 54.7% to 57.9%, and GDPval-AA from 1753 to 1890. Coding tasks use similar token counts, so the extra quality does not cost more output. It is also more honest: about four times less likely to let flaws in its own code pass without comment, with a lower misaligned-behavior rate. One caution if you tuned effort levels against Opus 4.7: the token allocation behind each level changed, so re-baseline cost and latency before adjusting.

When to use Claude Opus 4.8

Use Claude Opus 4.8 when the job is a long-running agent: hours of coding, computer use, document work, or research where follow-through and honest self-checks matter. Pick it over Opus 4.7 for any new agentic build. If the task is short, chat-style, or latency-sensitive, a Sonnet model or an older Opus is usually enough.

FAQ

Pertanyaan yang sering diajukan tentang Claude Opus 4.8

anthropic/claude-opus-4-8, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your UnificAlly API key.

Make an account, then copy a key from the API keys page into an Authorization: Bearer header. The Claude Opus 4.8 API runs at https://direct-api.unifically.com/v1/chat/completions under the model ID anthropic/claude-opus-4-8.

Requests take anthropic/claude-opus-4-8 and messages, with tools in the OpenAI tools and tool_choice format, and the reply lands in choices[0].message.content. Leave out temperature, top_p and top_k, which the API rejects, and steer depth with effort instead, which defaults to high.

1M tokens, with a callable max output of 128k tokens. That fits large codebases, long agent traces, or many source documents in one run.

Yes. It scores 88.6% on SWE-bench Verified and 69.2% on SWE-bench Pro, and it is about four times less likely than Opus 4.7 to let a flaw in its own code pass without comment.

Yes. It scores 83.4% on OSWorld-Verified and 84% on Online-Mind2Web, so desktop and browser agents fail less often. Still set clear action limits for agents that click and type in real apps.

No. Requests that set temperature, top_p, or top_k to non-default values return a 400 error, same as on Opus 4.7. Steer the output with prompting instead.

Adaptive thinking is the only thinking mode. The model decides per turn whether to reason before answering, and the effort setting defaults to high. Fixed thinking budgets from older Claude models are not supported.

For agentic coding, computer use, and knowledge work, yes. It improves SWE-bench Pro from 64.3% to 69.2%, Terminal-Bench 2.1 from 66.1% to 74.6%, and GDPval-AA from 1753 to 1890, with more honest code review and fewer wasted thinking tokens.

Deep science Q&A did not improve, and chat-style preference boards still favor older Opus models. Keep humans in review for high-stakes finance, legal, medical, and security work.

Panduan dan perbandingan Claude Opus 4.8

Tinjau harga, batasan, dan hasil pengujian sebelum menjalankan model ini.