Import ZIP into project
import_zipReplace every file of a project with a ZIP (data.json plus assets), from a ZIP upload or a ready export from export_version, as a new version on the head of a variation (main unless variation names another). Returns the version within about 50 seconds; a larger ZIP still importing returns the import instead (id, status) for get_zip_import. A ZIP whose files, soundtrack and name match the head makes no version and returns the head. At most 10 imports per workspace wait or run at once (import_limit). A ZIP whose files total more than the plan's project size (get_usage's limits.maxProjectBytes) fails with project_too_large, unless the head it replaces is at least as large.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectId": "<projectId>"
},
"name": "import_zip"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project id, from list_projects. | |
| variation | No | The variation to import onto, from list_variations; default main. | |
| zipUploadId | No | A ready .zip upload, from create_upload. Not with fromExportId. | |
| fromExportId | No | Instead of zipUploadId: a ready export of this workspace, from export_version, imported without downloading it; one not ready yet gets export_not_ready. A project export from export_project is refused: create a project from it instead. | |
| idempotencyKey | No | Makes a retry safe: for 24 hours the same import with the same key returns what the first one returned: the version, or the import as it is now when the first returned the import, unless that import failed. Until then the same key with different arguments fails with idempotency_key_reused. A retry while the first is still running waits for its import as the first call does. | |
| fontLicenseAccepted | No | Required true when the ZIP contains font files. | |
| expectedHeadVersionId | No | Optional: the headVersionId the import must replace, so it fails with head_moved if the head has moved. Null or left out imports on whatever the head is when the import finishes. |