API
One endpoint, one key, $0.03 per million tokens. OpenAI-compatible, ready in 30 seconds.
Endpoints
GET
/v1/models
Lists available models with context limits.
POST
/v1/chat/completions
Chat completion, OpenAI format. Streaming via stream: true.
GET
/api/usage
Your counters: requests, tokens, estimated cost. One call.
GET
/health
API state. No auth required.
Authentication
All requests (except /health) require your MIBIV key in the Authorization header:
Authorization: Bearer MY_MIBIV_KEYYour key is miv_xxxxxxxxxxxx. Created once, usable everywhere. No rotation, no scopes — it's your key, keep it simple.
Examples
Curl
curl https://api.mibiv.com/v1/chat/completions \
-H "Authorization: Bearer MY_MIBIV_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3-flash",
"messages": [{"role": "user", "content": "Hi!"}],
"max_tokens": 200
}'JavaScript (fetch)
const res = await fetch("https://api.mibiv.com/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": `Bearer ${MY_MIBIV_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "glm-5.3-flash",
messages: [{ role: "user", content: "Hi!" }],
max_tokens: 200
})
});
const data = await res.json();
console.log(data.choices[0].message.content);Node.js (OpenAI SDK)
import OpenAI from "openai";
const mibiv = new OpenAI({
baseURL: "https://api.mibiv.com/v1",
apiKey: process.env.MIBIV_KEY
});
const result = await mibiv.chat.completions.create({
model: "glm-5.3-flash",
messages: [{ role: "user", content: "Hi!" }]
});
console.log(result.choices[0].message.content);Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.mibiv.com/v1",
api_key="MY_MIBIV_KEY"
)
resp = client.chat.completions.create(
model="glm-5.3-flash",
messages=[{"role": "user", "content": "Hi!"}],
max_tokens=200
)
print(resp.choices[0].message.content)Error codes
| Code | Meaning |
|---|---|
401 | Missing or invalid key — check the Authorization header |
404 | Unknown model or endpoint |
429 | Too many requests — slow down, or contact us for volume |
502 | Upstream provider unavailable — retry |
Limits
60
requests / minute
16K
tokens / request
180K
max context
—
no monthly limit
Limits are per MIBIV key, not shared across clients. For higher volume, contact [email protected].