ZeroEntropy Python API Client

raw JSON →
0.1.0a11 verified Fri May 01 auth: no python

The official Python library for the ZeroEntropy API. Designed for interacting with the ZeroEntropy platform, currently in alpha (0.1.0a11). Released frequently with manual API updates, actively maintained.

pip install zeroentropy
error ImportError: cannot import name 'ZeroEntropy' from 'zeroentropy'
cause Wrong import path or outdated version.
fix
Use: from zeroentropy import ZeroEntropy. Ensure you have the latest version: pip install --upgrade zeroentropy
error httpx.HTTPStatusError: 401 Unauthorized
cause Missing or invalid API key.
fix
Set ZEROENTROPY_API_KEY environment variable or pass a valid api_key to ZeroEntropy()
breaking The library is in early alpha (0.1.0a11). Expect breaking changes between minor versions. Pin exact versions in production.
fix Pin version in requirements.txt: zeroentropy==0.1.0a11
gotcha API key must be set via environment variable ZEROENTROPY_API_KEY or passed directly to constructor. Using environment variable is recommended.
fix Set ZEROENTROPY_API_KEY environment variable or pass api_key to ZeroEntropy()

Initialize client and create a completion.

import os
from zeroentropy import ZeroEntropy

client = ZeroEntropy(
    api_key=os.environ.get("ZEROENTROPY_API_KEY", "<your-key>"),
)

completion = client.completions.create(
    model="zeroentropy-model",
    prompt="Hello, world!",
)
print(completion)