Skip to main content
SambaNova offers SDKs for both Python and JavaScript/TypeScript, making it easy to interact with the SambaNova REST API. The SambaNova Python client works with Python 3.8 and above, while the JavaScript/TypeScript version is designed for server-side environments. Both libraries come with built-in type definitions for request parameters and response fields, and support both synchronous and asynchronous usage.

Usage example

To get started, select your preferred programming language. Then, open a terminal window and install the SambaNova SDK.
Next, copy the following code into a new file.
Once copied into the file, replace the string fields "your-sambanova-base-url" and "your-sambanova-api-key" with your base URL and API Key values. Then run the file with the command below in a terminal window.
After you run the program, you’ll see output similar to the following: