Loading Screen

Loading

API & MCP

Connect Android, scripts, and agents to the same account. Use Token auth from rest-auth for local and production testing.

Authentication

  • POST /rest-auth/login/ — email + password → key token
  • POST /rest-auth/registration/ — create account
  • POST /rest-auth/password/reset/ — forgot password
  • POST /api/token/ — JWT obtain (username/password) for mobile clients
  • POST /api/token/refresh/ / verify/ — JWT refresh & verify
  • Header: Authorization: Token <key> or Authorization: JWT <token>

Core REST

  • GET /api/translate/?text=&fromLang=&toLang= — translate (auth)
  • GET /api/translation-history/ — history (auth)
  • GET|POST /api/vocabulary/ — list / create flashcards
  • DELETE /api/vocabulary/<id>/ — soft-delete card

MCP

JSON-RPC tools for vocabulary live at /mcp/ (RPC: /mcp/rpc/).

Local testing

BASE=http://127.0.0.1:8000
curl -s -X POST $BASE/rest-auth/login/ \
  -H 'Content-Type: application/json' \
  -d '{"email":"you@example.com","password":"***"}'
# use returned key:
curl -s $BASE/api/vocabulary/ -H "Authorization: Token $KEY"