Possible to check if username is available through API?

You can use the get channels v3 endpoint https://api.twitch.tv/kraken/channels/CHANNEL_NAME. If you get a channel not found response then the username should be available.

Keep in mind, this is a deprecated endpoint so will be removed at some point in the future, and while there are new endpoints that let you look up a username these are not as reliable for this use case as while they would certainly tell you if a username is in use, it doesn’t differentiate between unused usernames that are available and usernames that are ‘unavailable’ such as deactivated or suspended accounts.