Fewzen AI API Endpoints
Explore the various endpoints available in the Fewzen AI API. This guide provides detailed information on each endpoint, including their purposes, required parameters, and usage examples.
Endpoint Categories
Chat
Endpoints for managing conversations and generating responses.
AI Agents
Endpoints for creating, managing, and interacting with AI agents.
Analytics
Endpoints for retrieving analytics and performance data.
Knowledge Base
Endpoints for managing and querying the AI's knowledge base.
Chat Endpoints
Endpoint | Method | Description |
---|---|---|
/v1/chat | POST | Send a message and receive an AI-generated response |
/v1/chat/history | GET | Retrieve chat history for a specific conversation |
Example: Sending a Chat Message
cURL Example
curl -X POST https://api.fewzen.ai/v1/chat \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "user", "content": "What is the capital of France?"}
]
}'
AI Agent Endpoints
Endpoint | Method | Description |
---|---|---|
/v1/agents | POST | Create a new AI agent |
/v1/agents/{agent_id} | GET | Retrieve details of a specific AI agent |
/v1/agents/{agent_id} | PUT | Update an existing AI agent |
/v1/agents/{agent_id}/train | POST | Train or fine-tune an AI agent |
Analytics Endpoints
Endpoint | Method | Description |
---|---|---|
/v1/analytics/usage | GET | Retrieve API usage statistics |
/v1/analytics/performance | GET | Get performance metrics for AI agents |
Knowledge Base Endpoints
Endpoint | Method | Description |
---|---|---|
/v1/knowledge | POST | Add new information to the knowledge base |
/v1/knowledge/search | GET | Search the knowledge base for specific information |
/v1/knowledge/{entry_id} | PUT | Update an existing knowledge base entry |
Response Formats
All API responses are returned in JSON format. A typical successful response will have the following structure:
{
"success": true,
"data": {
// Response data specific to the endpoint
},
"meta": {
// Metadata about the request/response
}
}
In case of an error, the response will include an error message and code:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Description of the error"
}
}
Need More Details?
For in-depth information on request/response formats, parameters, and advanced usage, check out our detailed API reference.
View Full API Reference