laminou / README.md
lamionx's picture
Deploy AI API with FastAPI + Mistral-7B: streaming, authentication, multi-language support, caching
8a464c3
metadata
title: AI API - Mistral 7B
emoji: πŸ€–
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: apache-2.0

AI API - Mistral 7B

Production-ready AI API powered by Mistral-7B-Instruct-v0.2 with:

  • ⚑ FastAPI with streaming responses
  • πŸ” API Key authentication
  • 🌍 Multi-language support (8 languages)
  • πŸ’Ύ Smart response caching
  • 🎨 Built-in web interface
  • πŸš€ Optimized 4-bit quantization

Usage

Web Interface

Open the Space URL in your browser to access the interactive chat interface.

API Endpoint

curl -X POST "https://lamionx-laminou.hf.space/api/chat" \
  -H "X-API-Key: your-secret-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Explain quantum computing",
    "language": "en",
    "stream": false
  }'

Configuration

Set your API key as a Space secret:

  • Go to Settings β†’ Repository secrets
  • Add: API_KEY = your-secret-api-key-here

Documentation

For full documentation, visit the GitHub repository.