VendoVendo Docs
Getting started

Python quickstart

Install vendo-sdk and fetch your first token in 5 minutes.

Install

pip install vendo-sdk
# Optional: requests-based session helper
pip install "vendo-sdk[http]"
# Optional: async (aiohttp) support
pip install "vendo-sdk[async]"

Requirements: Python 3.11+, stdlib only for the base install.

OSS mode (no account needed)

Set the conventional env var for each integration you use:

# .env — no VENDO_API_KEY needed
OPENAI_API_KEY=sk-...
TELEGRAM_BOT_TOKEN=12345:abcde

Then call vendo.token(slug):

import vendo

openai_key = vendo.token("openai")   # returns OPENAI_API_KEY
bot_token = vendo.token("telegram")  # returns TELEGRAM_BOT_TOKEN

Vendo mode (OAuth refresh + managed keys)

Set VENDO_API_KEY from your Vendo dashboard. Keys start with the vendo_sk_ prefix and are sent as Authorization: Bearer <key> to the proxy.

VENDO_API_KEY=vendo_sk_...
import vendo

# Same call — SDK detects mode automatically
openai_key = vendo.token("openai")

# List all connected integrations for this deployment
connections = vendo.connections.list()

# Check wallet balance
balance = vendo.billing.balance()
print(f"{balance.credits_remaining_micros / 1_000_000:.4f} USD remaining")

Bulk tokens

tokens = vendo.tokens(["openai", "slack", "telegram"])
# returns {"openai": "sk-...", "slack": "xoxb-...", "telegram": None}

Pre-authed requests session

Requires pip install "vendo-sdk[http]". Auto-refreshes on 401. Use a slug that exists in the BYOK catalog (or in Vendo-mode connections):

sess = vendo.session("gmail")
resp = sess.get("https://gmail.googleapis.com/gmail/v1/users/me/profile")

Async usage

AsyncVendo works out of the box on the stdlib (urllib + asyncio.to_thread). The [async] extra installs aiohttp as a performance optimization — it is not required:

pip install "vendo-sdk[async]"  # optional; faster HTTP

AsyncVendo() is Vendo-mode-only — it requires VENDO_API_KEY (the constructor raises AuthError otherwise). For OSS / BYOK use the sync top-level vendo.token(...) instead.

import asyncio
from vendo import AsyncVendo

async def main():
    async with AsyncVendo() as client:  # needs VENDO_API_KEY
        token = await client.token("openai")
        connections = await client.connections.list()

asyncio.run(main())

Check the mode

vendo.is_vendo_mode()  # True if VENDO_API_KEY is set

Per-slug override (escape hatch)

Set VENDO_TOKEN_<UPPER_SLUG> to short-circuit the resolution chain for a specific slug. This wins over both Vendo mode and the BYOK env var, and is useful when testing a custom integration that isn't in the catalog:

VENDO_TOKEN_MYTOOL=sk-test-...
vendo.token("mytool")  # returns the override value

Next steps

On this page