Approve a book preview
approve_previewApproves the preview pages of a storybook or comic that get_job shows as waiting_for_approval (show preview_images to the person first), which draws the rest of the book. Uses the remaining pages of the book (storybook 1 per page, comic 2 per page); spend_limit must cover estimated_cost or nothing starts (limit_exceeded). To stop instead, use cancel_book. A book that is not waiting at its preview (a coloring or puzzle book never has one) is refused with not_ready, its status, retryable (true while it is still drawing towards its preview: poll get_job and approve once it waits; false when it never will, as for a coloring or puzzle book, a book started without a preview, or a finished or cancelled one) and next_actions. Next: get_job.
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": {
"job_id": "<job_id>",
"spend_limit": "<spend_limit>",
"idempotency_key": "<idempotency_key>"
},
"name": "approve_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | The book’s job_id from create_book or list_active_jobs (job_book_…). | |
| spend_limit | Yes | The most pages of balance this call may use. The call is refused (limit_exceeded) when the estimate is higher. | |
| idempotency_key | Yes | A unique label for this request (e.g. a UUID, 8-120 characters). Reuse it, with the same arguments, to retry safely: a repeat never does the work twice and returns the first call’s result as it was then (its text says Replayed, and the result’s _meta has colorcraft/replayed: true and colorcraft/first_called_at, the first call’s time), not the current state; read that with get_job. The same key with different arguments is refused with idempotency_conflict (a different request needs a new idempotency_key), and so is a repeat after a first call that failed part-way (its message says what to check before a new key); while the first call is still running, a repeat answers busy with retry_after_seconds. A key is remembered per tool and per account: the same key sent to a different tool is a separate request, never a replay of or a conflict with the other tool’s. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes | ||
| approved | Yes | ||
| next_actions | Yes | ||
| estimated_cost | Yes | Pages of balance the rest of the book will use. |