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.

  1. 01

    Sign up

    Create an account with email and password. Go to sign up →

  2. 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.

  3. 03

    Make your first call

    curl
    curl 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 models
curl
curl https://api.bladelabs.io/v1/models \
  -H "Authorization: Bearer $BLADE_API_KEY"
POST/v1/chat/completions— OpenAI-compatible chat completions with tool calling

error semantics

statusmeaningaction
400invalid requestFix the payload — check model id, messages, tool schema.
401bad keyRotate your API key in the dashboard.
429over capacityRetry with exponential backoff (start at 250ms, cap at 8s).