Skip to main content
Kyma supports the Anthropic Messages API format. If your app uses the Anthropic SDK, just change the base URL and API key.

Python

JavaScript / TypeScript

With system prompt

Streaming

Switching from Claude to Kyma

If you’re already using Claude, the only changes needed are:
Kyma serves Claude models under their own ids (claude-opus-5, claude-sonnet-5, claude-haiku-4-5, claude-sonnet-4-6, claude-opus-4-7), so you can keep your model name. Claude models are outside the free tier: they return 402 model_requires_paid until your first top-up. To cut cost, or to try Kyma before topping up, switch to an open model:
The open models above are different models from Claude, not copies of it. They run on the signup credit, which is added once your email is verified and spends on the free tier.

Prompt Caching

Some models cache a repeated prompt prefix. pricing.cached on /v1/models is the rate Kyma publishes for cached input on that model — usually below its input rate, but not always, so compare the two for the model you use. Every chat completion reports usage.cost, what the request was charged, and usage.cache_discount, Kyma’s figure for what caching saved on it. Whether a prefix is cached automatically or needs a cache_control marker depends on the model’s creator. See Prompt Caching for details.