Overview

The MyWisy AI Assistant API provides a comprehensive set of endpoints for managing AI-powered educational interactions between assistants, parents, children, and related resources. The API is built using FastAPI and follows RESTful principles.

Documentation

  • Interactive Documentation: Available through Swagger UI
  • Reference Documentation: This current page

Base URLs

  • Development: http://localhost:8888
  • Staging: http://localhost:8234
  • Production: http://localhost:8000

Authentication

All API endpoints require authentication using an API key header:

X-API-Key: your_api_key_here

Rate Limiting

  • Default: 100 requests per minute
  • Burst: 200 requests
  • Reset: Every 60 seconds

Common Response Codes

  • 200: Success
  • 201: Created
  • 400: Bad Request
  • 401: Unauthorized
  • 403: Forbidden
  • 404: Not Found
  • 429: Too Many Requests
  • 500: Internal Server Error

Endpoints

See the Swagger UI for full request/response schemas and try-it-out functionality.

Assistant Management

  • POST /assistant: Create an AI assistant
  • PUT /assistant: Update assistant description by name
  • GET /assistant: Get assistant by name
  • GET /assistant/all: List all assistants for a company
  • DELETE /assistant: Delete assistant by name

Parent Management

  • POST /parent: Create a parent profile
  • GET /parent: Get parent by ID
  • GET /parent/email: Get parent by email
  • GET /parent/all: List all parents for a company
  • PUT /parent: Update parent profile
  • DELETE /parent: Delete parent by ID
  • DELETE /parent/email: Delete parent by email
  • GET /parent/children: List all children for a parent

Child Management

  • POST /child: Create a child profile
  • PUT /child: Update child profile
  • GET /child: Get child by ID
  • GET /child/name: Get child by name and parent
  • GET /child/all: List all children for a company
  • DELETE /child: Delete child by ID
  • DELETE /child/name: Delete child by name and parent

Company Management

  • POST /company: Create a company profile
  • PUT /company: Update company profile
  • GET /company: Get company by name
  • GET /company/all: List all companies
  • DELETE /company: Delete company by name
  • POST /company/api_key: Create API key for company
  • GET /company/api_key: Get API key by value
  • GET /company/api_key/all: List all API keys for a company
  • DELETE /company/api_key: Delete API key by value

Conversation Management

  • POST /conversation: Create a conversation
  • PUT /conversation: Update conversation title/summary
  • GET /conversation: Get conversation by ID
  • GET /conversation/all/human: List all conversations for a human
  • GET /conversation/all/assistant: List all conversations for an assistant
  • DELETE /conversation: Delete conversation by ID
  • POST /conversation/talk: Send a message to an assistant and get a response
  • POST /conversation/talk/audio: Send audio to an assistant and get a response

Message Management

  • POST /message: Create a message in a conversation
  • GET /messages: List all messages for a conversation
  • DELETE /message: Delete a message by ID

Knowledge Base

  • POST /knowledge: Create a knowledge entry for an assistant
  • GET /knowledge: Get knowledge entry by name
  • GET /knowledge/all: List all knowledge entries for an assistant
  • GET /knowledge/retrieve: Retrieve knowledge entries by text query (RAG)
  • PUT /knowledge: Update knowledge entry
  • POST /knowledge/bulk: Bulk upload knowledge files
  • DELETE /knowledge: Delete knowledge entry by name

Document Management

  • POST /document: Create a document for a human (parent/child)
  • POST /document/bulk: Bulk create documents from files
  • PUT /document: Update a document
  • GET /document: Get document by human and title
  • GET /document/all: List all documents for a human
  • DELETE /document: Delete document by human and title

Prompt Management

  • POST /prompt: Create a prompt for a company
  • PUT /prompt: Update a prompt
  • GET /prompt: Get prompt by name
  • GET /prompt/all: List all prompts for a company
  • DELETE /prompt: Delete prompt by name

Speech & Audio

  • POST /speech/transcribe: Transcribe audio to text
  • POST /speech/generate: Generate speech from text

Translation

  • POST /translate: Translate text between languages using LLM

Content Generation

  • POST /generate/image: Generate image by prompt
  • POST /generate/image/description: Generate image description
  • POST /generate/sound: Generate sound by prompt

Evaluation & Games

  • POST /evaluate/visual/task: Evaluate a visual task (image + solution)
  • POST /evaluate/handwritten: Evaluate handwritten image (OCR)
  • POST /games/task: Evaluate arbitrary game task

Statistics

  • PUT /statistics: Create or update statistics for a human
  • GET /statistics: Get statistics by human and title
  • GET /statistics/all: List all statistics for a human
  • DELETE /statistics: Delete statistics by human and title
  • DELETE /statistics/all: Delete all statistics for a human

Game Reports

  • POST /game_report: Post a game report for a child
  • GET /game_report/latest: Get latest game report for a child
  • GET /game_report/all: List all game reports for a child
  • GET /game_report: Get a specific game report by ID
  • DELETE /game_report: Delete a game report by ID
  • DELETE /game_report/all: Delete all game reports for a child

File Uploads

  • POST /upload/media: Upload a media file and get a public URL
  • DELETE /upload/media: Delete an uploaded media file by filename

Monitoring

  • GET /monitor/healthcheck: Health check endpoint

Enums & Models

  • Languages: English, German, French, Spanish, Italian, Portuguese, Polish, Russian, Latvian, etc.
  • LLM Models: GPT_4o, GPT_4o_mini, GPT_3_5_turbo, etc.
  • TTS/STT Models: OpenAI, ElevenLabs, gTTS, Whisper, etc.
  • Image/Sound Models: OpenAI, Midjourney, Stability, ElevenLabs, etc.

Best Practices

  • Always check response status codes
  • Handle rate limiting gracefully
  • Store API keys securely
  • Use HTTPS for all requests
  • Validate all input data
  • Log all API interactions
  • Monitor response times and usage

SDK Support

Official SDKs available for Python, JavaScript/TypeScript, Swift, and Kotlin.