bf16ai — Official Python SDK for bf16.ai
Zero-dependency Python SDK (>=3.9) for bf16.ai — uncensored 1M-context open-weight LLM inference API (DeepSeek V4.1 Flash, GLM-5.3, GLM-5.3 Flash, Kimi K3.1 Pro) with automatic prompt caching and strict Zero Data Retention (ZDR).
Install
pip install bf16ai
Quickstart
import bf16ai
client = bf16ai.Client() # Reads BF16_API_KEY from env
# Check live balance, tier & concurrency via GET /v1/me
me = client.me()
print(f"Balance: ${me['balance']['available_usd']:.4f} ({me['tier']['name']})")
# Run a 1M-context chat completion
res = client.chat(
[{"role": "user", "content": "Give 3 practical tips for prompt-cache hit rates in coding agents."}],
model=bf16ai.MODEL_DEEPSEEK_V41_FLASH_FAST,
)
print(res["choices"][0]["message"]["content"])
Streaming
for chunk in client.chat_stream(
[{"role": "user", "content": "Audit this FastAPI dependency for auth bypass risks."}],
model=bf16ai.MODEL_GLM_53,
):
delta = chunk.get("choices", [{}])[0].get("delta", {}).get("content", "")
print(delta, end="", flush=True)
Official Links
- Website & Console (
$0.20starter credit): https://bf16.ai - API Documentation: https://bf16.ai/docs
- Live Model Catalog & Pricing: https://bf16.ai/models
- Coding Agent Cost Calculator: https://bf16.ai/tools/cost-calculator
- Open-Source Inference Grants (
$50API credits): https://bf16.ai/open-source - Official CLI (
npx bf16ai claude): https://github.com/BF16-AI/bf16
License
MIT © BF16 Team
Metadata
Release files for bf16ai 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bf16ai-0.1.0.tar.gz | 5.8 kB | With provenance | Details for bf16ai-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bf16ai-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for bf16ai-0.1.0-py3-none-any.whl |
Total release size: 11.0 kB
Release files / bf16ai-0.1.0.tar.gz
| Download URL | bf16ai-0.1.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d703bd8140942fc90cb4f85760eedeb7c639436538270dccae36f7f546eeac64
|
|
BLAKE2b-256 checksum How to use checksums |
2c0f163bc24cf7a60c88ad95f4e28f835b3ddf68eb9c5dee638c6dadb466d5f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logRelease files / bf16ai-0.1.0-py3-none-any.whl
| Download URL | bf16ai-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
15431606070344167a4295c6354a1f1e577565ceadb3ad69b7842e2810dc7cf6
|
|
BLAKE2b-256 checksum How to use checksums |
e963fe21132d8af5b4f11df2e726f84ac9ed631d03e289620ef1d8abd795aa53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logSecurity for bf16ai 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bf16ai-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.