The Lobstack API. A receipt on every call.
OpenAI-compatible. Change one base URL, and every response says which model answered and what it cost.
client = OpenAI( base_url="https://api.openai.com/v1", base_url="https://www.lobstack.ai/api/gateway/v1", api_key="lsk_live_…", )
Nex is the router: send model: "auto" and the cheapest tier that can answer serves it.
$ curl -i https://www.lobstack.ai/api/gateway/v1/chat/completions \ -H "Authorization: Bearer $LOBSTACK_KEY" \ -d '{ "model": "auto", "messages": [...] }' HTTP/1.1 200 OK x-lobstack-request-id: req_8f3a1c92e0b74d16x-lobstack-model: claude-haiku-5-5x-lobstack-tier: smallx-lobstack-complexity: 25x-lobstack-routed: truex-lobstack-cost-usd: 0.000188x-lobstack-savings-usd: 0.018593x-lobstack-baseline-model: claude-fable-5-1x-lobstack-baseline-reason: plan_ceilingx-lobstack-baseline-usd: 0.018780x-lobstack-priced: truex-lobstack-metered: true
Keep your OpenAI SDK. Change one line.
Point the SDK at the Gateway with a Lobstack key. Send model: "auto" and Nex picks the model, or name one yourself.
from openai import OpenAI client = OpenAI( base_url="https://www.lobstack.ai/api/gateway/v1", api_key="lsk_live_…", ) client.chat.completions.create( model="auto", messages=[…], )
Nex, the router, picks the model
- 01
Scored
Your request is scored for how hard it is: what it asks for, its length and the conversation so far.
- 02
Routed
The cheapest tier that can answer it serves it, never above your plan’s ceiling.
- 03
Receipted
The headers name the model served and what it cost against the ceiling.
Every call, key and client, on one ledger.
Your tools, one click. GitHub, Slack, Notion, Linear, or any MCP server.
Put the Gateway in any agent
$ npx -y @lobstack-ai/mcp72 connectors · plus any MCP server
One base URL. A receipt on every call.
$5 of Gateway credit once after verification, whether you start with the API or the app, at provider price. Past your plan, provider price + 50%. No card.