AI Suite simplifies access to multiple large language models (LLMs) through a unified interface. Use the following steps to integrate and interact with the SambaNova API using the AI Suite interface.

1

Setup your API key

export SAMBANOVA_API_KEY="your-api-key"
2

Run the command to install the package

pip install aisuite
3

Make a request

Include an import statement for the aisuite library in your file. To access the SambaNova API, prefix the model name with sambanova: followed by the specific model identifier. For example: sambanova:Llama-4-Maverick-17B-128E-Instruct. You can now make requests to any Supported model.

Example code

import aisuite as ai
client = ai.Client()

models = ["sambanova:Llama-4-Maverick-17B-128E-Instruct", "sambanova:DeepSeek-V3-0324"]

messages = [
    {"role": "system", "content": "Respond in Pirate English."},
    {"role": "user", "content": "Tell me a joke."},
]

for model in models:
    response = client.chat.completions.create(
        model=model,
        messages=messages,
        temperature=0.75
    )
    print(response.choices[0].message.content)

This is helpful because it allows you to compare speed and accuracy across different providers using the same codebase. For instance, you can include openai:gpt-4o alongside other models in your list.

For more information, see the AI Suite README on Github.