DeepCode provides public REST APIs to upload/access source code and get suggestions. This API is both available in the cloud and on-premise. 

See section "REST APIs" for instructions on how to use the REST APIs.