Skip to main content

Claude Models from the Anthropic API

Claude models can serve any AI task in DocAI Fabric: splitting, classification, extraction, the Redact step's AI pass, and the assistant. You need one API key from the Anthropic Console, and one tenant model on the Models page (Integrate > Models). Nothing is installed and no cloud account is involved.

This page is the full walkthrough. The general rules for models and endpoints are in Models; what the Test probe measures is in Testing and Measuring Models.

Before you start​

  • An Anthropic API key, created in the Anthropic Console, on an organization with credit on it. An API key is billed per token by Anthropic and is not included in a Claude Pro, Max, Team or Enterprise subscription: those cover the Claude apps, not the API. A subscription alone will not get you a working endpoint.
  • The tenant.manage_models permission ("Manage AI models"), which every Models-page action requires.
  • A decision about where your documents may go. Requests go to Anthropic's API rather than to your own cloud region, and the document text and page images travel with them. If your tenant has data-residency commitments, confirm this route is allowed before a production project depends on it.

The key is stored encrypted and cannot be read back afterwards. Keep your own copy; to change it, type a new one into the endpoint.

Step 1: add the model​

On the Models tab, click Add model.

FieldWhat to enter
Model idThe model's name exactly as Anthropic spells it, for example claude-sonnet-5, claude-opus-5 or claude-haiku-4-5-20251001. This is sent as the model on every request, so a typo shows up as a provider error, not as a validation message. Immutable after creation, so a new Claude version means a new model entry.
Display nameAnything readable, for example Claude Sonnet 5.
Context window (tokens)The model's published context size. Used to fit long documents; too high a number causes truncated requests rather than a clear error.
Supported tasksTick every task this model may serve: split, classify, extract, redact, assistant. Leave ocr unticked: Claude reads page images, but OCR in DocAI Fabric means a dedicated engine that returns word coordinates.
ModalitiesTick Text and Image. Tick Streaming as well if the model will serve the assistant.
Usage counted asinput tokens and output tokens. Anthropic reports both on every call, so cost and budgets work normally.
Estimated costThe provider's published per-million rates for this model. Leave the two prompt-cache rates blank: this route reports no cached tokens (see What to expect in operation).

Step 2: add the endpoint​

A model needs at least one endpoint. Click Add endpoint and fill it in like this:

FieldValue
NameAnything, for example anthropic.
ProtocolOpenAI-compatible.
Endpoint URLhttps://api.anthropic.com
API path/v1/chat/completions. Anthropic's own sample code shows /v1/messages; that is a different API and this app does not speak it.
AuthenticationBearer token, with the API key as the value.
Extra request body (JSON){"temperature": null, "top_p": null, "response_format": null}
Region / Tier / PriorityLeave the defaults unless you are adding a second endpoint.

Why the extra request body matters​

Those three nulls are not optional on current Claude models, and a field set to null is simply not sent. Each one answers a rejection the newer models return (measured on Claude Sonnet 5, 22 September 2026):

FieldWhat happens without the null
temperatureHTTP 400, ``temperature is deprecated for this model
top_pHTTP 400, ``top_p is deprecated for this model
response_formatHTTP 400, response_format.type: Input should be 'json_schema'. Classify, extract, split and redact all ask for JSON mode, so without this null those tasks fail even when a plain text probe passes.

frequency_penalty and presence_penalty are accepted, so they need no null. Older Claude models accept the sampling fields, but the nulls do them no harm: the model then samples at its own default.

Step 3: test it​

Use the Test link in the endpoint health column. Test runs only the operations your assigned tasks need, so what you see depends on Step 1:

OperationRun forOn this route
Text completionevery taskpasses
Structured outputsplit, classify, extract, redactpasses once response_format is nulled, on the prompt alone. Claude formats its JSON generously, so this one operation spends roughly 1400 to 3600 output tokens where a compact model spends 1250
Image inputsplit, extract, redactpasses: page images are sent as data URLs and Claude reads them
Tool callingassistantpasses

Common results and what they mean:

What Test showsCauseFix
HTTP 400, is deprecated for this modela sampling field is still being sentadd that field to the extra request body with a null
HTTP 400, Input should be 'json_schema'JSON mode is still being sentadd "response_format": null
HTTP 401, Invalid Anthropic API Keywrong key, or the key was pasted with surrounding textre-enter the key alone, with Bearer token as the auth mode
HTTP 404the API path is /v1/messageschange it to /v1/chat/completions
model_not_foundthe model id is not one this key can reachcheck the spelling against the Anthropic Console
HTTP 429the organization's rate limitsee Rate limits below
Structured output: "The reply was cut off by the provider's own output limit"something between you and the model stopped the answer earlyon this route Claude's own limit is generous, so suspect a gateway or proxy in front of the endpoint

Step 4: put the model to work, task by task​

Adding a model does not change any project. Two places decide what runs:

  • The Defaults tab sets the tenant-wide default model per task.
  • A project's workflow can override the choice on the individual step, which is where you try a model on one project before making it the default.

What each task asks of the model:

Extract​

The heaviest task and the usual reason to bring Claude. The step sends the page text, the page images, or both, so the model needs the Image modality unless your projects extract from text only. Long documents are cut to fit the context window you declared, so declare the real one. If extracted tables come back short, raise the step's maximum output tokens: the output cap is enforced, and a cut answer is reported as a truncated response rather than silently accepted.

Classify and split​

Both are short, high-volume calls: one decision per document or per page window. They are usually the first place to use a cheaper model. A common setup is Sonnet on extract and Haiku on classify and split, which is two model entries sharing the same key, each with its own rates.

Redact​

The Redact step's AI pass finds sensitive values that rules alone would miss. It sends page images by default, so the same Image modality applies.

Assistant​

The in-app assistant needs tool calling and, for a streaming reply, the Streaming modality. Both work on this route. With the Image modality the assistant also sees the pages of a document it reads; without it, it works from their text. Set it on the Defaults tab, where the assistant and the assistant utility role (short internal jobs such as naming a conversation and the prompt helper) are separate choices. Pointing the utility role at a smaller model is worth it: it runs often and its answers are short.

What to expect in operation​

  • No prompt-cache discount. Anthropic's OpenAI-compatible route reports no cached tokens, and a repeated prompt prefix is billed in full on every call. Extraction prompts are large and repetitive, so this route costs meaningfully more per document than the same model behind a provider that caches. Budget for it.
  • Sampling at the model's default. With temperature removed the model no longer runs at zero, so two runs over the same document can differ slightly in wording. The values extracted from a clear document do not move; a borderline judgement can.
  • Usage and cost work normally. Input and output tokens come back on every call and feed the Usage tab, budgets and the cost estimates.

Rate limits and more than one endpoint​

Anthropic's rate limits apply per organization, not per endpoint, so adding a second endpoint with the same key buys nothing: both share one quota and a 429 hits both. Two endpoints help only when the second one is a genuinely separate capacity, such as a key from another organization, or the same model reached through a different provider. In that case add it as a second endpoint on the same model, and let the routing pool fail over between them.

What this route does not cover​

  • Anthropic's Messages API. DocAI Fabric speaks Chat Completions; the compatible route is the supported way in.
  • Claude hosted elsewhere. Claude served by a cloud provider is a different endpoint with different settings, usually another protocol. Configure it from the provider's own OpenAI-compatible details rather than from this page.