Harness 設定
Chat API
query 分析、Web リソース、引用を備えた AI 対話検索を統合します。
POST
/v2/chat認証
Bearer API key
Content type
application/json
レート制限
Per API key and per user windows. Read X-RateLimit headers.
Chat API は AI-powered conversational search をアプリに統合する API です。natural language query を送り、real-time web search results に基づく answer を受け取ります。
Overview
- query を分析・最適化
- relevant information を web search
- search results を ranking/filtering
- sources に基づき AI answer を生成
- answer と source citations を返却
認証
Authorization: Bearer YOUR_API_KEYEndpoint
POST https://openapi.felo.ai/v2/chatリクエスト
| パラメータ | 型 | 必須 | 説明 |
|---|---|---|---|
query | string | はい | user question または search query。1-2000 characters |
レスポンス
{
"status": "ok",
"message": null,
"data": {
"answer": "...",
"query_analysis": { "queries": ["..."] },
"resources": [{ "link": "https://example.com", "title": "Source", "snippet": "..." }]
}
}エラーコード
| Code | HTTP Status | 説明 |
|---|---|---|
INVALID_API_KEY | 401 | API Key invalid または revoked |
MISSING_AUTHORIZATION | 401 | Authorization header がありません |
MISSING_PARAMETER | 400 | required parameter がありません |
QUERY_TOO_LONG | 400 | query が長すぎます |
RATE_LIMITED | 429 | requests が多すぎます |
Example
curl -X POST https://openapi.felo.ai/v2/chat -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"query":"What are the benefits of renewable energy?"}'