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

All setup and first request commands · Claude API cheatsheet

Was this page helpful?