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.
Base URL
https://www.mewlo.site/v1
API Key
YOUR_MEWLO_API_KEY
Model ID
openai/gpt-6-luna
Kirim GET /v1/models dengan header Authorization: Bearer. Pastikan model ID yang akan dipakai muncul.
Gunakan POST /v1/chat/completions, Content-Type application/json, model, messages, dan stream:false.
Response Chat Completions umumnya memuat choices[0].message.content.
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}'$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 $bodyPeriksa API key, pastikan belum direvoke, dan header menggunakan Bearer.
Pastikan akun dan plan memiliki akses ke model tersebut.
Periksa Base URL, endpoint, dan ejaan model ID dari /v1/models.
Uji lebih dulu dengan stream:false.