(args: argparse.Namespace, payload: Dict[str, Any])
| 94 | |
| 95 | def call_sync_api(args: argparse.Namespace, payload: Dict[str, Any]) -> requests.Response: |
| 96 | endpoint = f"{args.url.rstrip('/')}/v1/tasks/image/sync?timeout_seconds={args.timeout_seconds}&poll_interval_seconds={args.poll_interval_seconds}" |
| 97 | return requests.post(endpoint, json=payload, timeout=args.timeout_seconds + 30) |
| 98 | |
| 99 | |
| 100 | def download_uploaded_image(download_url: str, output_path: str, timeout_seconds: int) -> Path: |
| 101 | response = requests.get(download_url, timeout=timeout_seconds) |