Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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".
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 76% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -17% | 0% |
| case-12 | ✗→✓ | ▲ Improved | -9% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 35% | 0% |
Send your first message to Claude and get a response using the Messages API.
clade-install-auth setupANTHROPIC_API_KEY environment variable settypescriptimport 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); // "The capital of France is Paris."
typescriptconst 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?' } ], });
typescriptconst message = await client.messages.create({ model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [ { role: 'user', content: 'What is the capital of France?' }, { role: 'assistant', content: 'The capital of France is Paris.' }, { role: 'user', content: 'What is its population?' }, ], });
pythonimport anthropic client = anthropic.Anthropic() message = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[ {"role": "user", "content": "What is the capital of France?"} ], ) print(message.content[0].text)
message.content[0].text — Claude's text responsemessage.model — model ID usedmessage.usage.input_tokens / message.usage.output_tokens — token countsmessage.stop_reason — end_turn, max_tokens, or tool_use| Error | Cause | Solution | |-------|-------|----------| | authentication_error | Bad API key | Check ANTHROPIC_API_KEY | | invalid_request_error | Missing required field | Both messages and max_tokens are required | | not_found_error | Invalid model ID | Use a valid model like claude-sonnet-4-20250514 |
| Model | Best For | Context | Cost (input/output per MTok) | |-------|----------|---------|------------------------------| | claude-opus-4-20250514 | Complex reasoning | 200K | $15 / $75 | | claude-sonnet-4-20250514 | Balanced quality + speed | 200K | $3 / $15 | | claude-haiku-4-5-20251001 | Fast, cheap tasks | 200K | $0.80 / $4 |
See Step 1 (basic message), Step 2 (system prompt), and Step 3 (multi-turn) above. Python example included in its own section.
Proceed to clade-model-inference for streaming and advanced patterns.
Other measured skills in the registry, with their headline benchmark lift.