AISBF Logo AISBF

AI Service Broker Framework — AI Should Be Free

AISBF tutorial

Build a Multi-Provider AI Gateway with AISBF

Use AISBF as one OpenAI-compatible control plane for providers, user tokens, routes, quotas, and analytics.

Verified route formats

For the hosted user API, the URL is /api/u/<username>/chat/completions. User-owned routes use:

So yes: user-rotation/myrotation is correct for a user rotation on the user endpoint. Plain rotation/myrotation is the global/admin form.

AISBF dashboard overview with provider, rotation, autoselect, user, and server status cards.
AISBF dashboard overview with provider, rotation, autoselect, user, and server status cards.

1. Create an API token

export AISBF_API_TOKEN="your-token-here"
export AISBF_USERNAME="your-aisbf-username"

2. List models

curl -H "Authorization: Bearer $AISBF_API_TOKEN" \
  "https://aisbf.cloud/api/u/$AISBF_USERNAME/models"

3. Send chat

curl -X POST \
  -H "Authorization: Bearer $AISBF_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"user-rotation/myrotation","messages":[{"role":"user","content":"Summarize this deployment note in 5 bullets."}]}' \
  "https://aisbf.cloud/api/u/$AISBF_USERNAME/chat/completions"

4. Python

import os, requests
base="https://aisbf.cloud"
r=requests.post(f"{base}/api/u/{os.environ['AISBF_USERNAME']}/chat/completions",headers={"Authorization":f"Bearer {os.environ['AISBF_API_TOKEN']}"},json={"model":"user-provider/myprovider/gpt-4o-mini","messages":[{"role":"user","content":"Write a changelog entry."}]})
r.raise_for_status()
print(r.json()["choices"][0]["message"]["content"])

Try AISBF

AISBF is open source and also available as a hosted service. During the current testing period, hosted Pro is temporarily available as unlimited access for €2/month.