API ModelsAPI Models
Models/Claude Opus 4 (Thinking)
Anthropic

Claude Opus 4 (Thinking)

claude-opus-4-20250514-thinking

Claude Opus 4 with extended thinking capability for the most complex reasoning tasks.

Extended ThinkingSuperior ReasoningMost Powerful
Input¥36.75
Output¥183.75
per 1M tokens

Extended Thinking

Maximum reasoning depth

Superior Reasoning

Unmatched logic

Most Powerful

Ultimate capability

Research Grade

For hardest problems

API Documentation

View complete API reference with all parameters and examples.

View Docs

Advanced Features

Streaming

Enable real-time streaming responses with Server-Sent Events.

{
  "model": "claude-opus-4-20250514-thinking",
  "stream": true,
  "max_tokens": 1024,
  "messages": [...]
}

Function Calling (Tools)

Enable Claude to use tools and call functions.

{
  "model": "claude-opus-4-20250514-thinking",
  "max_tokens": 1024,
  "tools": [{
    "name": "get_weather",
    "description": "Get current weather for a location",
    "input_schema": {
      "type": "object",
      "properties": {
        "location": {"type": "string", "description": "City name"}
      },
      "required": ["location"]
    }
  }],
  "tool_choice": {"type": "auto"},
  "messages": [{"role": "user", "content": "What's the weather in Tokyo?"}]
}

PDF Support

Analyze PDF documents by sending them as base64 encoded content.

{
  "model": "claude-opus-4-20250514-thinking",
  "max_tokens": 1024,
  "messages": [{
    "role": "user",
    "content": [{
      "type": "document",
      "source": {
        "type": "base64",
        "media_type": "application/pdf",
        "data": "<base64_encoded_pdf>"
      }
    }, {
      "type": "text",
      "text": "Summarize this document."
    }]
  }]
}

Structured Output (JSON Schema)

Get structured JSON responses that match your schema.

{
  "model": "claude-opus-4-20250514-thinking",
  "max_tokens": 1024,
  "output_format": {
    "type": "json_schema",
    "schema": {
      "type": "object",
      "properties": {
        "name": {"type": "string"},
        "age": {"type": "integer"}
      },
      "required": ["name", "age"]
    }
  },
  "messages": [{"role": "user", "content": "Extract info: John is 30 years old"}]
}

Web Search

Enable Claude to search the web for up-to-date information.

{
  "model": "claude-opus-4-20250514-thinking",
  "max_tokens": 1024,
  "tools": [{
    "type": "web_search_20250305",
    "name": "web_search",
    "max_uses": 5
  }],
  "messages": [{"role": "user", "content": "What's the latest news about AI?"}]
}

API Parameters Reference

ParameterTypeRequiredDescription
modelstringYesModel identifier (e.g., claude-opus-4-20250514-thinking)
messagesarrayYesArray of message objects with role and content
max_tokensintegerYesMaximum tokens in the response (1 - 128000)
systemstringNoSystem prompt to set context
streambooleanNoEnable streaming responses (SSE)
temperaturenumberNoSampling temperature (0.0 - 1.0)
top_pnumberNoNucleus sampling threshold (0.0 - 1.0)
top_kintegerNoTop-k sampling (0 - infinity)
stop_sequencesarrayNoSequences that stop generation
toolsarrayNoFunction calling tools definition
tool_choiceobjectNoTool selection strategy (auto/any/tool)
thinkingobjectNoEnable extended thinking mode
output_formatobjectNoStructured output with JSON schema

Full API Documentation

View complete API reference with streaming, thinking, and more.

View Documentation

Pricing

Input
¥36.75
per 1M tokens
Output
¥183.75
per 1M tokens

Billing: Cost = (input_tokens * input_price + output_tokens * output_price) / 1,000,000