Hello!
Sorry for the late response. Most of the team is on vacation!
You are most likely seeing this error because your route does not contain any waypoints. Some formats require at least one waypoint, and it seems like both of the mentioned formats fall into this category!
Also see: Error: Request failed with status code 400 - Repeat writeup - #2 by skysail
Kind Regards,
Malte