cURL
curl --request POST \ --url https://api.infyn.dev/v2/chat \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "user_id": "<string>", "message": "<string>", "chat_id": "<string>", "thread_id": "<string>", "max_context_tokens": 123 } '
{ "response": "<string>", "context_used": [ { "content": "<string>", "relevance_score": 123, "recency_score": 123, "combined_score": 123, "source_type": "RECENT_CHAT", "timestamp": "2023-11-07T05:31:56Z", "thread_id": "<string>", "memory_id": "<string>", "chat_id": "<string>" } ], "memory_updated": true, "tokens_used": 123, "context_truncated": true, "chunks_created": 123, "thread_id": "<string>" }
Supply Authorization: Bearer <token>. The token can be either a JWT (from supported auth vendors) or an API key generated via /v1/api-key/generate.
Authorization: Bearer <token>
/v1/api-key/generate
External or internal user identifier.
Enhanced chat response
Show child attributes