| name | clade-hello-world |
| description | Send your first message to Claude using the Anthropic SDK.
Use when starting a new Claude integration, testing your setup,
or learning the Messages API basics.
Trigger with phrases like "anthropic hello world", "claude api example",
"first claude call", "anthropic quick start".
|
| allowed-tools | Read, Write, Edit |
| version | 1.0.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","anthropic","claude","messages-api"] |
| compatibility | Designed for Claude Code |
Anthropic Hello World
Overview
Send your first message to Claude and get a response using the Messages API.
Prerequisites
- Completed
clade-install-auth setup
ANTHROPIC_API_KEY environment variable set
Instructions
Step 1: Basic Message
import Anthropic from '@claude-ai/sdk';
const client = new Anthropic();
const message = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
messages: [
{ role: 'user', content: 'What is the capital of France?' }
],
});
console.log(message.content[0].text);
Step 2: Add a System Prompt
const message = await client.messages.create({
model: 'claude-sonnet-4-20250514',
max_tokens: 1024,
system: 'You are a helpful geography expert. Be concise.',
messages: [
{ role: 'user', content: 'What is the capital of France?' }
],
});