The MyWisy AI Assistant API provides a comprehensive set of endpoints for managing AI-powered educational interactions between assistants, parents, and children. The API is built using FastAPI and follows RESTful principles.
This documentation is available in two formats:
http://localhost:8888http://localhost:8234http://localhost:8000All API endpoints require authentication using an API key header:
X-API-Key: your_api_key_here
POST /api/v1/assistant
Creates a new AI assistant instance. Assistants can be specialized for either child or parent interactions.
{
"company_name": "string",
"name": "string",
"description": "string",
"is_child_assistant": "boolean" // Indicates if the assistant is designed for child interactions
}
{
"id": "string",
"name": "string",
"description": "string",
"owner": "string",
"timestamp": "string",
"is_child_assistant": "boolean"
}
POST /api/v1/conversation
Creates a new conversation between a human and an AI assistant. Enforces child safety by ensuring child users only interact with child-appropriate assistants.
{
"api_key": "string",
"human_id": "string", // Prefix 'ch-' for child, 'pa-' for parent
"assistant_id": "string", // Must match human type (child/parent)
"title": "string",
"summary": "string"
}
{
"id": "string",
"human_id": "string",
"assistant_id": "string",
"title": "string",
"summary": "string",
"timestamp": "string"
}
400 Bad Request:
{
"detail": "When creating a conversation for a child, the assistant must be designed for children"
}
{
"detail": "When creating a conversation for a parent, the assistant must not be designed for children"
}
POST /api/v1/parent
Creates a new parent user.
{
"email": "string",
"company_name": "string",
"name": "string",
"surname": "string",
"location": "string",
"age": "integer",
"gender": "enum"
}
POST /api/v1/child
Creates a new child profile.
{
"company_name": "string",
"parent_id": "uuid",
"name": "string",
"surname": "string",
"location": "string",
"birthdate": "date",
"gender": "enum"
}
WS /api/v1/ws/conversation/{conversation_id}
Establishes a WebSocket connection for real-time conversation updates.
malefemaleotherprefer_not_to_saytextaudioimagesystem