Prerequisites
- An agent whose budget admits the inference provider as a merchant. The default allow-all setting does; a budget restricted to a specific allowlist needs the provider added, or every call fails with
payment_refused. - An API key for that agent. Mint one on the agent’s page. See Mint a key.
Choose a model
The Inference page lists the models the provider prices, grouped by what each produces into Text, Image, Video, Audio, and Other tabs. Text, image, video, and audio models are callable through the inference endpoint today; the other tab says its models are listed for pricing only. Each row shows the identifier to send asmodel, with a copy button, and the model’s display name when the provider publishes one that differs from the identifier, and its price in the unit the model is billed in: text models in USD per 1M tokens for input, output, cached input, and cache writes, with their context window and maximum output in tokens; image models per image; video models per second with any per-call surcharge and length limits; audio models per 1K characters, per track, or per generation, with their input and duration limits. A model priced by input length shows each tier’s price under the base price in each cell, with the input-token threshold it applies from, and a chip under its name naming the thresholds. A model with no charge is marked Free. Any other published price or limit shows as the provider published it. The page is public, and signed-in users reach it from the Inference entry in the sidebar.
Agents read the same list from GET https://inference.agentic.anchorage.com/v1/models, with no API key. Each entry carries the identifier, the model’s owner in owned_by (the maker’s name, or anchorage when no maker is listed or the listed owner is the provider itself), and, where the provider publishes them, a display name, the context window and maximum output in tokens, category tags, a billing mode, and whether the model is currently available. Each entry also states which kind of model it is (chat, image, video, audio, or other), whether it is callable through the endpoint and, when it is, the endpoint path to send it to (for example /v1/chat/completions), whether it is free, and which of its pricing keys are limits rather than prices, so a client can pick a model without knowing the provider’s pricing shapes. Prices are decimal strings in the same units the page shows.
Set up the client
Point your OpenAI-compatible client at these values.base_urlishttps://inference.agentic.anchorage.com/v1.- The API key is the agent’s API key, sent as the bearer token. The snippets read it from the
AGENT_API_KEYenvironment variable. modelis an identifier from the model list, for exampleopenai/gpt-4o-mini.
Use Claude Code or an Anthropic SDK
Claude Code and an Anthropic SDK’s message-creation calls usePOST /v1/messages, which speaks Anthropic’s Messages API. Point them at these values.
- The base URL is
https://inference.agentic.anchorage.com, without/v1. The client adds/v1/messagesitself. - The API key is the agent’s API key. Send it the way the client normally sends an Anthropic key.
modelis a Claude model’s identifier from the model list.
ANTHROPIC_MODEL and, for its background tasks, ANTHROPIC_DEFAULT_HAIKU_MODEL, each to a Claude model’s identifier from the list, so every call Claude Code makes names a model the list prices. For an SDK, pass the same two values as the client’s base_url (or baseURL) and api_key (or apiKey).
Claude Code streams every response, and a streamed response is cut off after 120 seconds. Set CLAUDE_CODE_MAX_OUTPUT_TOKENS to keep long answers under that. A request body is limited to 1.5 MiB, which a long session or one with images can pass; run /compact to shrink it.
See Anthropic Messages API for the headers it forwards and the error shape it returns.
Control repeat requests (optional)
Send anIdempotency-Key header to control whether a repeated request shares a charge or pays again. See Managing idempotency keys.