Base URL
Semua request API pakai base URL ini.
https://api.benol.my.id/v1
Authentication
Kirim API key lewat header Authorization.
Authorization: Bearer API_KEY_KAMU
List models
curl https://api.benol.my.id/v1/models \ -H "Authorization: Bearer API_KEY_KAMU"
Chat completions
curl https://api.benol.my.id/v1/chat/completions \
-H "Authorization: Bearer API_KEY_KAMU" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash",
"messages": [{"role":"user","content":"Halo, siapa kamu?"}]
}'Python SDK
from openai import OpenAI
client = OpenAI(
api_key="API_KEY_KAMU",
base_url="https://api.benol.my.id/v1"
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role":"user","content":"Halo"}]
)
print(response.choices[0].message.content)Node.js SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "API_KEY_KAMU",
baseURL: "https://api.benol.my.id/v1"
});Error umum
401
API key salah atau belum dikirim.
402
Saldo habis. Top up dulu via bot.
429
Request terlalu rapat.
500
Provider/model sedang gangguan.