Pricing:
- $0.12/1GB download (based on total original file sizes, not compressed zip size)
- ✅ Success: Returns zip file stream (binary data) — browser automatically downloads to local storage
- ❌ Error: Returns JSON error — use
json()to parse error message
- Success response is a file (binary data), NOT JSON
- The zip filename is
{task_id}.zip - Error response is JSON with error details
- Task must be in
completedstatus, otherwise an error is returned - Check response status before deciding how to handle the response
Code Examples
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | The screenplay task ID of a completed task |
Response
On success, returns a binary zip file stream with the following headers:| Header | Value |
|---|---|
| Content-Type | application/zip |
| Content-Disposition | attachment; filename="{task_id}.zip" |
Zip File Contents
The zip archive contains the following files based on your task configuration:| Config Flag | Files Included | Description |
|---|---|---|
require_json: true | *_transcript.json, *_storyboard.json, namelist.json | Per-episode transcript and storyboard JSONs, plus a global character namelist |
require_xlsx: true | *.xlsx (per episode) | Per-episode storyboard spreadsheets |
require_merge_xlsx: true | merged.xlsx | Single merged spreadsheet combining all episodes |
Error Responses
| Scenario | Error Message |
|---|---|
| Task not found | "Task not found for id: {task_id}" |
| Task not completed | "Task is not completed yet, current status: {status}" |
| No result data | "No result data available for this task." |
| No files found | "No downloadable files found for this task." |
| Insufficient balance | "Insufficient balance to download the resource. Please recharge and try again." |
Notes
- The task must be in
completedstatus — check with Get Task Status first - Download cost is calculated based on the sum of all individual file sizes (original sizes, not compressed)
- Files with duplicate names are automatically renamed with a numeric suffix (e.g.,
file.json,file_1.json) - The zip is streamed directly — no intermediate storage is used
