Byleeos API

Introduction

Byleeos API adalah REST API untuk mengakses berbagai model AI: coding, belajar, xatanic. Semua teks panjang otomatis wrap turun ke bawah, rata kiri, tanpa scroll horizontal.

Authentication

x-api-key: free-001

Endpoint

POST https://api.byleeos.my.id/api/ask
GET https://api.byleeos.my.id/api/ask?text=halo bantu aku&model=byleeos/byleeos-soft-14b&key=free-001
Field Type Description
model string Pilih model AI: belajar, coding, xatanic
message string Prompt user / teks yang ingin dikirim
history array Riwayat percakapan sebelumnya (optional)

Model Details

Model Type Description
byleeos/byleeos-soft-14b belajar Model fokus penjelasan bertahap, cocok untuk belajar konsep AI, coding, atau pengetahuan umum.
byleeos/byleeos-125-14b xatanic Model cepat, to the point, cocok untuk jawaban singkat dan padat.
byleeos/byleeos-coder coding Model fokus kode & teknis, menghasilkan snippet, contoh program, dan debugging.

Request Type

  • coding → fokus kode & teknis
  • belajar → penjelasan bertahap
  • xatanic → jawaban singkat dan to the point

Responses

Success

{
  "status": true,
  "reply": "Halo! Ada yang bisa dibantu?"
}
      

Error

{
  "status": false,
  "error": "Invalid API Key"
}
      

Examples

curl -X POST https://api.byleeos.my.id/api/ask \
-H "Content-Type: application/json" \
-H "x-api-key: free-001" \
-d '{
  "model": "byleeos/byleeos-soft-14b",
  "message": "halo bantu aku",
  "history": []
}'
 Copy
        
fetch("https://api.byleeos.my.id/api/ask",{
  headers:{     
    "Content-Type":"application/json",
    "x-api-key":"free-001"
  },
  method:"POST",
  body:JSON.stringify({
    model:"byleeos/byleeos-soft-14b",
    message:"halo bantu aku",
    history:[]
  })
})
 Copy
        
import requests
import json

url = "https://api.byleeos.my.id/api/ask"
headers = {"Content-Type": "application/json", "x-api-key": "free-001"}
data = {"model": "byleeos/byleeos-soft-14b", "message": "halo bantu aku", "history": []}

response = requests.post(url, headers=headers, data=json.dumps(data))
print(response.text)
 Copy
        
package main
import (
  "bytes"
  "encoding/json"
  "fmt"
  "net/http"
)
func main() {
  url := "https://api.byleeos.my.id/api/ask"
  data := map[string]interface{}{"model":"byleeos/byleeos-soft-14b","message":"halo bantu aku","history":[]interface{}{}}
  body,_ := json.Marshal(data)
  req,_ := http.NewRequest("POST", url, bytes.NewBuffer(body))
  req.Header.Set("Content-Type","application/json")
  req.Header.Set("x-api-key","free-001")
  client := &http.Client{}
  resp,_ := client.Do(req)
  defer resp.Body.Close()
  buf := new(bytes.Buffer)
  buf.ReadFrom(resp.Body)
  fmt.Println(buf.String())
}
 Copy
        
"byleeos/byleeos-soft-14b","message"=>"halo bantu aku","history"=>[]];
$options = [
  "http" => [
    "header" => "Content-Type: application/json\r\nx-api-key: free-001\r\n",
    "method" => "POST",
    "content" => json_encode($data),
  ],
];
$context = stream_context_create($options);
$response = file_get_contents($url,false,$context);
echo $response;
?>
 Copy
        
require "net/http"
require "json"
url = URI("https://api.byleeos.my.id/api/ask")
data = {model: "byleeos/byleeos-soft-14b", message: "halo bantu aku", history: []}
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
req = Net::HTTP::Post.new(url.path, {'Content-Type'=>'application/json', 'x-api-key'=>'free-001'})
req.body = data.to_json
res = http.request(req)
puts res.body
 Copy