Code examples for connecting LangChain, CrewAI, AutoGen, and custom agents to BazaarLink — a free OpenAI-compatible LLM API with auto:free routing.
Free tier: 10 RPM · 150 req/day · no credit card · no trial expiry.
Sign up at bazaarlink.ai/free — takes under 60 seconds, no credit card required.
Your key format: sk-bl-xxxxxxxxxx
| Framework | Folder | Guide |
|---|---|---|
| LangChain (Python) | langchain/ | Full guide → |
| CrewAI | crewai/ | Full guide → |
| AutoGen | autogen/ | Full guide → |
| Agent Self-Registration | agent-self-registration/ | Full guide → |
auto:free is a special model ID that automatically routes your request to whichever capable free model is currently available. You write one model string — it stays valid indefinitely, no need to track which specific model IDs are free this week.
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(
model="auto:free",
openai_api_key="sk-bl-YOUR_KEY",
openai_api_base="https://bazaarlink.ai/api/v1",
)
response = llm.invoke("Hello!")
print(response.content)BazaarLink is the only free LLM API that lets AI agents provision their own keys programmatically — no human sign-up required.
import requests
reg = requests.post(
"https://bazaarlink.ai/api/v1/agents/register",
json={"name": "my-agent-v1"},
).json()
api_key = reg["api_key"] # ready to use immediately
claim_url = reg["upgrade_url"] # share with human owner to upgrade| Tier | RPM | Requests/day |
|---|---|---|
| Free | 10 | 150 |
| After first deposit | 20 | 300 |
- bazaarlink.ai — main site
- Free API key — get started
- API docs — full reference
- Probe tool — verify your API endpoint