BasedAPIs unifies LLMs, image generation, and embeddings behind a single, OpenAI-compatible endpoint. Swap models with one line — no SDK changes, no vendor lock-in.
# pip install basedapis from basedapis import BasedClient client = BasedClient(api_key="ba_sk_...") # Same call shape for every model response = client.chat.completions.create( model="based-pro-1", messages=[ {"role": "user", "content": "Explain zk-proofs in one line"} ] ) print(response.choices[0].message.content) # → "A zk-proof proves you know a secret without revealing the secret itself."
OpenAI-compatible API. Switch from GPT-4o to Claude to open-weight models by changing one string. Zero code refactor.
Every response ships with a cryptographic proof of inference. Verify model outputs on-chain or off — built on BasedAI's consensus network.
If a provider goes down, traffic reroutes in milliseconds. Your users never see a 500. We track uptime so you don't have to.
Real-time dashboard with per-token, per-request cost breakdown. Set spending caps and alerts. No surprise bills.
Requests routed to the nearest inference node across 12 regions. Sub-200ms first-token latency for streaming completions.
Python, TypeScript, Go, and Rust SDKs. LangChain, LlamaIndex, and Vercel AI SDK support out of the box. CLI for quick testing.
If you've used the OpenAI SDK, you already know BasedAPIs. Change one base URL — or install our SDK — and every model in the library is yours.
base_url="https://api.basedapis.com/v1"from openai import OpenAI client = OpenAI( base_url="https://api.basedapis.com/v1", api_key="ba_sk_..." ) response = client.chat.completions.create( model="based-pro-1", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content)
# No SDK needed — plain cURL curl https://api.basedapis.com/v1/chat/completions \ -H "Authorization: Bearer ba_sk_..." \ -H "Content-Type: application/json" \ -d '{ "model": "based-pro-1", "messages": [{"role": "user", "content": "Hello!"}] }'
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.basedapis.com/v1", apiKey: "ba_sk_..." }); const res = await client.chat.completions.create({ model: "based-pro-1", messages: [{ role: "user", content: "Hello!" }] }); console.log(res.choices[0].message.content);
Grab an API key and make your first request in under 60 seconds.
Get your free API key →