code: public AlgoResponse pipe(Object input) throws APIException {
          if (input instanceof String) {
              return pipeRequest((String)input,ContentType.Text);
          } else if (input instanceof byte[]) {
              return pipeBinaryRequest((byte[])input);
          } else {
              return pipeRequest(gson.toJsonTree(input).toString(),ContentType.Json);
          }
      }
docs: Calls the Algorithmia API for a given input.
  Attempts to automatically serialize the input to JSON.
  
  @param input algorithm input, will automatically be converted into JSON
  @return algorithm result (AlgoSuccess or AlgoFailure)
  @throws APIException if there is a problem communication with the Algorithmia API.