Unofficial Python implementation of the Dola AI API
This project targets the Android app API, it was easier to capture and reverse from the phone traffic than from the web client. That said, web browser cookies also work and are supported as an alternative session source.
The CLI client (dola_client.py) is just a usage example. The signing logic and API calls can be reused for whatever you want, bots, automation, integrations, etc.
- Python 3.11+
pip install requests pillow
Requires a rooted device or emulator with the Dola app installed and logged in, and ADB in PATH.
python extract_session.pyThis reads session tokens directly from the app's shared preferences via root and writes them to config.json
- Go to https://www.dola.com and log in
- Install the Cookie-Editor browser extension
- Open it on the dola.com tab and export cookies
- Save the file (JSON, header string, or Netscape format are all supported)
python dola_client.py path/to/cookies.jsonOr just run python dola_client.py and follow the prompts.
python dola_client.pyIf no session is found, the client will ask whether to extract via ADB or import from a browser cookies file.
| Command | Description |
|---|---|
exit |
Exit the client |
/temp |
Enable temporary mode, chat is not saved and is deleted from the server on exit |
/chats |
List saved chats |
/load <n|id> |
Load a saved chat by index or ID suffix |
/delete <n|id> |
Delete a chat from the server and local storage |
/session |
Re-extract session from ADB (updates credentials or switches account) |
/memory on|off |
Enable or disable the bot's memory feature |
/img <path> [text] |
Send an image with optional text |
- Chats are saved locally in
~/.dola_chats/as JSON files. - The local conversation ID is persistent per installation (stored in
~/.dola_chats/_identity.json).