Claude Opus 4 API

Access Claude Opus 4 from Anthropic using Puter.js AI API.

Get Started

Model Card

Claude Opus 4 is the flagship model from the May 2025 Claude 4 launch, designed for complex long-running tasks. It can work continuously for several hours (7+ hour coding sessions demonstrated) and leads on coding benchmarks at 72.5% SWE-bench.

Context Window

200K

tokens

Max Output

32,000

tokens

Input Cost

$15

per million tokens

Output Cost

$75

per million tokens

API Usage Example

Add Claude Opus 4 to your app with just a few lines of code.
No API keys, no backend, no configuration required.

<html>
<body>
    <script src="https://js.puter.com/v2/"></script>
    <script>
        puter.ai.chat("Explain quantum computing in simple terms", {
            model: "anthropic/claude-opus-4"
        }).then(response => {
            document.body.innerHTML = response.message.content;
        });
    </script>
</body>
</html>

View full documentation →

Get started with Puter.js

Add Claude Opus 4 to your app without worrying about API keys or setup.

Read the Docs View Tutorials