Claude and Codex API guides

Set up Claude API access, understand billing and connect the tools you use. Start with getting and testing an API key, then follow the guide for your application.

Compare prepaid credits and timed API plans, or get help with Claude Code setup and API errors.

Connecting a coding tool? Use the AI agent setup checklist to choose the right key group, model and client configuration.

All guides

Claude API keys. A carefully drawn key unlocking a doorway made from a code window.
Guide

How to get a Claude API key

Get a Claude API key from Anthropic or AI Prime Tech, choose billing, verify your model list, and make a first Python request with the right base URL.

Claude API pricing. A precise mechanical balance weighing small input and output token blocks, with a folded ledger beside it.
Guide

Claude API Pricing, Explained

Understand how Claude API pricing works — input vs output tokens, prompt caching, and how to estimate the cost of a request.

Lower API costs. A thoughtful path of stepping stones ascending from a large stack of paper tokens to a smaller efficient stack.
Guide

The Cheapest Way to Use the Claude API

Practical ways to reduce your Claude API bill without losing quality — model selection, prompt caching, output limits, and more.

Claude in Cursor. An elegant code-editor window with a large hand-drawn pointer selecting a small code block, connected to a paper API plug.
Cursor IDE Guide

Unlimited Cursor with the Claude API

Run Cursor IDE on a flat-rate unlimited Claude plan. Full setup walkthrough, advanced workflows, model selection, troubleshooting, and why unlimited fits heavy Cursor usage.

Claude Code. A compact terminal window opening into an orderly stack of source-code sheets and a small branching project tree.
Claude Code CLI Guide

Unlimited Claude Code Access

Run Claude Code CLI on a flat-rate unlimited API. Environment variables, model mapping, subagents, agent teams, headless mode, and why unlimited access fits Claude Code's quadratic token growth.

Gateway or direct?. Two clean parallel routes crossing an abstract landscape toward the same code-window destination.
Guide

Claude API Gateway vs. Anthropic Direct

An honest comparison of using a Claude API gateway versus the Anthropic API directly — cost, access, and trade-offs.

OpenAI SDK + Claude. Two complementary physical connector shapes joining a code window to another, a clear metaphor for SDK compatibility.
OpenAI-Compatible Guide

Use Claude with the OpenAI SDK: OpenAI-compatible endpoint, streaming, tools and limits

Call Claude through an OpenAI-compatible endpoint: OpenAI Python and Node SDKs with base_url ending in /v1, Bearer auth, streaming with usage, function calling, reasoning_effort, the model IDs that work, and when the native Anthropic API is the better choice.

Compare Claude models. Four distinct sculptural paper forms, small to large, neatly arranged on a long shelf like a considered comparison of capabilities.
Guide

Claude models explained: a Claude model comparison of Claude Opus vs Sonnet vs Haiku vs Fable — all Claude API models, Anthropic model names and prices (2026)

Claude models explained in one Claude model comparison: every Claude API model you can call in 2026 — Fable 5.1, Opus 5, Sonnet 5, Opus 4.8, Sonnet 4.6, Haiku 4.5 — with Anthropic model names and ids, list prices per million tokens, context windows, and which Claude model is best for coding, agents and chat.

Pay with crypto. A simple unbranded engraved coin entering a small paper wallet, linked by a fine line to an API window.
Guide

Paying for the Claude API with Crypto

How to pay for Claude API access using cryptocurrency — supported coins and how the prepaid balance works.

Start using the API. An open gate and a single ticket becoming a key-shaped code connector, suggesting a clear route into a workspace.
Guide

Claude API Access Without a Waitlist

Get Claude API access instantly without an Anthropic account or waitlist, in most regions worldwide.

Use fewer tokens. A paper press neatly condensing a loose pile of small text-like sheets into a compact organized stack, with subtle input/output arrows.
Guide

How to Reduce Claude Token Usage

Concrete techniques to use fewer tokens on the Claude API without hurting output quality.

