Chatwoot Captain को एक custom OpenAI-compatible endpoint पर चलाएं।

Updated 2026-07-30

Self-hosted Chatwoot Captain को Super Admin app configs से configure करता है: CAPTAIN_OPEN_AI_ENDPOINT, CAPTAIN_OPEN_AI_API_KEY, और CAPTAIN_OPEN_AI_MODEL। Endpoint को https://api.apisrouter.com पर point करें (Chatwoot खुद /v1 append करता है) और आपका support AI किसी भी catalog model पर एक key के through जवाब देता है।

Quick answer: Super Admin में तीन Captain configs।

Current self-hosted Chatwoot पर, Captain की LLM settings installation configs हैं, .env variables नहीं; shipped .env.example यह explicitly कहती है और आपको Super Admin, App Configs, Captain की तरफ point करती है। तीन values matter करती हैं: CAPTAIN_OPEN_AI_API_KEY gateway key लेता है, CAPTAIN_OPEN_AI_MODEL model id लेता है, और CAPTAIN_OPEN_AI_ENDPOINT endpoint host लेता है। Endpoint value का एक sharp edge है: इसे बिना /v1 suffix के दें। Chatwoot का initializer एक trailing slash trim करके और /v1 append करके खुद API base बनाता है, और config का अपना description default को exactly उसी shape में https://api.openai.com/ के तौर पर दिखाता है। APIsRouter के लिए, https://api.apisrouter.com enter करें और Chatwoot को https://api.apisrouter.com/v1 derive करने दें। ये configs app boot होने पर पढ़े जाते हैं, तो इन्हें बदलने के बाद Chatwoot restart करें।

CAPTAIN_OPEN_AI_API_KEY:  sk-YOUR-APISROUTER-KEY
CAPTAIN_OPEN_AI_MODEL:    claude-haiku-4-5-20251001
CAPTAIN_OPEN_AI_ENDPOINT: https://api.apisrouter.com
                          (no /v1 -- Chatwoot appends it)

then restart the Chatwoot processes

Captain configured model से क्या करता है।

Chatwoot (GitHub पर लगभग 34K stars) leading open-source customer support platform है, और Captain इसकी AI layer है: एक AI agent जो customer conversations का जवाब आपके help-center articles और FAQs से देता है, एक copilot जो human agents के लिए replies drafts करता है और threads summarize करता है, और document-grounded knowledge features दोनों के पीछे। Self-hosted installations पर जहां Captain उपलब्ध है, यह सब ऊपर configured model के through चलता है। अंदर, Chatwoot boot पर एक बार अपना agents SDK configure करता है: key, derived API base, और default model। हर Captain feature फिर उस base URL को standard chat completions बोलता है, और model id एक plain string के तौर पर travel करती है। Chatwoot model-name prefixes (claude-, gemini-, deepseek-) का एक map रखता है, लेकिन telemetry labeling के लिए, routing के लिए नहीं, तो CAPTAIN_OPEN_AI_MODEL के तौर पर set की गई एक Claude या DeepSeek id भी किसी और string की तरह आपके configured endpoint पर जाती है। Support traffic का एक distinctive cost profile है: कई conversations, छोटे turns, और retrieved articles से assemble किए गए grounded answers। इससे per-conversation cost वह number बनता है जो matter करता है, और यह retrieved context से आने वाले input tokens से dominated होता है। एक fast id assistant tier को अच्छे से handle करती है, जिसमें एक stronger id पर escalate करना एक config change है जब आप चाहें कि copilot बेहतर drafts लिखे।

पूरा setup और boot-time detail।

अपने installation पर Super Admin console खोलें, App Configs पर जाएं और Captain select करें, फिर तीनों values भरें। अगर आपका Chatwoot endpoint config से पहले का है (यह mid-2025 में v4.4 era में आया), पहले upgrade करें; पुराने versions पर सिर्फ key और model exist करते थे और endpoint hardcoded था। चूंकि initializer application boot के दौरान ये configs पढ़ता है, changes web और worker processes के restart के बाद ही effect में आते हैं। इसका मतलब यह भी है कि एक गलत value save time पर fail नहीं होती; यह restart के बाद पहली Captain request पर fail होती है, जो गलत जगह debug करने से पहले जानने लायक है। Captain का एक embedding side भी है: CAPTAIN_EMBEDDING_MODEL (default text-embedding-3-small) आपके help-center content पर document search को power करता है, और यह same configured endpoint के against resolve होता है। अगर आप endpoint को एक gateway पर re-point करते हैं, confirm करें कि जो embedding id आप वहां configure करते हैं endpoint असल में उसे serve करता है; वरना document features को उनके existing setup पर छोड़ दें और switch के बाद इन्हें अलग से validate करें।

