API avatar URL and SSO avatar URL are different

I am current getting user information in two different ways:

SSO provides a URL to avatar like this:

I can not get that same one with the API, as API using user/{username}.json makes it:

How can I get the one SSO offers, as I have a subdomain associated to it, and my images are on CDN.