Claude in Cline. A terminal and planning checklist linked to a neat workbench of three small task cards, showing an autonomous coding workflow.
Cline Extension Guide

Unlimited Cline with the Claude API

Connect Cline to a flat-rate unlimited Claude API. Full setup for Anthropic and OpenAI-compatible providers, Plan/Act mode, MCP, Computer Use, and why unlimited fits Cline's heavy token consumption.

Claude in Roo Code. One central planning card branching into several smaller code-work cards, each on its own clean shelf, representing orchestrated subtasks.
Roo Code Extension Guide

Unlimited Roo Code with the Claude API

Run Roo Code on a flat-rate unlimited Claude API. Configuration profiles, per-mode model assignment, Orchestrator subtasks, custom .roomodes, and why unlimited access fits Roo Code's multiplied API consumption.

Claude in JetBrains. A precise drafting table with a large multi-pane editor frame and a small interchangeable API connector beside it.
JetBrains IDE Guide

Unlimited Claude in JetBrains IDEs

Connect any JetBrains IDE to flat-rate unlimited Claude via the Continue plugin. Shared config.yaml, provider setup, role assignments, per-project overrides, and why unlimited fits JetBrains heavy workflows.

Claude in Aider. Two overlapping source-code pages, one with a restrained plus sign and one with a minus sign, and a small pencil bridging them.
Aider Guide

Aider with Claude through a gateway: ANTHROPIC_API_BASE, config files, architect mode and fixes

Run Aider on Claude through an Anthropic-compatible gateway: ANTHROPIC_API_BASE at the host root, the anthropic/ model prefix, .aider.conf.yml and .env, the OpenAI-compatible route, architect mode, model settings that keep diff edits and the repo map, and the errors users hit.

Claude in VS Code. A simple editor window with a tidy sidebar and three modular extension blocks slotting into its edge.
VS Code Integration Guide

Unlimited Claude in VS Code

Three paths to unlimited Claude in VS Code: Continue for chat and inline edits, Cline for full autonomous agents, Roo Code for orchestrated multi-mode workflows. Setup comparison, when to use each, and why unlimited access fits VS Code's always-on AI usage.

OpenCode setup. An open configuration notebook beside a terminal frame, joined by a clean cable.
OpenCode Guide

OpenCode config for Claude: opencode.json setup, models and common errors

Configure OpenCode for Claude in opencode.json: point the built-in Anthropic provider at a gateway or add a custom @ai-sdk/anthropic provider, choose models and context limits, and fix the errors OpenCode users actually hit (HTML instead of JSON, 404, invalid key, unsupported model, prompt too long).

Hermes Agent. A wing-like folded paper message moving through a small gateway arch toward an orderly code workspace, a metaphor for agent routing.
Hermes Agent Guide

Hermes Agent with Claude through a gateway: custom provider setup, cost controls and fixes

Run Nous Research's Hermes Agent on Claude through an Anthropic-compatible gateway: a named custom provider with the anthropic_messages transport in ~/.hermes/config.yaml, why provider: anthropic ignores a third-party base URL, the settings that drive token use, and documented fixes.

OpenClaw + Claude. An elegant central gateway hub with several fine connecting spokes leading to small chat and tool cards.
OpenClaw Gateway Guide

Running Unlimited OpenClaw on Claude

Deploy OpenClaw on flat-rate unlimited Claude. Provider configuration in openclaw.json, anthropic-messages API type, hub-and-spoke gateway, 50+ channels, skills injection, and why unlimited fits OpenClaw's always-on multi-channel inference.

Compatible APIs. Two differently shaped paper code cards aligning through a small universal adapter, their edges fitting cleanly together.
Guide

What an Anthropic-Compatible API Means

Understand Anthropic-compatible APIs - the Messages API format, and how a drop-in gateway works with existing Claude code.

Claude Code API key. A small physical key fitted into a terminal-shaped lock, with an orderly settings panel and a short cable beside it.
Setup Guide

Claude Code API key — ANTHROPIC_API_KEY: how to get it, set it up, and when to use claude setup-token instead

