This is a big-picture response.
The Canvas REST API (API for short) is an interface for communicating with Canvas without using the web interface. This is great for automation and programming, which is really where it comes into play because it's not human friendly.
You can do a lot with it and some things are exposed through the API that are not available through the web interface. Vice-versa, some things are available through the web interface that are not available through the API. Early development of the API was to support the mobile apps, so anything that the mobile app can do is available in the API. Many of the things in the web interface make API calls as well.
It has nothing to do with HTML directly although you can use it to fetch the HTML content of a page or an assignment.
You cannot create super-duper powerful HTML content and get it into Canvas using the API. The HTML you send is still sanitized and passed through the whitelist, just like if you had done it through the web interface.
What the API would allow you to do is to have an application that makes calls to Canvas on your behalf. It returns information in a computer-friendly format that your program can use. The web interface returns it in a human-friendly format so that people can use it.
Hosting it externally gives you full control over what goes on, but it is sandboxed when it comes into Canvas and it won't look or feel like Canvas unless you use the same CSS that Canvas uses. It cannot communicate directly with Canvas (for the most part) in the browser because of the iframe restrictions.
What your application could do is use the API to communicate with Canvas.