Developer Dashboard

New Flagship Model Added: Claude Opus 5

Date: 2026-07-27 / (1405-05-05)

Summary

Claude Opus 5, Anthropic's new flagship Opus model, is now available on AvalAI as claude-opus-5. It combines stronger coding, knowledge work, computer use, and long-horizon agentic execution with a 1 million-token input window and configurable reasoning effort. The model supports v1/chat/completions and v1/messages fully, with partial support for v1/responses.


Details

Anthropic

We announce access to Claude Opus 5 (claude-opus-5), Anthropic's new Opus flagship for demanding software engineering, knowledge work, scientific analysis, computer use, and multi-step agentic workflows. Compared with Claude Opus 4.8, it is designed to verify its work more carefully, sustain longer tasks, and deliver more capability at the same input and output prices. Anthropic models documentation

Key Features:

  • Flagship Coding and Knowledge Work: State-of-the-art results reported by Anthropic on evaluations including Frontier-Bench and GDPval-AA
  • Long-Horizon Agentic Execution: Stronger at planning, using tools, verifying results, finding root causes, and iterating until a task succeeds
  • 1M-Token Input Window: Up to 1,000,000 input tokens for large repositories, extensive documents, and long-running workflows
  • 128K Output Capacity: Up to 128,000 output tokens for substantial code, analysis, and structured deliverables
  • Adaptive Thinking: Configurable effort levels let applications trade reasoning depth against latency and token use
  • Computer Use and Vision: Supports image and PDF input, computer-use workflows, and visual artifact generation
  • Developer Features: Function calling, tool choice, native structured output, response schemas, prompt caching, and output configuration
  • Improved Scientific Work: Anthropic reports gains over Opus 4.8 across life-science evaluations, including organic chemistry and protein-related tasks
  • Alignment and Safety: Anthropic reports its lowest overall misaligned-behavior score among recent models while retaining safeguards for sensitive cyber and biology requests
  • Endpoint Support: Full support on v1/chat/completions and v1/messages; partial support on v1/responses

Endpoint Availability

EndpointSupportNotes
v1/chat/completionsFullOpenAI-compatible chat, reasoning, vision, structured output, and tool workflows
v1/messagesFullNative Anthropic-compatible messages, thinking blocks, and tool use
v1/responsesPartialUse supported text and basic tool features; verify required parameters before production use

Pricing

Prices are in USD per 1 million tokens.

ModelInputCached InputCache Creation InputOutput
claude-opus-5$5.00$0.50$6.25$25.00

Claude Opus 5 keeps the $5.00 input and $25.00 output rates of Claude Opus 4.8 while reducing the cached-input rate to $0.50 per 1 million tokens. Cache creation is billed separately when prompt caching is enabled.


API Request and Response Example

Request

bash
curl https://api.avalai.ir/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -d '{
    "model": "claude-opus-5",
    "messages": [
      {
        "role": "user",
        "content": "Review this migration plan, identify hidden failure modes, and propose a safer staged rollout."
      }
    ]
  }'

Response

The following shortened response illustrates the standard Chat Completions structure:

json
{
  "id": "chatcmpl-claude-opus-5-example",
  "created": 1785160800,
  "model": "claude-opus-5",
  "object": "chat.completion",
  "system_fingerprint": null,
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "The main hidden risks are dual-write divergence, incompatible rollback paths, and untested consumer idempotency. Start with shadow reads, add reconciliation metrics, migrate one bounded context at a time, and require tested rollback criteria before each traffic increase.",
        "role": "assistant",
        "thinking_blocks": [],
        "annotations": []
      }
    }
  ],
  "usage": {
    "completion_tokens": 68,
    "prompt_tokens": 24,
    "total_tokens": 92,
    "completion_tokens_details": null,
    "prompt_tokens_details": {
      "audio_tokens": null,
      "cached_tokens": 0,
      "text_tokens": 24,
      "image_tokens": null
    }
  },
  "estimated_cost": {
    "unit": "0.0018200000",
    "irt": 278.82,
    "exchange_rate": 153200
  }
}

SDK Usage Examples

bash
curl https://api.avalai.ir/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AVALAI_API_KEY" \
  -d '{
    "model": "claude-opus-5",
    "messages": [
      {
        "role": "user",
        "content": "Analyze this repository architecture and propose a reliable modernization plan."
      }
    ]
  }'
python
from openai import OpenAI

client = OpenAI(
    api_key="your-avalai-api-key",
    base_url="https://api.avalai.ir/v1",
)

response = client.chat.completions.create(
    model="claude-opus-5",
    messages=[
        {
            "role": "user",
            "content": "Analyze this repository architecture and propose a reliable modernization plan.",
        }
    ],
)

print(response.choices[0].message.content)
javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AVALAI_API_KEY,
  baseURL: "https://api.avalai.ir/v1",
});

const response = await client.chat.completions.create({
  model: "claude-opus-5",
  messages: [
    {
      role: "user",
      content: "Analyze this repository architecture and propose a reliable modernization plan.",
    },
  ],
});

console.log(response.choices[0].message.content);

Native Anthropic SDK (v1/messages)

bash
curl https://api.avalai.ir/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: $AVALAI_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-opus-5",
    "max_tokens": 2048,
    "messages": [
      {
        "role": "user",
        "content": "Find the root cause of this intermittent concurrency bug and propose a test that reproduces it."
      }
    ]
  }'
python
import anthropic

client = anthropic.Anthropic(
    api_key="your-avalai-api-key",
    base_url="https://api.avalai.ir",
)

message = client.messages.create(
    model="claude-opus-5",
    max_tokens=2048,
    messages=[
        {
            "role": "user",
            "content": "Find the root cause of this intermittent concurrency bug and propose a test that reproduces it.",
        }
    ],
)

print(message.content[0].text)
javascript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({
  apiKey: process.env.AVALAI_API_KEY,
  baseURL: "https://api.avalai.ir",
});

const message = await client.messages.create({
  model: "claude-opus-5",
  max_tokens: 2048,
  messages: [
    {
      role: "user",
      content: "Find the root cause of this intermittent concurrency bug and propose a test that reproduces it.",
    },
  ],
});

console.log(message.content[0].text);

Adaptive Thinking and Effort

Claude Opus 5 supports adaptive thinking and configurable effort. Start with a lower effort for routine work and increase it only when evaluations show that the additional reasoning improves task success. Do not ask the model to expose hidden chain-of-thought; request a concise rationale, verification checklist, or evidence instead.

python
from openai import OpenAI

client = OpenAI(
    api_key="your-avalai-api-key",
    base_url="https://api.avalai.ir/v1",
)

response = client.chat.completions.create(
    model="claude-opus-5",
    messages=[
        {
            "role": "user",
            "content": "Design a staged migration from a monolith to event-driven services and verify the rollback strategy.",
        }
    ],
    extra_body={
        "thinking": {"type": "adaptive"},
        "output_config": {"effort": "xhigh"},
    },
)

print(response.choices[0].message.content)

WorkloadWhy Claude Opus 5 Fits
Complex software engineeringStrong root-cause analysis, codebase understanding, careful iteration, and tool use
Long-running agentsMaintains task context across multi-step workflows and verifies intermediate results
Knowledge workStrong performance on research, analysis, due diligence, numerical reasoning, and table work
Computer useImproved performance on desktop, browser, and end-to-end business workflows
Scientific analysisGains over Opus 4.8 in life sciences, chemistry, bioinformatics, and protein-related tasks
Visual and interactive artifactsStronger visual output for interfaces, diagrams, simulations, and interactive deliverables