service.com is a real domain name, and could potentially have a real API on api.service.com
example.com is specifically reserved by IANA and thus will never have an API on it. It is designated to be used in scenarios like this. See RFC 2606 for more information.