Anthropic (Claude)
Access Claude models through NotPixel. Anthropic’s Claude is known for its safety, helpfulness, and nuanced understanding.
Setup
1. Get API Key
- Go to Anthropic Console
- Create an account or sign in
- Navigate to API Keys
- Create a new API key
2. Configure Environment
.env
ANTHROPIC_API_KEY=sk-ant-...Usage
import Ads from 'notpixel';
const ads = new Ads({
publisherId: 'pub_xxx',
model: 'anthropic/claude-opus-4.5',
input: 'Explain the theory of relativity simply',
});
const response = await ads.offer();
console.log(response.text);Available Models
| Model | Context | Best For |
|---|---|---|
anthropic/claude-opus-4.5 | 200K | Complex analysis, nuanced writing |
anthropic/claude-3-sonnet | 200K | Balanced performance and speed |
anthropic/claude-3-haiku | 200K | Fast responses, simple tasks |
anthropic/claude-3.5-sonnet | 200K | Latest, improved reasoning |
Claude models excel at nuanced conversations, following complex instructions, and producing well-structured content.
Model Selection
// High-quality, complex tasks
model: 'anthropic/claude-opus-4.5'
// Balanced everyday use
model: 'anthropic/claude-3.5-sonnet'
// Fast, cost-effective
model: 'anthropic/claude-3-haiku'Environment Variable
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Your Anthropic API key |