{"id":28163,"library":"sambanova","title":"SambaNova Python SDK","description":"The official Python library for the SambaNova API. Provides synchronous and asynchronous clients for chat completions, embeddings, audio, responses, and vision. Actively maintained, version 1.8.2, with frequent releases.","status":"active","version":"1.8.2","language":"python","source_language":"en","source_url":"https://github.com/sambanova/sambanova-python","tags":["sambanova","llm","api-client","openai-compatible"],"install":[{"cmd":"pip install sambanova","lang":"bash","label":"Install with pip"}],"dependencies":[],"imports":[{"note":"Client is not exported; must use SambaNovaClient.","wrong":"from sambanova import Client","symbol":"SambaNovaClient","correct":"from sambanova import SambaNovaClient"},{"note":"For async usage; also available via sambanova.AsyncSambaNovaClient.","symbol":"AsyncSambaNovaClient","correct":"from sambanova import AsyncSambaNovaClient"}],"quickstart":{"code":"from sambanova import SambaNovaClient\n\nclient = SambaNovaClient(\n    api_key=os.environ.get('SAMBANOVA_API_KEY', ''),\n)\ntry:\n    response = client.chat.completions.create(\n        model='Meta-Llama-3.1-8B-Instruct',\n        messages=[{'role': 'user', 'content': 'Hello'}],\n    )\n    print(response.choices[0].message.content)\nexcept Exception as e:\n    print(f'Error: {e}')","lang":"python","description":"Initialize the sync client with an API key (env var recommended) and call chat completions."},"warnings":[{"fix":"Set os.environ['SAMBANOVA_API_KEY'] or pass api_key argument to SambaNovaClient().","message":"API key must be set either via environment variable SAMBANOVA_API_KEY or passed directly. The library will raise an authentication error if missing.","severity":"breaking","affected_versions":"all"},{"fix":"Refer to SambaNova documentation for exact model IDs.","message":"The model name must match SambaNova's model IDs exactly (e.g., 'Meta-Llama-3.1-8B-Instruct', 'Llama-3.2-11B-Vision-Instruct'). Using a generic OpenAI model name will fail.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.9 or higher.","message":"Support for Python 3.8 was dropped after version 1.5.0. The library now requires Python >=3.9.","severity":"deprecated","affected_versions":">=1.6.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Set the SAMBANOVA_API_KEY environment variable or pass api_key='your_key' to SambaNovaClient().","cause":"No API key provided.","error":"sambanova.lib.SambaNovaError: api_key is required"},{"fix":"Run 'pip install sambanova'.","cause":"Library not installed.","error":"ModuleNotFoundError: No module named 'sambanova'"},{"fix":"Use 'from sambanova import SambaNovaClient'.","cause":"Wrong import: tried 'from sambanova import Client'.","error":"AttributeError: module 'sambanova' has no attribute 'Client'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}