documentation
Quickstart
Blade's gateway is OpenAI-compatible. If your code already speaks OpenAI, you're three lines from a Blade call.
API endpoint: https://api.bladelabs.io/v1.
- 01
Sign up
Create an account with email and password. Go to sign up →
- 02
Create an API key
In your dashboard, click create key. The full key is shown once — store it now, we can't show it again. Keys work immediately against
https://api.bladelabs.io/v1— no waiting, no approval step. - 03
Make your first call
curlcurl https://api.bladelabs.io/v1/chat/completions \ -H "Authorization: Bearer $BLADE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "bladelabs/functiongemma-270m-router", "messages": [{"role": "user", "content": "hello"}] }'
code examples
python
from openai import OpenAI
import os
client = OpenAI(
base_url="https://api.bladelabs.io/v1",
api_key=os.environ["BLADE_API_KEY"],
)
resp = client.chat.completions.create(
model="bladelabs/functiongemma-270m-router",
messages=[{"role": "user", "content": "hello"}],
)
print(resp.choices[0].message.content)javascript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.bladelabs.io/v1",
apiKey: process.env.BLADE_API_KEY,
});
const resp = await client.chat.completions.create({
model: "bladelabs/functiongemma-270m-router",
messages: [{ role: "user", content: "hello" }],
});
console.log(resp.choices[0].message.content);api reference
GET
/v1/models— list available modelscurl
curl https://api.bladelabs.io/v1/models \
-H "Authorization: Bearer $BLADE_API_KEY"POST
/v1/chat/completions— OpenAI-compatible chat completions with tool callingerror semantics
| status | meaning | action |
|---|---|---|
| 400 | invalid request | Fix the payload — check model id, messages, tool schema. |
| 401 | bad key | Rotate your API key in the dashboard. |
| 429 | over capacity | Retry with exponential backoff (start at 250ms, cap at 8s). |