Miclaw API Bridge v2.0

Verified safeOpen sourceExclusive
No reviews reviews
6
downloads
8.0
android

AI summary

Xposed module that exposes Xiaomi's Super Xiao Ai assistant as a local OpenAI-compatible HTTP API. Supports chat completions, multimodal image recognition, 550+ device tools, and optional shell/Python code execution via root. Requires LSPosed and Xiaomi's com.aios.osbot. v2.1 adds on-demand root permission requests with KernelSU/Magisk support and instant permission activation without restart.

Generated by AI. May contain inaccuracies.

About this app

MiclawApiBridge is an Xposed module that exposes Xiaomi's "Super Xiao Ai" (com.aios.osbot) AI assistant as a local OpenAI-compatible HTTP API on your Android device. This allows you to use Xiao Ai's AI capabilities (conversation, multimodal image recognition, device control, etc.) from any OpenAI-compatible client on your phone – all running locally with zero external API dependencies.

Key Features

- OpenAI-compatible API: POST /v1/chat/completions (streaming SSE + non-streaming). - Multimodal image recognition: send image URLs, base64, or local paths for Xiao Ai to recognise. - 550+ built-in tools: weather, calendar, device controls, file operations, and more (see GET /v1/tools). - Multi-turn conversations: context-aware sessions (controlled via the "user" field). - Code execution: POST /v1/exec for shell or Python commands (requires Token + root). - Admin features: status page, request logs, configuration hot-reload (no restart needed), rate limiting, retry on failure, and concurrency protection. - All processing is local: no external API calls (LLM proxy is optional for Function Calling).

Installation

1. Download the APK and install it. 2. Enable the module in LSPosed (1.9.2+). 3. Set the scope to com.aios.osbot (Xiaomi Super Xiao Ai). 4. Open the module's configuration icon to set optional settings (Token, port, LLM proxy). 5. Restart Super Xiao Ai.

How to use (OpenAI-compatible client)

- Base URL: http://127.0.0.1:8787/v1 - API Key: the Token you set in the module config (can be left empty) - Model: osbot.main

Example curl:

curl http://127.0.0.1:8787/v1/chat/completions \ -H "Authorization: Bearer your-token" \ -d '{"model":"osbot.main","messages":[{"role":"user","content":"你好"}]}'

Available API endpoints (all local):

- POST /v1/chat/completions – Main OpenAI chat endpoint (streaming/non-streaming) - POST /v1/exec – Execute shell/Python commands (requires Token + root) - GET /v1/tools – List all 550+ built-in tools with descriptions - GET /v1/admin/status – View service status - GET /v1/admin/logs – View recent request logs - GET /v1/admin/reload – Hot-reload configuration from settings - POST /v1/chat/reset – Clear conversation history - GET /health – Health check - GET /openapi.json – OpenAPI documentation

Security

- The API server only listens on 127.0.0.1 (localhost) – no external access. - /v1/exec (code execution) requires a Token and root access. - Code execution has a 30-second timeout and is automatically terminated.

Limitations and requirements

- Requires Xposed Framework / LSPosed (root access or custom ROM). - Requires Xiaomi Super Xiao Ai (com.aios.osbot) installed on the device. - Root access is needed for code execution features. - The module is designed for Xiaomi devices with Super Xiao Ai. - Only local access (localhost) – you cannot access this API from other devices on your network.

Troubleshooting tips

- If the service doesn't start, ensure the module is enabled, the scope is correct, and restart Super Xiao Ai. - If the port is already in use, the app will automatically try the next available port. - For code execution, ensure Xiao Ai has been granted root permissions (via KernelSU/Magisk).

Interface language: Chinese

License

MIT

What's new

v2.1Aug 24, 2026

Added active root permission request — triggers su authorization dialog on demand. - HttpServer now automatically requests root on startup (KernelSU/Magisk prompt). - Added GET /v1/admin/root endpoint to re-request authorization and return status without restart. - Added "Grant Root Now" button in MainActivity to trigger authorization dialog. - Improved root handling — permissions now take effect immediately after authorization, no app restart required.

About this version

Version
2.1 (19)
Size
32.45 KB
Requires Android
8.0
Target SDK
26
Architecture
universal
Downloads
6
Updated
Aug 24, 2026
Package
io.github.guocheng1378.miclawbridge

Similar apps

Ratings & reviews

0 ratings
  • 5
    0
  • 4
    0
  • 3
    0
  • 2
    0
  • 1
    0

Write a review

Tap a star to rate this app