v0.10.0

Manual setup

Uji daftar model dan Chat Completions Mewlo menggunakan curl atau PowerShell.

Sebelum menghubungkan aplikasi, uji API langsung. Buat API key dari dashboard dan pilih model yang tersedia untuk akunmu. Raw key hanya ditampilkan sekali; simpan sebagai environment variable, bukan di repository.

Nilai koneksi

Base URL

https://www.mewlo.site/v1

API Key

YOUR_MEWLO_API_KEY

Model ID

openai/gpt-6-luna

Langkah-langkah

1

Cek model yang tersedia

Kirim GET /v1/models dengan header Authorization: Bearer. Pastikan model ID yang akan dipakai muncul.

2

Kirim chat completion

Gunakan POST /v1/chat/completions, Content-Type application/json, model, messages, dan stream:false.

3

Periksa hasil

Response Chat Completions umumnya memuat choices[0].message.content.

bash
export MEWLO_API_KEY="YOUR_MEWLO_API_KEY"
curl https://www.mewlo.site/v1/models -H "Authorization: Bearer $MEWLO_API_KEY"
curl https://www.mewlo.site/v1/chat/completions \
  -H "Authorization: Bearer $MEWLO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/gpt-6-luna","messages":[{"role":"user","content":"Balas: Mewlo connected"}],"stream":false}'
powershell
$env:MEWLO_API_KEY="YOUR_MEWLO_API_KEY"
$headers = @{ Authorization = "Bearer $env:MEWLO_API_KEY"; "Content-Type" = "application/json" }
$body = @{ model = "openai/gpt-6-luna"; messages = @(@{ role = "user"; content = "Balas: Mewlo connected" }); stream = $false } | ConvertTo-Json -Depth 5
Invoke-RestMethod -Uri "https://www.mewlo.site/v1/chat/completions" -Method Post -Headers $headers -Body $body
401 Unauthorized+

Periksa API key, pastikan belum direvoke, dan header menggunakan Bearer.

403 Forbidden+

Pastikan akun dan plan memiliki akses ke model tersebut.

404 atau model_not_found+

Periksa Base URL, endpoint, dan ejaan model ID dari /v1/models.

Streaming gagal+

Uji lebih dulu dengan stream:false.

  • Chat Completions: POST {BASE_URL}/v1/chat/completions
  • Daftar model: GET {BASE_URL}/v1/models
  • Gunakan model ID persis seperti katalog.
  • Referensi: Mewlo dashboard/model catalog dan konvensi OpenAI-compatible Chat Completions.