I have a username on GitHub and have an avatar for that -- easy enough. The Get a single user V3 API does include my gravatar when I call it with my GitHub id.
FYI: GitHub uses your G rated gravatar, so be sure to set that (and not your PG and above).