AI File Builder (PHP)






How the model should respond for file generation

We ask the model to return a JSON like:

{
  "workspaceName": "my-app",
  "files": [
    {"path": "index.php", "content": "<?php echo 'Hello';"},
    {"path": "public/style.css", "content": "body{font-family:sans-serif;}"}
  ]
}

You can also support base64:

{
  "workspaceName": "my-app",
  "files": [
    {"path":"assets/logo.png","base64":"iVBORw0KGgoAAA..."}
  ]
}