How to get a Claude Code API key: ANTHROPIC_API_KEY from the Claude Console or an instant gateway key, ANTHROPIC_BASE_URL setup on macOS, Linux and Windows, what claude setup-token and the OAuth token are for, why a Claude session key is not an API key, and the fixes for the common auth errors.

Claude Code costs. A terminal window beside a measured stack of token blocks and an open ledger.
Pricing Guide

Claude Code API Costs — Pricing and How to Cut Them

Claude Code pricing in 2026: what sessions really cost on the API, how token usage grows, subscription vs API billing, and how flat-rate plans remove the surprise.

Fix API errors. A broken connector being carefully rejoined with a small wrench beside a code window, conveying practical troubleshooting without alarmism.
Troubleshooting Guide

Claude API errors explained: server error 500, overloaded 529, rate limit 429, bad request 400 — and the fix for each

Getting a Claude server error? This guide decodes every Claude API error — 400 "input is too long", 429 "rate limit reached", 500 internal server error, 529 "overloaded", and "no healthy upstream" — with the cause, the fix, and retry code that works in production.

Claude API credits. A paper wallet holding a neat stack of token tiles beside a simple meter and an API connector.
Purchase Guide

How to buy Claude API credits

Choose prepaid Claude API credits or a timed plan, check checkout terms, create a gateway key, and verify access before connecting your coding tools.

Is API access free?. A magnifying glass inspecting a blank admission ticket and a key-shaped outline, suggesting checking the terms rather than promising free credit.
The honest version

Claude free API: is there a free Claude API key, and what is actually free in 2026?

Looking for a free Claude API key or a Claude free API tier? Here is the honest answer: what Anthropic gives new console accounts, why 'free Claude API key' generators are scams, whether Claude API keys are free at all, and the cheapest legitimate way to run Claude — credits sold below face value and a doubled first crypto top-up.

API or subscription?. Two balanced open doorways, one framing a code-bracket window and the other framing a simple conversation bubble.
Comparison Guide

Claude API vs Claude Pro/Max Subscription — Which to Choose

Honest comparison of Claude API access vs Claude Pro and Max subscriptions — features, limits, pricing, and which fits developers vs casual users.

Codex CLI. A charcoal terminal window connected to a small compass-like routing dial and two neatly separated provider cards.
Codex CLI Guide

Codex CLI with a custom provider: config.toml, GPT and Claude models, IDE extension and fixes

Set up OpenAI's Codex CLI and IDE extension with a custom provider in ~/.codex/config.toml: base_url, env_key, wire_api = "responses", GPT and Claude models on one gateway, profiles, codex exec, retries, and fixes for the errors Codex users hit (401, 403 no active subscription, 426 WebSocket, model not supported).

Claude in n8n. A short sequence of connected paper workflow nodes, leading from a trigger card through a code block to a finished document.
n8n Guide

Connecting Claude to n8n

Wire n8n's Anthropic node to AI Prime Tech with the Base URL field, route Claude into AI Agent workflows, and fix the common '/v1/models' credential-test failure.

Route with LiteLLM. A refined switchboard receiving several thin cables and sending one clean route to a code window, representing a unifying model proxy.
LiteLLM Guide

Routing LiteLLM to Claude

Configure LiteLLM's model_list to route to AI Prime Tech — anthropic/ vs openai/ prefix, api_base, the URL-suffix gotcha, and using LiteLLM as a unifying proxy.

Claude in Kilo Code. A modular code workbench with a compact editor panel and a set of precisely fitted tool blocks attached to one side.
Kilo Code Guide

Using Claude in Kilo Code

Set up the Kilo Code VS Code extension to drive Claude through AI Prime Tech — provider choice, custom base URL, free-text model id, and the manual context settings.

Claude in Copilot. Two elegant drafting instruments working side by side over a code sheet, with a small external API plug, suggesting collaborative coding.
VS Code Guide

GitHub Copilot Chat with Claude through a gateway: Custom Endpoint setup, agent mode and fixes

