Python SDK for the Silvol inference API — OpenAI-compatible, decentralised GPU.
Project description
silvol-python
Python SDK for Silvol — an OpenAI-compatible inference API running on Nosana's decentralised GPU grid.
Drop-in replacement for the OpenAI SDK. Change the base URL and your key; keep the rest of your code.
Install
pip install silvol
With optional framework integrations:
pip install silvol[langchain] # LangChain
pip install silvol[crewai] # CrewAI
pip install silvol[all] # both
Quickstart
from silvol import Silvol
client = Silvol(api_key="sk-svl-...") # or set SILVOL_API_KEY env var
resp = client.chat.completions.create(
model="DeepSeek-R1-Distill-Qwen-7B",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
Async:
import asyncio
from silvol import AsyncSilvol
async def main():
client = AsyncSilvol(api_key="sk-svl-...")
resp = await client.chat.completions.create(
model="DeepSeek-R1-Distill-Qwen-7B",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
async for chunk in resp:
print(chunk.choices[0].delta.content or "", end="", flush=True)
asyncio.run(main())
LangChain
from silvol.integrations.langchain import SilvolChat
llm = SilvolChat(api_key="sk-svl-...")
result = llm.invoke("Summarise the Silvol architecture in one sentence.")
print(result.content)
CrewAI
from silvol.integrations.crewai import SilvolLLM
from crewai import Agent, Task, Crew
llm = SilvolLLM(api_key="sk-svl-...")
researcher = Agent(
role="Senior Researcher",
goal="Uncover groundbreaking technologies in AI",
backstory="...",
llm=llm,
)
Models
| Model ID | Context | Notes |
|---|---|---|
DeepSeek-R1-Distill-Qwen-7B |
32k | Always-on (free tier) |
llama-3.1-70b |
128k | On-demand deployment |
qwen-2.5-coder-32b |
32k | On-demand deployment |
Full list: GET https://api.silvol.ai/v1/models
Authentication
Get your API key from the Silvol Dashboard.
Keys are prefixed sk-svl-. Pass it as api_key= or set the OPENAI_API_KEY
environment variable (the SDK checks it automatically).
Links
- Docs: silvol.ai/docs
- Dashboard: silvol.ai/dashboard
- PyPI: pypi.org/project/silvol
- GitHub: github.com/optimuscodexprimus/silvol-python
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file silvol-0.2.0.tar.gz.
File metadata
- Download URL: silvol-0.2.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e82f670d9ac1ea7182e04854f7472444e8973a061c88cc47cbd3af1c530d0a8b
|
|
| MD5 |
40cfaef6cc85e9c2c42e0b0365bf70ce
|
|
| BLAKE2b-256 |
bb4cd5b945671dc4d7be2bcd3d8dfba710fc93fea5f9128336cab7661971c298
|
Provenance
The following attestation bundles were made for silvol-0.2.0.tar.gz:
Publisher:
publish.yml on optimuscodexprimus/silvol-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
silvol-0.2.0.tar.gz -
Subject digest:
e82f670d9ac1ea7182e04854f7472444e8973a061c88cc47cbd3af1c530d0a8b - Sigstore transparency entry: 1674889965
- Sigstore integration time:
-
Permalink:
optimuscodexprimus/silvol-python@accba928e9c59de2f61d8eb0ad5bf09ad8e78a57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/optimuscodexprimus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@accba928e9c59de2f61d8eb0ad5bf09ad8e78a57 -
Trigger Event:
release
-
Statement type:
File details
Details for the file silvol-0.2.0-py3-none-any.whl.
File metadata
- Download URL: silvol-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86ae52d14f490b34838bcc585f148ba1e7755bf1c09373dea144e73f04bc562c
|
|
| MD5 |
6a902f700c861876b7b97313ab201c76
|
|
| BLAKE2b-256 |
0736242eeb27fce333c56532c009409c9fdb49c9e2cd567e80f501924d776bf8
|
Provenance
The following attestation bundles were made for silvol-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on optimuscodexprimus/silvol-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
silvol-0.2.0-py3-none-any.whl -
Subject digest:
86ae52d14f490b34838bcc585f148ba1e7755bf1c09373dea144e73f04bc562c - Sigstore transparency entry: 1674890005
- Sigstore integration time:
-
Permalink:
optimuscodexprimus/silvol-python@accba928e9c59de2f61d8eb0ad5bf09ad8e78a57 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/optimuscodexprimus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@accba928e9c59de2f61d8eb0ad5bf09ad8e78a57 -
Trigger Event:
release
-
Statement type: