AcademAI profile stampAcademAI
CoursesLearning PathsMy ProgressSyllabusCertificatesPricingAbout
Become a MemberSign in
AcademAI profile stampAcademAI

Independent premium training for mastering Claude AI, Claude Code, and Anthropic technologies. Source-informed by Anthropic's official training platform.

Learn

  • All Courses
  • Learning Paths
  • AI Syllabus
  • Certificates
  • Start Here

Resources

  • Official Anthropic Training
  • Anthropic Docs
  • GitHub Courses

© 2026 AcademAI. Independent educational project.

Not affiliated with or endorsed by Anthropic PBC.

Courses/Building with the Claude API/Introduction to the Claude API
Course overview

Modules

1Introduction to the Claude API2Authentication and Setup3Making Basic API Requests4Prompt Engineering for API5Advanced Features: Streaming, Vision6Function Calling and Tool Use7Production Deployment Best Practices
Module 1 of 7·10 min read

Introduction to the Claude API

Architecture and capabilities

The Claude API: Your Direct Line to Claude

The Claude API gives developers programmatic access to Claude's capabilities — the same intelligence behind claude.ai, accessible via HTTP requests from any language or platform. Building with the API means you can embed Claude's capabilities into your own products, automate workflows, and build entirely new applications.

API Architecture

The Claude API is a REST API hosted at api.anthropic.com. The primary endpoint for most new builds is the Messages API, which follows a request/response pattern:

  • You send a POST request with a model name, a list of messages, and configuration parameters
  • Claude processes the request and returns a response with the generated content
  • Streaming variants return the response token-by-token for real-time display

Available Models

Anthropic offers a versioned model family. Exact names and availability change, so production apps should read the current model list from Anthropic docs and pin deliberate versions:

  • Claude Haiku — fastest and most cost-efficient; ideal for high-volume, latency-sensitive tasks
  • Claude Sonnet — balanced capability and cost; the best choice for most production applications
  • Claude Opus — highest capability; use for complex reasoning where quality trumps speed

Models are versioned. Pin to a specific model version in production for stability, and review release notes before upgrading.

Key Capabilities via API

  • Text generation and transformation
  • Vision — analyzing images and documents
  • Tool use — Claude calling your defined functions
  • Streaming — incremental response delivery
  • System prompts — persistent instructions for every conversation turn
  • Multi-turn conversations — stateful back-and-forth exchanges

Pricing Model

The API is priced by token consumption — tokens in (input) and tokens out (output) are both charged, at different rates. Input tokens are generally cheaper than output tokens. Costs vary by model: Haiku is dramatically cheaper per token than Opus. For most applications, Sonnet offers the best cost/capability ratio.

Key Takeaways

  • The Claude API is a REST API with a Messages endpoint for programmatic access to Claude
  • Three model tiers: Haiku (fast/cheap), Sonnet (balanced), Opus (highest capability)
  • Key capabilities: text generation, vision, tool use, streaming, and multi-turn conversations
  • Pricing is per token (input + output); Haiku is cheapest, Opus most capable
Course overviewAuthentication and Setup