claude-api

Build LLM-powered applications with the Claude API and Anthropic SDKs.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/gtbauke/bj-utils --skill claude-api-gtbauke
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/gtbauke/bj-utils/tree/main/.agent/skills/claude-api
Command: npx skills add https://github.com/gtbauke/bj-utils --skill claude-api-gtbauke

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Developers integrating Claude into their applications face fragmented documentation across multiple SDK languages, evolving model IDs, and feature-specific parameters like adaptive thinking, tool use, and structured outputs. This Skill provides language-aware guidance and current API references so you write correct Claude API code on the first attempt. ## Core Features & Use Cases - Multi-Language SDK Guidance: Detects your project language (Python, TypeScript, Java, Go, Ruby, C#, PHP, or cURL) and loads the matching SDK documentation for installation, streaming, tool use, batches, and file uploads. - Surface Selection: Helps you choose between single Claude API calls, tool-use workflows, and the Agent SDK based on your use case, with a decision tree and feature support matrix. - Current Model & Feature Reference: Provides exact model IDs (e.g., claude-opus-4-6), adaptive thinking and effort parameter usage, compaction, structured outputs, and HTTP error handling, plus WebFetch URLs for live documentation. - Use Case: You are building a TypeScript chat backend with function calling. The Skill detects TypeScript, loads the tool-use and streaming references, and produces code using the SDK tool runner with the correct model ID and streaming helpers. ## Quick Start Ask the assistant to write a Claude API integration in your project's language, for example: "Add a streaming Claude API call with tool use to my Python app."

Frequently Asked Questions about claude-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I make a basic Claude API request in Python?▼

Install the anthropic package, create a client, and call client.messages.create with a model ID like claude-opus-4-6, max_tokens, and a messages array. The response content contains text blocks you can read directly.

Claude API vs Agent SDK: which should I use?▼

Use the Claude API for single calls, workflows, and custom agents with your own tools. Use the Agent SDK when Claude itself needs built-in file, web, or terminal access with permissions and MCP support; it is available for Python and TypeScript only.

Which Claude model ID should I use in my code?▼

Use claude-opus-4-6 by default, claude-sonnet-4-6 for balanced speed and intelligence, or claude-haiku-4-5 for fast low-cost tasks. Use the exact alias strings without date suffixes, and check shared/models.md for legacy model IDs.

Does the Claude API support tool use in Go or Java?▼

Yes, both SDKs support beta tool runners: Go uses BetaToolRunner with jsonschema struct tags, and Java uses annotated classes with BetaToolRunner. C# and PHP support tool use only through manual loops with raw JSON schema definitions.

Why am I getting a 400 error with extended thinking?▼

On Opus 4.6 and Sonnet 4.6, budget_tokens is deprecated; use thinking with type adaptive instead. On older models, budget_tokens must be at least 1024 and strictly less than max_tokens, otherwise the request fails validation.

How do I handle Claude API rate limit errors?▼

The SDKs automatically retry 429 and 5xx errors with exponential backoff. For custom handling, catch typed exceptions like RateLimitError and check the retry-after header rather than string-matching error messages.