Get started with Claude
Make your first API call to Claude and build a simple web search assistant
Prerequisites
- An Anthropic Console account
- An API key
Call the API
Set your API key
Get your API key from the Anthropic Console and set it as an environment variable:
Make your first API call
Run this command to create a simple web search assistant:
Example output:
Set your API key
Get your API key from the Anthropic Console and set it as an environment variable:
Make your first API call
Run this command to create a simple web search assistant:
Example output:
Set your API key
Get your API key from the Anthropic Console and set it as an environment variable:
Install the SDK
Install the Anthropic Python SDK:
Create your code
Save this as quickstart.py
:
Run your code
Example output:
Set your API key
Get your API key from the Anthropic Console and set it as an environment variable:
Install the SDK
Install the Anthropic TypeScript SDK:
Create your code
Save this as quickstart.ts
:
Run your code
Example output:
Set your API key
Get your API key from the Anthropic Console and set it as an environment variable:
Install the SDK
Add the Anthropic Java SDK to your project. First find the current version on Maven Central.
Gradle:
Maven:
Create your code
Save this as QuickStart.java
:
Run your code
Example output:
Next steps
Now that you have made your first Anthropic API request, it’s time to explore what else is possible: