claude-api

Generates Claude API and Anthropic SDK integration code across nine languages.

2|Updated Mar 29, 2015
One-click install
npx skills add https://github.com/ovisan/dotfiles --skill claude-api-ovisan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-api
Source: https://github.com/ovisan/dotfiles/tree/main/.grok/skills/claude-api
Command: npx skills add https://github.com/ovisan/dotfiles --skill claude-api-ovisan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Claude API code requires up-to-date knowledge of model IDs, pricing, parameter shapes, and SDK conventions that change frequently; this Skill supplies verified, current reference material so generated code matches the live API instead of stale training data. ## Core Features & Use Cases - Multi-language SDK guidance: Language detection routes to dedicated references for Python, TypeScript, Java, Go, Ruby, C#, PHP, and raw cURL, covering streaming, tool use, structured outputs, and error handling. - Current model and parameter reference: Cached model tables with IDs, context windows, and pricing, plus API-drift tables flagging changed shapes like adaptive thinking, effort levels, and refusal fallbacks. - Agent architecture coverage: Decision guides for single calls, tool-use workflows, the Tool Runner, and Managed Agents, including the migrate subcommand for upgrading existing code to newer models. - Use Case: A developer asks to add streaming tool use to a Python backend; the Skill detects Python, loads the Python reference, and produces code using the official anthropic SDK with claude-opus-5, adaptive thinking, and typed exception handling. ## Quick Start Ask the assistant to write a Claude API integration in your project's language, for example to add a streaming chat endpoint with tool use to your Python service.

Frequently Asked Questions about claude-api

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

FAQPage Schema
How do I build an app with the Claude API in Python?

Install the official anthropic package and call client.messages.create with a model ID like claude-opus-5, max_tokens, and a messages array. The Skill's Python reference covers streaming, tool use, and typed error handling with current parameter shapes.

What is the difference between the Tool Runner and the Claude Agent SDK?

The Tool Runner is part of the regular Anthropic SDK and loops over tools you define, with no built-in tools. The Claude Agent SDK is Claude Code packaged as a library with built-in file, bash, and web tools. Both are harness-only; Managed Agents adds hosted deployment.

Which Claude model should I use and what does it cost?

The Skill defaults to claude-opus-5 at $5 per million input tokens and $25 per million output tokens with a 1M context window. The cached model table lists Fable 5, Sonnet 5, Haiku 4.5, and others, and the Models API provides live capability lookups.

Does the Claude API support prompt caching and token counting?

Yes. Prompt caching uses cache_control breakpoints on stable prefixes with ephemeral TTL options, and token counting is available via the count_tokens endpoint. The Skill's shared references document placement patterns and cache invalidation pitfalls.

Why did my Claude API request return a 400 error after upgrading models?

Newer models removed parameters like temperature, top_p, and budget_tokens, which now return 400 errors. Use thinking type adaptive instead of budget_tokens, and consult the model-migration reference for per-version breaking changes.

Can I use the Claude API without an ANTHROPIC_API_KEY environment variable?

Yes. The SDKs and ant CLI resolve credentials from OAuth profiles created by ant auth login, Workload Identity Federation, or ANTHROPIC_AUTH_TOKEN. Run ant auth status to see which credential source is active before asking for a key.