RESTful API

All features exposed as JSON APIs for easy integration and secondary development. Build your own tools and workflows on top of PhoneIDE.

GET /api/files/list List directory
GET /api/files/read Read file
POST /api/files/save Save file
POST /api/run/execute Execute code
GET /api/run/output/stream SSE output
GET /api/git/status Git status
POST /api/git/commit Git commit
POST /api/chat/send/stream AI chat (SSE)
GET /api/health Health check
Full API Documentation →

Quick Examples

Integrate PhoneIDE into your workflows with simple HTTP calls.

Read a File

$ curl http://localhost:12345/api/files/read?path=/workspace/main.py

{"content": "print('Hello, PhoneIDE!')", "path": "/workspace/main.py"}

Execute Code

$ curl -X POST http://localhost:12345/api/run/execute \
-H "Content-Type: application/json" \
-d '{"cmd": "python3 main.py"}'

AI Chat (SSE Stream)

$ curl -X POST http://localhost:12345/api/chat/send/stream \
-H "Content-Type: application/json" \
-d '{"message": "Explain this code"}'

Build with PhoneIDE

Use the API to create custom tools and integrations.

Install PhoneIDE View on GitHub