Skip to Content
NotPixel SDK v1.0.1 — Now with caching, hooks, and browser tracking!

Anthropic (Claude)

Access Claude models through NotPixel. Anthropic’s Claude is known for its safety, helpfulness, and nuanced understanding.

Setup

1. Get API Key

  1. Go to Anthropic Console 
  2. Create an account or sign in
  3. Navigate to API Keys
  4. 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

ModelContextBest For
anthropic/claude-opus-4.5200KComplex analysis, nuanced writing
anthropic/claude-3-sonnet200KBalanced performance and speed
anthropic/claude-3-haiku200KFast responses, simple tasks
anthropic/claude-3.5-sonnet200KLatest, 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

VariableDescription
ANTHROPIC_API_KEYYour Anthropic API key