Skip to main content
SambaNova inference APIs are compatible with the Anthropic client libraries, so existing Anthropic-based applications can target SambaNova with minimal changes.

Download the library

Use SambaNova APIs with the Anthropic client library

Configure the Anthropic client to use SambaNova by setting base_url and api_key.
Don’t have a SambaNova API key? Get one from the API keys page.
You also need to set model to a SambaNova model identifier when calling the API (see the supported models page). Alternatively, set the environment variables:

Messages API

SambaNova exposes a POST /v1/messages endpoint compatible with the Anthropic Messages API standard, in addition to the Chat Completions and Responses endpoints. For full request/response details, examples for tool calling, streaming, thinking, and multi-turn conversations, see the Messages API page.

Count tokens

SambaNova also exposes a POST /v1/messages/count_tokens endpoint compatible with the Anthropic token-counting API. Use it to estimate the token cost of a request before sending it.
For the full parameter list, see the API reference.