v0.10.0

n8n

Gunakan HTTP Request node sebagai cara paling universal menghubungkan n8n ke Mewlo.

Langkah-langkah

1

Tambahkan HTTP Request node

Pilih method POST dan URL {BASE_URL}/v1/chat/completions.

2

Atur authentication

Tambahkan Authorization: Bearer YOUR_MEWLO_API_KEY dan Content-Type: application/json. Simpan key di n8n Credential bila memungkinkan.

3

Kirim body JSON

Body memakai model, messages, dan stream:false. Ganti {{$json.prompt}} dengan field prompt workflow-mu.

4

Ambil output

Baca choices[0].message.content pada response.

json
{
  "model": "openai/gpt-6-luna",
  "messages": [{
    "role": "user",
    "content": "{{$json.prompt}}"
  }],
  "stream": false
}
text
{{$json.choices[0].message.content}}
text
Webhook/Form → Set/Edit Fields → HTTP Request → Set/Edit Fields → Response / Telegram / Discord / DB

AI Agent node

Dukungan native bergantung credential/model node dan versi n8n. Jika custom OpenAI Base URL tidak tersedia, gunakan HTTP Request atau custom adapter. Agent tools memerlukan tool calling.

  • Referensi: https://docs.n8n.io/