The example here: https://developers.google.com/sheets/api/samples/data only allows you to copy and paste format operations for the SAME spreadsheet.
I'm trying to copy paste formats across multiple spreadsheets. Is there a way to do it?
This feature is not supported yet. Even the Class Range from Spreadsheet Apps Script doesn't offer such feature. Try to file a request here.