Claude Code API Reference

Reference hub for Claude Code API documentation, Anthropic API keys, CLI automation, headless mode, and official developer resources.

This page preserves the ClaudeCode101 API reference entry and points developers to the most useful Claude Code and Anthropic API resources.

Claude Code is primarily a command-line coding assistant. For model API calls, SDKs, authentication, and platform endpoints, use Anthropic's official API documentation as the source of truth.

Official API Documentation

Authentication

Most Claude API workflows begin with an Anthropic API key.

export ANTHROPIC_API_KEY="your-api-key"

For Claude Code CLI usage, keep credentials in your local environment or the supported authentication flow described by the official docs. Avoid committing API keys to your repository.

Claude Code CLI Automation

Claude Code can be used in interactive sessions and non-interactive workflows.

Start with these references:

Headless Mode

For scripts, CI jobs, and automation, use Claude Code headless mode. It is useful when you want Claude Code to run a specific prompt without opening a full interactive session.

Related guide:

GitHub and Repository Workflows

If your API or automation workflow involves issues, pull requests, or code review, combine Claude Code with GitHub CLI.

Configuration References

These pages help Claude Code understand your project rules and permitted tools:

  1. Install Claude Code and confirm authentication.
  2. Write a project-level CLAUDE.md.
  3. Configure tools and allowlists.
  4. Add GitHub CLI and MCP servers only when they support a real workflow.
  5. Use Plan Mode before large changes.
  6. Use headless mode for repeatable automation.
Claude Code API Reference