# Chatwoot will call <endpoint>/v1/chat/completions
curl -s https://api.apisrouter.com/v1/chat/completions \
  -H "Authorization: Bearer $APISROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"claude-haiku-4-5-20251001",
       "messages":[{"role":"user","content":"ping"}]}'

Support automation के लिए model चुनना।

Evaluation loop जो काम करता है: एक fast id पर एक हफ़्ता चलाएं, usage numbers export करें, फिर copilot-heavy teams को एक stronger id पर चलाएं और vibes की बजाय draft acceptance compare करें। दोनों candidates same key से bill होते हैं, तो comparison priced होकर आता है।

  • AI agent tier volume work है: retrieved articles पर grounded answers, महीने में हज़ारों conversations। claude-haiku-4-5-20251001, gpt-5.4-mini, और gemini-3.5-flash grounding discipline खोए बिना per-conversation cost flat रखते हैं।
  • Copilot tier पूरे threads पढ़ता है और humans के लिए replies drafts करता है, जहां tone और judgment दिखते हैं। claude-sonnet-4-6 वह natural step up है जब draft quality agent productivity drive करती है।
  • Multilingual support desks को अपने असली language mix पर deepseek-v4-pro और gemini-3.5-flash test करने चाहिए; grounded answering quality languages के across English benchmarks से ज़्यादा vary करती है।
  • Per-conversation cost measurable है, theoretical नहीं: usage log से सीधे tokens per conversation गुणा conversations per month।
  • एक model हर installation में सभी Captain features serve करता है, तो अपने dominant workload के लिए चुनें और एक हफ़्ते का असली usage पढ़ने के बाद revisit करें।

जितना उपयोग उतना भुगतान · आधिकारिक मूल्य से कम

Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.

मॉडलआधिकारिक मूल्यहमारा मूल्य
Claude Haiku 4.5 20251001$1.00 / $5.00 per M$0.80 / $4.00 per M
Claude Sonnet 4.6$3.00 / $15.00 per M$2.40 / $12.00 per M
GPT-5.4 mini$0.75 / $4.50 per M$0.60 / $3.60 per M
DeepSeek V4 Pro$0.43 / $0.87 per M$0.40 / $0.90 per M
Gemini 3.5 Flash$1.50 / $9.00 per M$1.20 / $7.20 per M

Chatwoot Captain के लिए specific failure modes।

/v1 double-suffix classic है। चूंकि Chatwoot आप जो भी enter करते हैं उसमें /v1 append करता है, https://api.apisrouter.com/v1 paste करना /v1/v1/chat/completions के against requests produce करता है, जो gateway पर 404 होती हैं। Host बिना /v1 के enter करें। Config changes जो ignore होती दिखें restart rule हैं। Agents SDK installation configs से boot पर एक बार configure होता है; Super Admin में इन्हें edit करना बिना restart किए हर running process में पुराने values जीवित छोड़ देता है। पुराने guides गलत surface की तरफ इशारा करते हैं। पुराने Chatwoot versions के tutorials environment variables या legacy OpenAI integration से OPENAI_API_KEY configure करते हैं; current versions पर Super Admin में Captain configs ही surface हैं, और .env.example यह उतने ही शब्दों में कहती है। एक switch के बाद Captain के पहले reply पर model-not-found का मतलब है CAPTAIN_OPEN_AI_MODEL में एक id typo; gateway की /v1/models listing authoritative spelling है। Authentication errors का मतलब है key और endpoint configs एक साथ belong नहीं करते। और अगर article search या document grounding degrade हो जबकि chat answers ठीक से चल रहे हों, तो embedding config देखें, जो same endpoint के against resolve होने वाला एक अलग model है।