Use Claude models in VS Code's Copilot Chat with your own API key: the Custom Endpoint provider with apiType messages, a complete chatLanguageModels.json, agent mode and tool calling, what BYOK does not cover, and fixes for models that don't appear.

Claude in Zed. An open code-editor window crossed by two swift, clean parallel paths that meet at a small API connector.
Zed Guide

Wire Zed to Claude Through the Gateway

Connect the Zed editor to Claude on the multi-model AI Prime Tech gateway. The native Anthropic provider has no api_url override, so use the openai_compatible block — api_url ending in /v1, models declared inline, key in the keychain.

Claude in Cherry Studio. Two small cherry-like conversation nodes joined by a curved stem to a neat model-selection window.
Cherry Studio Guide

Connect Cherry Studio to Claude

Add Claude to Cherry Studio through the multi-model AI Prime Tech gateway. Settings, Model Services, Add an Anthropic-type provider, set the API Host to the host root, and use the trailing # to lock the exact URL.

Claude + LangChain. A sequence of hand-drawn chain links made from small document cards, connecting a prompt sheet to a model window and a final result.
LangChain Guide

ChatAnthropic in LangChain: import, base_url, streaming, tools and errors

Use Claude in LangChain: from langchain_anthropic import ChatAnthropic, point base_url at a gateway (host root, no /v1), the ANTHROPIC_API_URL and ANTHROPIC_BASE_URL variables, streaming, bind_tools, structured output, retries and the common errors.

Claude in Python. An elegant ribbon-like snake curve winding around a code page and connecting to a small API socket.
Python SDK Guide

Anthropic Python SDK: install, set base_url, stream, and handle errors

A practical guide to the Anthropic Python SDK (pip install anthropic): client setup with api_key and base_url or ANTHROPIC_BASE_URL, messages.create, streaming with messages.stream, AsyncAnthropic, timeouts and retries, error classes, request IDs and current Claude model IDs.

Vercel AI SDK. A folded triangular paper structure connecting a code window to a flowing ribbon of response text-like marks, representing streaming application output.
AI SDK Guide

Claude with the Vercel AI SDK: createAnthropic baseURL, streaming and fixes

Run Claude through the Vercel AI SDK with @ai-sdk/anthropic: createAnthropic({ baseURL, apiKey }) with /v1 on the end, generateText and streamText, thinking and prompt caching via providerOptions, the OpenAI-compatible alternative, and the errors a wrong URL produces.

Claude in Factory Droid. A small faceless mechanical assembly arm arranging code cards on an orderly conveyor, representing automated development work.
Factory Droid Guide

Run Factory Droid on Claude

Drive Factory's Droid CLI with Claude through the multi-model AI Prime Tech gateway. customModels in ~/.factory/settings.json with provider anthropic, baseUrl, ${VAR} apiKey, and the /model switch.

The Claude Code API. A terminal window linked to a sealed request envelope and a tidy response page, showing the hidden request flow behind a coding session.
Guide

The Claude Code API, Explained

How the Claude Code API actually works: using your own API key, pointing ANTHROPIC_BASE_URL at a gateway, what Claude Code sends per request, and what a session costs.

Integrate the Claude API. Two clear application window frames joined by a cable that neatly locks into a central code-bracket adapter.
Guide

Integrating the Claude API Into Your Application

A practical Claude API integration tutorial: authentication, Python and TypeScript SDKs, streaming, error handling, and the production checklist most integrations miss.

Unlimited Claude usage. A broad continuous paper loop passing through a code window beside a simple clock, showing sustained work within a chosen time period.
Complete Guide

How to get unlimited Claude usage

Compare Claude subscriptions, metered API usage and timed gateway plans. Check fair-use limits, set up your key, and verify access before a coding session.

Unlimited API plans. An open roll of paper forming an infinity-like loop around a small clock and an API plug, balancing continuous work with timed access.
Guide

What unlimited Claude API access means

Understand timed Claude API plans, eligible usage, fair-use limits, one-time payment and the checks to make before using a plan for coding or applications.

More guides