Did you try sending a file in with the api?  I feel like it constricts the usage if you actually call the method in the file.  can you call the method from the package somehow?  if not, I'd call it from a separate file.