For svg's to be used in a browser's <img> tag and other programs it needs to have an xml declaration like: <?xml version="1.0" encoding="UTF-8" standalone="no"?>
Using images in a html document can be done by just the <svg> tag, but it also works with the declaration included. Therefore the svg api result would be most useful if it always returned an svg with declaration.
Right now the api returns the svg 'as is'.