Claude Sonnet 4
Built by Anthropic, Claude Sonnet 4 is an image-generation model with a 1000K token context window. Claude Sonnet 4 significantly enhances the capabilities of its predecessor, Sonnet 3.7, excelling in both coding and reasoning tasks with improved precision and controllability. Achieving state-of-the-art performance on SWE-bench (72.7%),...
by Anthropic · 1000K token context window
Best for
- image generation from text
- creative design and ideation
Ways to use Claude Sonnet 4 in osFoundry
Connect with your own key (BYOK)
Open the key dialog and paste your Anthropic API key. osFoundry discovers Claude Sonnet 4 automatically — assign it to a Maestro role (router, direct, orchestrator, or fallback) in the Pipeline tab and it is live in every chat. Your key, your provider account — no token markup.
Use it in a Room App
Room Apps declare AI features in their manifest, then call them with invokeAI:
import { invokeAI } from '@osfoundry/app-sdk'
// 'summarize' is an AI feature declared in your app manifest.
const result = await invokeAI('summarize', userText)
Call it from your own apps
Once a model is wired into your workspace you can host it as an API and reach it from your own services, scripts, or CI — outside osFoundry.
Claude Sonnet 4 vs similar models
Licence
Hosted — usage subject to provider terms — Hosted-only model — usage governed by the provider's API terms. Bring your own provider key.
No weights distributed; usage subject to provider terms.
Frequently asked about Claude Sonnet 4
How much does Claude Sonnet 4 cost?
Claude Sonnet 4 is metered at $ 3.00 /1M for input, and $ 15.00 /1M for output. Bring your own Anthropic API key — osFoundry passes through provider pricing without markup.
Can I use Claude Sonnet 4 commercially?
Commercial use is allowed with conditions. Hosted-only model — usage governed by the provider's API terms. Bring your own provider key. No weights distributed; usage subject to provider terms.
What is the context window of Claude Sonnet 4?
Claude Sonnet 4 supports a 1000K token context window.
Can I run Claude Sonnet 4 locally?
No — Claude Sonnet 4 is hosted only and accessed via the Anthropic API.
What is Claude Sonnet 4 best at?
Claude Sonnet 4 is well-suited to image generation from text, creative design and ideation.
How do I use Claude Sonnet 4 in osFoundry?
Paste your Anthropic API key in the key dialog (or deploy the open weights for self-hostable models), assign Claude Sonnet 4 to a Maestro role in the Pipeline tab, then use it in chat, Room Apps via invokeAI, or your own apps.
Published by Anthropic on May 22, 2025. Source: https://openrouter.ai/anthropic/claude-sonnet-4