Skip to content

Latest commit

 

History

History
54 lines (46 loc) · 1 KB

File metadata and controls

54 lines (46 loc) · 1 KB

mira-telegram-service API

Base URL

  • Default: http://127.0.0.1:8090

Auth

  • If MIRA_SERVICE_API_KEY is set, send:
    • X-API-Key: <key>

Health

  • GET /health -> { "status": "ok" }
  • GET /ready -> { "ready": bool, "queue_size": number }
  • GET /v1/capabilities

Relay

POST /v1/relay

{
  "request_id": "optional",
  "input_type": "text|photo|audio|web_search",
  "text": "optional",
  "caption": "optional",
  "file_name": "optional",
  "mime_type": "optional",
  "media_base64": "optional",
  "meta": {
    "bale_user_id": "optional",
    "bale_chat_id": "optional",
    "user_mode": "optional"
  }
}

Convenience Endpoints

  • POST /v1/text
  • POST /v1/image
  • POST /v1/audio
  • POST /v1/search

Error codes

  • invalid_input
  • unauthorized
  • mira_rate_limit
  • mira_no_response
  • telegram_connection
  • internal_error

Curl sample

curl -X POST http://127.0.0.1:8090/v1/text \
  -H 'Content-Type: application/json' \
  -d '{"text":"سلام"}'