Claude API · Setup and first request
Set your API key
The SDKs read ANTHROPIC_API_KEY from the environment. Use your own key and keep it out of source control.
export ANTHROPIC_API_KEY="your-api-key"
Official Claude API documentation
More setup and first request commands
- Install the Python SDK
- Install the TypeScript SDK
- Send your first message (Python)
- Send your first message (TypeScript)
- Send your first message (curl)
- Pick a model
All setup and first request commands · Claude API cheatsheet