What is Claude?
Claude is a family of AI models from Anthropic that you can use to build sites and add AI features to web apps.
Claude is a family of large language models (LLMs) built by Anthropic. You give Claude text (and optionally images), and it responds with text — answers, code, summaries, structured data, and more.
Two ways Claude helps web developers
- Build faster — use Claude to write HTML, CSS, and JavaScript, generate components, review and refactor code, write tests, and debug errors.
- Add AI features — call Claude from your own backend to power chatbots, content generation, summarization, semantic search, and smart forms.
How you reach Claude
You talk to Claude through the Anthropic Messages API: your server sends a request, Claude sends a response. There are official SDKs for JavaScript/TypeScript and Python, plus Claude Code, an agentic coding tool that works directly in your repository.
Example
# The core idea as a single API call:
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-4-8",
"max_tokens": 256,
"messages": [
{"role": "user", "content": "Say hello to a web developer in one sentence."}
]
}'When to use it
- Add a customer-support chatbot to your e-commerce site that answers product questions in natural language.
- Integrate Claude into a docs portal so developers can ask questions and get instant answers from your API reference.
- Use Claude in a SaaS dashboard to generate plain-English summaries of user analytics data.
More examples
Minimal curl request to Claude
A bare-minimum POST to the Messages API that shows all required headers and body fields.
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-haiku-4-5","max_tokens":64,"messages":[{"role":"user","content":"What is Claude?"}]}'Node.js hello world with SDK
Uses the official JS SDK to send one message and print the text response.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const msg = await client.messages.create({
model: "claude-haiku-4-5",
max_tokens: 64,
messages: [{ role: "user", content: "What is Claude?" }],
});
console.log(msg.content[0].text);Claude with a system persona
Adds a system prompt to give Claude a persona, demonstrating how to shape its role.
const response = await client.messages.create({
model: "claude-haiku-4-5",
max_tokens: 256,
system: "You are a concise UX copywriter.",
messages: [{
role: "user",
content: "Write a 10-word tagline for a task-management app."
}],
});
console.log(response.content[0].text);
Discussion