Route any agent's LLM through Floe's metered proxy. One OpenAI-compatible endpoint fronts any OpenAI or Anthropic model — billed per token to your Floe key and capped server-side. No model lock, no provider account juggling, and your provider key never leaves your request.
This is the framework-agnostic version: just the standard openai SDK pointed at
Floe. (For the budget-aware "$1-not-$414 loop kill", see ../crewai-demo.)
- Fronting any priced OpenAI/Anthropic model through a single billed endpoint.
- Per-token metering to one Floe key, with cost returned on a response header.
- A server-side session cap: calls past your budget are refused, not billed.
| Language | TypeScript · Python |
| Framework | Standard openai SDK (framework-agnostic) |
| Floe surface | Metered LLM proxy |
| Base URL | https://credit-api.floelabs.xyz/v1/llm — set as the SDK baseURL/base_url; the client appends /chat/completions (and /embeddings) |
Authorization: Bearer |
your Floe agent key floe_<hex> — auth + billing identity |
X-Floe-Provider-Key |
your OpenAI/Anthropic key — passed through to the provider, never stored |
model (in body) |
any priced model: gpt-5.5, claude-opus-4-8, claude-sonnet-4-6, gpt-5.4-mini, … |
| Cost | metered to your Floe key; returned on the X-Floe-Cost-USDC response header |
| Cap | set a session spend limit — calls past your budget are refused server-side, not billed |
- Node.js 18+ or Python 3.10+
- A Floe agent key (
floe_<hex>) — get one at the dashboard - An OpenAI or Anthropic provider key (
PROVIDER_API_KEY)
cp .env.example .env # FLOE_API_KEY (floe_<hex>) and PROVIDER_API_KEY
# TypeScript
npm install && npm start
# Python
pip install -r requirements.txt && python main.pyGet a Floe agent key at the dashboard → Create an agent. Fund it with a card — no crypto, no wallet to manage.