Skip to main content
aiborg
AI Tool Guides
10AI AssistantsPaidAge: 18+

Anthropic API

console.anthropic.com

Best for

Safety-focused AI and extended thinking

Works on

Any platform (via code)

Alternatives

Google AI Studio, OpenAI API

Watch out

18+ only; no free tier — requires credit card

What It Does

The programmatic interface to Anthropic's Claude models. It supports text, images, PDFs, tool use (function calling), and extended thinking—where the model shows its chain-of-thought reasoning before answering.

Setup in 5 Minutes

and click Sign up. Verify your email and phone number. - Navigate to Settings $$ Billing and add a payment method to load credit. - Go to API Keys and click Create Key. Give it a name, copy the key (format: sk-ant-...), and store it securely. - Set the environment variable: export ANTHROPIC\_API\_KEY="sk-ant-...". - Install the Python library with pip install anthropic, then run: import anthropic; client = anthropic.Anthropic(); msg = client.messages.create(model="claude-sonnet-4-20250514", max\_tokens=1024, messages=[\{"role":"user","content":"Hello"\]); print(msg.content[0].text)}.

Try This

Use the API to send a prompt with thinking enabled: set thinking=\{"type":"enabled","budget\_tokens":2000\} and ask Claude to solve a logic puzzle. Print both the thinking block and the final answer.

Follow Along

Follow Along — Build a Document Analyser. that reads a text file using open("notes.txt").read(). - Send the file contents to Claude with the prompt: "Extract the 5 key themes from this document and write a 100-word summary." - Print the themes and summary to the terminal. - Test it on a set of class notes or a Wikipedia article saved as a .txt file. - Extend the script to accept the filename as a command-line argument using sys.argv[1] so you can analyse any file.

More in AI Assistants

AI Analysis

Frameworks from the aiborg Handbook — powered by Claude