Felo API PlatformFelo API Platform

खोज-आधारित चैट

Provider: Felo · भुगतान platform balance से

एक प्रश्न भेजें और एक ही response में web sources के साथ generated answer प्राप्त करें।

सभी examples overview से FELO_API_KEY का उपयोग करते हैं। Calls platform balance का उपयोग करती हैं, Felo Pro credits का नहीं। Response examples केवल illustrative हैं; live content और optional fields बदलते रहते हैं।

एंडपॉइंट

POST /api/v1/data/chat

यह platform-balance endpoint है। /v2/chat पर Felo Search API Pro credits का उपयोग करती है और उसका response envelope अलग है।

अनुरोध

फ़ील्डप्रकारआवश्यकअर्थ
querystringहाँप्रश्न, 1–2,000 वर्ण
accept_languagestringनहींपसंदीदा उत्तर भाषा, जैसे en, ja, या zh-CN; अधिकतम 64 वर्ण
streambooleanनहींfalse होना चाहिए; डिफ़ॉल्ट false

ऐसा language tag उपयोग करें जिसमें 2–8 letters का language code और वैकल्पिक hyphen-separated subtags हों, जैसे zh-TW। Service इस preference को generation request में जोड़ती है। यदि यह छोड़ा जाए, तो upstream service भाषा चुनती है; कोई fixed default नहीं है, और English question English answer की गारंटी नहीं देता। यह preference generated answer पर लागू होती है; source titles और excerpts अपनी मूल भाषा बनाए रखते हैं।

यह endpoint non-streaming JSON लौटाता है। यह stream: true, SSE, messages array या model selection को support नहीं करता।

curl -sS --request POST "https://openapi.felo.ai/api/v1/data/chat" \
  -H "Authorization: Bearer $FELO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"Explain retrieval augmented generation and cite sources.","accept_language":"en","stream":false}'

प्रतिक्रिया

HTTP 200 status: "ok" और एक data object लौटाता है:

{
  "status": "ok",
  "data": {
    "id": "example-chat-id",
    "message_id": "example-message-id",
    "answer": "Retrieval augmented generation adds retrieved context to a model request...",
    "resources": [
      {"title":"Example reference","link":"https://example.com/guide","snippet":"An overview of retrieval augmented generation."}
    ],
    "query_analysis": {"queries":["retrieval augmented generation"]}
  }
}
फ़ील्डअर्थ
data.answerजनरेट किया गया उत्तर
data.resourcesशीर्षक, लिंक और अंश सहित स्रोत पृष्ठ
data.query_analysisवैकल्पिक क्वेरी विश्लेषण; यह null हो सकता है
data.id, data.message_idप्रतिक्रिया पहचानकर्ता

पहले HTTP status जाँचें, फिर answer और sources पढ़ें। /v2/chat की तरह numeric status: 200 की जाँच न करें।

बिलिंग

chat का बिल प्रति request लगता है, model tokens के अनुसार नहीं। current prices और Billing and Errors देखें।

मदद चाहिए?