Claude Sonnet 4
Unleash the power of Claude Sonnet 4, a cutting-edge AI model designed for exceptional coding, advanced reasoning, and precise instruction following.
Platform: Replicate
Reasoning AICoding AssistantInstruction FollowingText Generation
99.8k runs
Input: $3 per million tokens; Output: $15 per million tokens
Commercial🚀Function Overview
A hybrid reasoning model providing near-instant responses and extended thinking capabilities for coding, analysis, and complex instruction following.
Key Features
- Dual operating modes (standard vs. extended thinking)
- State-of-the-art coding performance (72.7% on SWE-bench)
- Enhanced instruction following and steerability
- Parallel tool execution
- Web search integration during extended thinking
- 65% reduction in shortcut/loophole behavior
Use Cases
- •Coding tasks and development workflows
- •Complex instruction following
- •Multi-file codebase operations
- •Autonomous application development
- •Long-form reasoning and analysis
- •Agent-based workflows
⚙️Input Parameters
prompt
stringInput prompt
image
stringOptional input image. Images are priced as (width px * height px)/750 input tokens
system_prompt
stringSystem prompt
max_tokens
integerMaximum number of output tokens
max_image_resolution
numberMaximum image resolution in megapixels. Scales down image before sending it to Claude, to save time and money.
extended_thinking
booleanWhether to enable extended thinking mode (only supported for Sonnet 3.7 and Sonnet 4)
thinking_budget_tokens
integerMaximum number of tokens to use for extended thinking when enabled (only supported for Sonnet 3.7 and Sonnet 4)
💡Usage Examples
Example 1
Input Parameters
{ "prompt": "Give me a recipe for tasty smashed avocado on sourdough toast that could feed all of California.", "max_tokens": 8192, "system_prompt": "You are a helpful assistant", "max_image_resolution": 0.5 }
Output Results
Here's a recipe to
feed all of California (about 39
million people)!
🥑
## California
-Sized Smashed Avoca
do Toast
### Ingredients:
- **
780 million avocados** (
20 per person - hey, it's California!)
- **39 million slices**
of sourdough bread
- **39
million limes** (ju
iced)
- **19.
5 million red onions** (f
inely diced)
- **
390,000 pounds** of sea
salt
- **195,000 pounds** of
black pepper
- **39
million Roma tomatoes** (
diced, optional)
- **19
.5 million jalapeños** (min
ced, for the brave)
### Instructions:
1.
Recruit every resident to help prep
(mandatory participation law pending)
2. Use
the entire Central Valley as your prep
kitchen
3. Mash av
ocados in swimming pools (cleane
d first, obviously)
4
. Toast bread using solar power from
the Mojave Desert
5
. Assembly line from San Diego to the
Oregon border
6.
Distribute via a fleet of food trucks,
drones, and very patient
pelicans
###
Serving suggestion:
Serve on
the beaches simultaneously at 12
PM PT for the ultimate California experience!
**
Estimated cost:** Approximately the
GDP of a small country
**Prep
time:** 6 months with
full state cooperation
**Clean
-up time:** We don't talk
about clean-up time
*Note: May cause a
global avocado shortage an
d significantly impact the housing market (
even more expensive now).*
Quick Actions
Technical Specifications
- Hardware Type
- Run Count
- 99.8k
- Commercial Use
- Supported
- Pricing
- Input: $3 per million tokens; Output: $15 per million tokens
- Platform
- Replicate
Related Keywords
Coding AssistantReasoning ModelInstruction FollowingComplex AnalysisAgent-based WorkflowsLong-form ReasoningAutonomous Application Development