7xx error generator, like any other modern web service, has some API endpoints:

/json endpoint for return the error in json format.
/plain endpoint returns the error as plain text in a single line.
When accessing this website using curl or httpie the error will also be returned as plain text.
/html endpoint forces the returned error to be formated as html page.
/svg return a nice SVG banner that can be embeded into other html pages.

Source code | API Docs, Good luck!