कौन Chatwoot Captain को एक gateway के through route करता है।

  • Self-hosted support teams जो copilot में Claude-quality drafting चाहती हैं बिना एक अलग vendor account और billing relationship के।
  • High-volume desks जहां AI agent ज़्यादातर conversations का जवाब देता है, और per-conversation cost तय करता है कि automation pay करता है या नहीं; fast catalog ids उस number को honest रखते हैं।
  • Teams जो per brand या region एक Chatwoot चला रही हैं, हर installation को अपनी key से metering करते हुए ताकि support AI cost per brand खुद report हो।
  • Operators जो असली traffic पर support models compare करते हैं: हर candidate एक config value और एक restart है, migration नहीं।
  • Developers जिनके पास किसी given vendor की billing तक access नहीं है। बिना card requirement वाला top-up based access per-provider sign-up dependency हटा देता है।

Endpoint verify करें और पहली conversation को debug करें।

पहले Chatwoot के बाहर verify करें: अपनी key से models list करें और CAPTAIN_OPEN_AI_MODEL में set की गई exact id के against एक chat completion चलाएं। अगर वे pass होते हैं, gateway वाला आधा साबित हो जाता है और बाकी सब Chatwoot-side है। फिर restart करें और पहली Captain interaction देखें। Authentication failures key config की तरफ इशारा करती हैं; model-not-found model config की तरफ; 404-shaped errors endpoint config में paste किए गए /v1 की तरफ। अगर Captain features बिल्कुल नहीं दिखते, तो यह आपके installation tier पर availability और licensing है, endpoint configuration नहीं। एक बार conversations flow करने लगें, APIsRouter console per-request model, token counts, और spend दिखाता है। Support AI एक budget line है जो हर महीने compound होती है, और per installation एक key usage log को वह per-desk cost report बना देती है जो आपकी finance team बार-बार मांगती है।

curl -s https://api.apisrouter.com/v1/models \
  -H "Authorization: Bearer $APISROUTER_API_KEY" | head -50

अक्सर पूछे जाने वाले प्रश्न

कौन सा Chatwoot config Captain को एक custom OpenAI-compatible endpoint पर point करता है?

CAPTAIN_OPEN_AI_ENDPOINT, जो Super Admin console में App Configs, Captain के तहत, CAPTAIN_OPEN_AI_API_KEY और CAPTAIN_OPEN_AI_MODEL के साथ set होता है। Current versions पर ये installation configs हैं, .env variables नहीं।

क्या endpoint में /v1 शामिल होना चाहिए?

नहीं। API base बनाते समय Chatwoot खुद एक trailing slash trim करता है और /v1 append करता है। https://api.apisrouter.com enter करें और Chatwoot https://api.apisrouter.com/v1 derive करेगा; खुद /v1 paste करना एक doubled path produce करता है जो 404 होता है।

क्या Captain Claude या DeepSeek models पर चल सकता है?

हां। CAPTAIN_OPEN_AI_MODEL configured endpoint को एक plain string के तौर पर travel करती है; Chatwoot का provider-prefix map सिर्फ telemetry लेबल करता है। Gateway जो भी id serve करता है वह काम करती है, claude-haiku-4-5-20251001 और deepseek-v4-pro शामिल।

मेरा config change effect में क्यों नहीं आया?

Captain की LLM settings application boot पर पढ़ी जाती हैं। Super Admin में configs edit करने के बाद Chatwoot के web और worker processes restart करें; running processes तब तक पुराने values रखते हैं।

क्या endpoint config Captain के document search को affect करता है?

Embedding model (CAPTAIN_EMBEDDING_MODEL, default text-embedding-3-small) same endpoint के against resolve होता है। Confirm करें कि endpoint आपके configure किए embedding id को serve करता है, या switch के बाद document features को अलग से validate करें।

मुझे कौन सा Chatwoot version चाहिए?

Endpoint config mid-2025 में v4.4 era में आया। पुराने versions सिर्फ key और model expose करते हैं एक hardcoded OpenAI endpoint के साथ, तो Captain को एक gateway पर point करने से पहले upgrade करें।