Connecting to APIs such as gTTS

Hi. Can I use arduino in connecting to APIs such as gTTS?

Basically yes. But no experience with it.

For gTTS you can try to use Command-line (gtts-cli) — gTTS documentation; instead of reading from a file on hard disk (-f option) you can try to read from a serial port.