It works with Web API :)
Here is my simple test:

public class jbController : ApiController
    {
        // GET api/<controller>
        public HttpResponseMessage Get()
        {
            String s = "";
            s += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
            s += "<juiceboxgallery>";
            s += "<image imageURL=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\"";
            s += " thumbURL=\"\"";
            s += " linkURL=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\"";
            s += " linkTarget=\"_blank\"";
            s += " sourcePath=\"http://biltema.se/ProductImages/17/large/17-380_l.jpg\">";
            s += "<title></title>";
            s += "<caption></caption>";
            s += "</image>";
            s += "<image imageURL=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\"";
            s += " thumbURL=\"\"";
            s += " linkURL=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\"";
            s += " linkTarget=\"_blank\"";
            s += " sourcePath=\"http://biltema.se/ProductImages/25/large/25-0490_l.jpg\">";
            s += "<title></title>";
            s += "<caption></caption>";
            s += "</image>";
            s += "</juiceboxgallery>";

            return new HttpResponseMessage() { Content = new StringContent(s, Encoding.UTF8, "application/xml") };
        }
    }

And here is the configuration:

<!--START JUICEBOX EMBED-->
<script src="../LIB/jbcore/juicebox.js"></script>
<script>
    new juicebox({
        configUrl: '/api/jb',
        containerId: "juicebox-container",
        galleryWidth: "100%",
        galleryHeight: "100%",
        backgroundColor: "#222222"
    });
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->

Thanks for all the help!

Ok, but is there an alternative way to PHP? For example to use Web API URL in configUrl?

I tried to do the exact same thing but with javascript and I could not get it to work? (Added my simplified code in this post, thanks biltema for public images.)
Tried to use configUrl : 'config.html' with

<script type="text/javascript">
    var text = '';
    text = text + '<?xml version="1.0" encoding="UTF-8"?>';
    text = text + '<juiceboxgallery>';
    text = text + ' <image imageURL="http://biltema.se/ProductImages/17/large/17-380_l.jpg" ';
    text = text + 'thumbURL="" ';
    text = text + 'linkURL="http://biltema.se/ProductImages/17/large/17-380_l.jpg" ';
    text = text + 'linkTarget="_blank"';
    text = text + 'sourcePath="http://biltema.se/ProductImages/17/large/17-380_l.jpg"> ';
    text = text + '<title></title>';
    text = text + '<caption></caption>';
    text = text + '</image>';
    text = text + '</juiceboxgallery>';
    document.write(text);
</script>

I tested this with xml only and it works fine.

<?xml version="1.0" encoding="UTF-8"?>

<juiceboxgallery>
  <image imageURL="http://biltema.se/ProductImages/17/large/17-380_l.jpg"
    thumbURL=""
    linkURL="http://biltema.se/ProductImages/17/large/17-380_l.jpg"
    linkTarget="_blank"
    sourcePath="http://biltema.se/ProductImages/17/large/17-380_l.jpg">
    <title></title>
    <caption></caption>
  </image>
</juiceboxgallery>

tried config.js also but with no success.

The code that does not work gives me juice box screen with spinning symbol.

Please help! :)