api/render support

- Added api/render support
- Corrected PHP NOTICE of unused variable while in DEBUG mode.