Skip to main content

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)

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)

Source distribution for bf16ai 0.1.0
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)

Table of built distributions (wheels) for bf16ai 0.1.0
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page