brime
The live-web toolkit for AI apps. One API key. One SDK. Search, scrape, and research the open web — clean output, sane defaults, no plumbing.
Documentation | Get Your API Key | Changelog | GitHub
pip install brime
Python 3.9+. Sync and async clients, exponential-backoff retry, with_raw_response observability, fully typed (py.typed). Single dependency tree: httpx + pydantic. Released via npm-style Trusted Publishing — every wheel ships with PyPI provenance.
Why brime?
- One key, three primitives.
search,extract,research— the shape every AI app needs from the web. - Tuned defaults. No depth selectors, no round counters, no knobs to babysit. The gateway is tuned for you; you pass a query, you get a clean answer.
- Drop-in compatible. Already on Tavily, Exa, or Parallel? Point their SDK at our adapter URL and your code keeps working. Migrate when you're ready.
- Honest pricing. Flat per-call credits. 0.5 for search, 1 per URL for extract, 5 for research. No surprises.
30 seconds
from brime import Brime
brime = Brime() # reads BRIME_API_KEY
# Live answer + ranked sources, sub-second.
result = brime.search(query="what changed in the latest TypeScript release")
print(result.answer)
That's the whole shape. Same pattern for extract and research.
What you can build
Search the open web
result = brime.search(
query="tesla earnings",
topic="finance", # optional: news / general / finance recency hint
time_range="week", # optional: day / week / month / year
domains=["sec.gov"], # optional allow-list
)
Turn any URL into clean markdown
result = brime.extract(urls=[
"https://example.com",
"https://en.wikipedia.org/wiki/BM25",
])
for r in result.results:
print(r.url, len(r.markdown))
for f in result.failed:
print("skipped", f.url, f.error.message)
Handles HTML, PDF, DOCX, and JavaScript-heavy SPAs. The smart-clean pipeline strips chrome, nav, cookie banners, and template noise — what's left is the article.
Multi-step research with citations
result = brime.research(
query="compare frontier coding models with concrete benchmark numbers",
)
print(result.answer)
print(f"{len(result.sources)} sources cited")
One call, ~30–90 seconds, real synthesis from real sources.
Live progress? Stream it:
for evt in brime.research_stream(query="..."):
print(evt.event, evt.data)
if evt.event in ("complete", "error", "timeout"):
break
Authentication
export BRIME_API_KEY="sk-brime-..."
Brime() # uses BRIME_API_KEY
Brime(api_key="sk-brime-...") # explicit
Brime(base_url="https://...") # staging override (or BRIME_BASE_URL env)
Get a key at brime.dev — the free tier comes with 1,000 credits/month and no card.
Async
Every method is mirrored on AsyncBrime:
import asyncio
from brime import AsyncBrime
async def main():
async with AsyncBrime() as brime:
result = await brime.search(query="python async io")
print(result.answer)
asyncio.run(main())
Async streaming works the same way:
async with AsyncBrime() as brime:
async for evt in brime.research_stream(query="..."):
if evt.event == "complete":
print(evt.data)
break
Error handling
Typed exceptions, predictable surface area:
from brime import (
BrimeError,
AuthenticationError,
RateLimitError,
InsufficientCreditsError,
)
try:
brime.search(query="...")
except AuthenticationError:
... # bad key
except RateLimitError:
... # back off
except InsufficientCreditsError:
... # top up
except BrimeError as e:
print(e.code, e.message)
Idempotency, baked in
extract calls require an Idempotency-Key — the SDK auto-generates one per call so accidental retries never double-charge. Pin it yourself for cross-process dedup:
brime.extract(
urls=["https://x"],
idempotency_key="user-42-prefetch-2026-05",
)
Configuration
| Constructor arg | Env var | Default |
|---|---|---|
api_key |
BRIME_API_KEY |
— (required) |
base_url |
BRIME_BASE_URL |
https://api.brime.dev |
timeout |
— | 30.0 seconds |
Per-call override: brime.search(query="...", timeout=60).
Already using Tavily, Exa, or Parallel?
You don't have to rip them out. Brime exposes wire-compatible adapters:
TavilyClient(api_key, api_base_url="https://api.brime.dev/tavily")
Exa(api_key=..., base_url="https://api.brime.dev/exa")
Parallel(api_key, base_url="https://api.brime.dev/parallel")
Same response shapes, same code. Switch to the native brime SDK when you want the extras (research synthesis, SSE streaming, smart-clean extract).
Links
- Docs — docs.brime.dev
- API reference — docs.brime.dev/api-reference
- Status — brime.dev
- Issues — github.com/brime-dev/brime-python/issues
License
MIT © Brime
Metadata
Release files for brime 0.2.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 |
|---|---|---|---|---|
| brime-0.2.0.tar.gz | 19.3 kB | Without provenance | Details for brime-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| brime-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for brime-0.2.0-py3-none-any.whl |
Total release size: 43.6 kB
Release files / brime-0.2.0.tar.gz
| Download URL | brime-0.2.0.tar.gz |
|---|---|
| Size | 19.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4af303d09c1ea00f9e750361a9124a9ac2487e2716aae56e6e617fdf9310c008
|
|
BLAKE2b-256 checksum How to use checksums |
3d1682f698798130b20f355856fb17502897e8db733527d6a92697c500a3d299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / brime-0.2.0-py3-none-any.whl
| Download URL | brime-0.2.0-py3-none-any.whl |
|---|---|
| Size | 24.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef41c363036061050f5355e735be84162fb43c16476eceb3031af662a21bf3b3
|
|
BLAKE2b-256 checksum How to use checksums |
326954516ef889b5768fe607c5f29310fb07963c668f9d2be14dbab3b058ae2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for brime 0.2.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.