Anthropic SDK on any model
Anthropic’s own client, pointed at FlintBeam. The Messages API answers on Claude and on every other text model in the catalogue.
- Setup in a minute
- Messages
- Every text model
Get an API key
Sign up, add money on the Billing page, then create a key. It starts with sk-live- and is shown only once — copy it straight away.
Point Anthropic SDK at FlintBeam
Set the base URL to our address with no /v1 — the client adds it — and use your FlintBeam key.
import anthropic
client = anthropic.Anthropic(base_url="https://api.flintbeam.com", api_key="sk-live-your-api-key")
msg = client.messages.create(model="anthropic/claude-sonnet-5-5", max_tokens=1024,
messages=[{"role": "user", "content": "Hello"}])
print(msg.content[0].text)The key is read from x-api-key or Authorization: Bearer. max_tokens is required, as at Anthropic.
Pick a model
Model names are ours: maker/model, exactly as the catalogue writes them. Click one and the code above changes with it.
Input / output prices, live from the catalogue. All 140 models →
Check it works
Run the script. Within a few seconds the request shows up in Usage in your dashboard, with the model, tokens and the exact price.
What works where
On Claude models
- Thinking blocks with their signatures, sent back unchanged
- Prompt caching
On other makers’ models
- Your own tools and
web_search - Claude’s
thinkingis ignored and named in thex-ignored-paramsresponse header.
If something goes wrong
401Invalid API keyinvalid_api_key
The key is missing, wrong or unknown. Check the header, not the balance.
Check the api_key you pass to the client (or ANTHROPIC_API_KEY), and that the key is Active on the API keys page.
402Not enough balanceinsufficient_credits
Not enough balance for the estimated cost of this request.
Top up on the Billing page, or turn on auto top-up so a long session never stops halfway.
404Model not foundmodel_not_found
No such model on sale. Check the exact code against /v1/models.
model must be the full catalogue code with the maker in front, maker/model, exactly as the catalogue writes it — copy it from the model’s page.
403Key not allowed for this modelmodel_not_allowed
This key may not use that model. The model exists — the key is narrowed.
The model exists, but this key was limited to other models. Widen it under “What this key can reach”, or use another key.
429Too many requestsrate_limit_exceeded
The key's spending limit, request rate or token rate for this period is reached, or the provider is busy for a moment. Wait as long as Retry-After says.
Wait as long as Retry-After says, then try again.
Ready in a minute
Create a key, point your tool at FlintBeam, keep coding — on any model.