> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Claude Code or an Anthropic SDK

> Run Claude Code, or an Anthropic SDK, on your agent's budget.

Run Claude Code, or an Anthropic SDK, on your agent's budget. Claude Code and an Anthropic SDK's message-creation calls use `POST /v1/messages`, which speaks Anthropic's Messages API.

* The base URL is `https://inference.agentic.anchorage.com`, without `/v1`. The client adds `/v1/messages` itself.
* The API key is the agent's API key. Send it the way the client normally sends an Anthropic key.
* `model` is a Claude model's identifier from the model list.

The agent's budget must admit the inference provider, and the agent needs an API key. See [Before you start](https://docs.anchorage.com/agentic-banking/guides/call-a-text-model.md#before-you-start).

## Claude Code

Set these environment variables before you start it:

```bash theme={null}
export ANTHROPIC_BASE_URL=https://inference.agentic.anchorage.com
export ANTHROPIC_API_KEY=$AGENT_API_KEY
```

Also set `ANTHROPIC_MODEL` and `ANTHROPIC_DEFAULT_HAIKU_MODEL` to Claude models from the list, so every call Claude Code makes names a model the list prices.

## An Anthropic SDK

Pass the same two values as the client's `base_url` (or `baseURL`) and `api_key` (or `apiKey`). The base URL has no `/v1`.

## Long sessions

* Claude Code streams every response. See [Streaming](https://docs.anchorage.com/agentic-banking/concepts/inference.md#streaming) for how long a stream can run.
* The model provider accepts a request body up to about 25 MB, images included, which a long session with many screenshots can still pass. Run `/compact` to shrink it. See [Send images](https://docs.anchorage.com/agentic-banking/guides/call-a-text-model.md#send-images).

See [Anthropic Messages API](https://docs.anchorage.com/agentic-banking/concepts/inference.md#anthropic-messages-api) for the headers it forwards and the error shape it returns.


## Related topics

- [Changelog](https://docs.anchorage.com/agentic-banking/changelog.md)
- [Call a text model](https://docs.anchorage.com/agentic-banking/guides/call-a-text-model.md)
- [Paid inference](https://docs.anchorage.com/agentic-banking/concepts/inference.md)
- [Build with AI](https://docs.anchorage.com/knowledge-base/build-with-ai/overview.md)
