MGZon Chatbot API Documentation

Explore the MGZon Chatbot API for seamless integration of AI-powered code generation, text generation, and e-commerce automation. Built by Mark Al-Asfar using FastAPI and Hugging Face AI. Rivals tools like ChatGPT, Grok, and DeepSeek.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/chat" -H "Content-Type: application/json" -d '{"message": "Hello MGZon!"}'
๐Ÿ”‘

Authentication

Secure JWT-based auth for all endpoints. Register and login to get started.

๐Ÿ“ก

Real-Time APIs

Endpoints for chat, code generation, image analysis, and more.

๐Ÿ“Š

Performance Stats

Monitor API performance and model info in real-time.

๐Ÿ›ก๏ธ

Secure & Scalable

Built with FastAPI for high performance and security.

API Endpoints Dashboard

Browse and explore all available endpoints with examples and schemas.

๐Ÿ“„

GET /openapi.json

Retrieve the full OpenAPI specification in JSON format.

curl -X GET "https://mgzon-mgzon-app.hf.space/openapi.json"
โš™๏ธ

GET /api/settings

Get current API settings and configurations.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/settings"
๐Ÿค–

GET /api/model-info

Fetch information about the AI models in use.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/model-info"
๐Ÿ“ˆ

GET /api/performance

View performance statistics for the API.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/performance"
๐Ÿ’ฌ

POST /api/chat

Interact with the chatbot for queries and code generation.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/chat" -H "Content-Type: application/json" -d '{"message": "Generate code"}'
๐Ÿ–ผ๏ธ

POST /api/image-generation

Generate images based on text prompts.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/image-generation" -H "Content-Type: application/json" -d '{"prompt": "A futuristic city"}'
๐ŸŽค

POST /api/audio-transcription

Transcribe audio files to text.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/audio-transcription" -F "file=@audio.wav"
๐Ÿ”Š

POST /api/text-to-speech

Convert text to speech audio.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/text-to-speech" -H "Content-Type: application/json" -d '{"text": "Hello world"}'
๐Ÿ’ป

POST /api/code

Generate or analyze code snippets.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/code" -H "Content-Type: application/json" -d '{"prompt": "Write a Python function"}'
๐Ÿ”

POST /api/analysis

Perform text or data analysis.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/analysis" -H "Content-Type: application/json" -d '{"data": "Analyze this text"}'
๐Ÿ–ผ๏ธ

POST /api/image-analysis

Analyze images for content and features.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/image-analysis" -F "file=@image.jpg"
๐Ÿงช

GET /api/test-model

Test the AI model with a sample query.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/test-model"
๐Ÿ“œ

GET /api/conversations

List all user conversations.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/conversations"
โž•

POST /api/conversations

Create a new conversation.

curl -X POST "https://mgzon-mgzon-app.hf.space/api/conversations" -H "Content-Type: application/json" -d '{}'
๐Ÿ“–

GET /api/conversations/{conversation_id}

Get details of a specific conversation.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/conversations/123"
๐Ÿ—‘๏ธ

DELETE /api/conversations/{conversation_id}

Delete a conversation.

curl -X DELETE "https://mgzon-mgzon-app.hf.space/api/conversations/123"
โœ๏ธ

PUT /api/conversations/{conversation_id}/title

Update conversation title.

curl -X PUT "https://mgzon-mgzon-app.hf.space/api/conversations/123/title" -H "Content-Type: application/json" -d '{"title": "New Title"}'
๐Ÿ‘ค

PUT /users/me

Update current user settings.

curl -X PUT "https://mgzon-mgzon-app.hf.space/users/me" -H "Content-Type: application/json" -d '{"settings": {}}'
๐Ÿ”’

GET /api/verify-token

Verify authentication token.

curl -X GET "https://mgzon-mgzon-app.hf.space/api/verify-token"
๐Ÿšช

POST /logout

Logout the current user.

curl -X POST "https://mgzon-mgzon-app.hf.space/logout"
๐Ÿž

GET /debug/routes

Debug API routes (dev only).

curl -X GET "https://mgzon-mgzon-app.hf.space/debug/routes"
๐Ÿ 

GET /

Root endpoint for the app.

curl -X GET "https://mgzon-mgzon-app.hf.space/"
๐Ÿ“‹

GET /docs

API Documentation page (you're here!).

curl -X GET "https://mgzon-mgzon-app.hf.space/docs"