Skip to main content

reapi

OpenAI-compatible SDK for the reAPI gateway.

reAPI speaks the OpenAI API. This package is a thin wrapper around the official openai client, pre-pointed at https://api.reapi.ai/v1 — so you keep every method, type, and streaming helper you already know.

Install

pip install reapi-sdk

Quick start

from reapi_sdk import create_reapi

# Reads your key from REAPI_API_KEY, or pass api_key=...
client = create_reapi()

# Models are discovered at runtime — nothing is hard-coded:
models = client.models.list()

res = client.chat.completions.create(
    model=models.data[0].id,
    messages=[{"role": "user", "content": "Hello from reAPI"}],
)
print(res.choices[0].message.content)

Streaming

stream = client.chat.completions.create(
    model="<model-id>",
    messages=[{"role": "user", "content": "Stream this"}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")

API key

Get an API key at reapi.ai. Provide it either way:

client = create_reapi(api_key="YOUR_KEY")
export REAPI_API_KEY=YOUR_KEY

License

MIT

Metadata

Release files for reapi-sdk 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 reapi-sdk 0.1.0
File Size Uploaded Provenance Actions
reapi_sdk-0.1.0.tar.gz 2.7 kB Without provenance Details for reapi_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reapi-sdk 0.1.0
File Interpreter ABI Platform Actions
reapi_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for reapi_sdk-0.1.0-py3-none-any.whl

Total release size: 6.0 kB

Release files / reapi_sdk-0.1.0.tar.gz

Download URL reapi_sdk-0.1.0.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
044ddcbc054508066da9821ad993683468edd3442cef93ac818762aa7a60841f
BLAKE2b-256 checksum
How to use checksums
a60fe06bbbe5d351bdcb1e454311aabfeea30511d50594ce7799210e758243d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / reapi_sdk-0.1.0-py3-none-any.whl

Download URL reapi_sdk-0.1.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c6a7ad2f9ce7b90f187bbd32996f5ca550c803c9bd29a22275279a5eb9add5a
BLAKE2b-256 checksum
How to use checksums
d6fc4791d44145da84e9923b93dd333c80dfebb260f058e0bcb8b7307d37f125
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for reapi-sdk 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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 No 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