Can I use API to create and play custom games

If you’re using the API, you can’t really do an offline game… am I missing something?

But yes, you can use the API to create and play a game - see any of the third party apps. Probably simplest is going to be this CLI client written in Go(lang). More mature examples will be the two mobile apps: Android, iOS

If you’re just looking to play offline, your best bet is to create a demo board before you disconnect from the network.