To my knowledge Tor does not have an actual API or SDK.
Tor does come with a SOCKS interface though. So the simplest way of making an app work over the Tor network is to use a SOCKS proxy with the default Tor installation on a user's computer.
For an example using Go, check out Pond.