Upscale Image (Popcraft)
popcraft_upscale_imageUpscale and enhance an existing image to 2x or 4x with Topaz — use when the user asks to upscale, enhance, sharpen, or increase the resolution of an image. Pass the source image as a GCS URL (image_url from a prior generation result or popcraft_media_import_url); width and height (pixels) are optional hints — the server measures the real file and prices from that, so the cost is unaffected by what you pass. mode picks the Topaz model: "standard-mode" (default, general photos/faces), "face-recovery-mode" (degraded portraits), "art-and-anime" (illustrations/logos), "cgi-mode" (3D renders), "text-and-shapes" (screenshots/documents), "creative-mode" (re-imagine). This tool does not use prompt or count. Set get_cost:true to preflight the credit cost WITHOUT submitting. On success, an interactive result card is shown and refreshes itself automatically — do NOT poll; call popcraft_job_display at most once if no card is visible. The result includes project — the Popcraft project the output was filed into; when the user did not pass project_id/project_name, mention it briefly (e.g. "saved to "). Never tell the user how long the job will take or quote any estimate of generation time — the result card shows progress.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Topaz mode — default "standard-mode"; see the description for when to pick the others | |
| scale | No | Upscale factor: 2 (default) or 4 | |
| width | No | Optional source width hint (px); the server measures the real file for pricing | |
| height | No | Optional source height hint (px); the server measures the real file for pricing | |
| get_cost | No | true = return the exact credit cost WITHOUT submitting | |
| image_url | Yes | Source image as a GCS https URL (from a prior result or popcraft_media_import_url) or gs:// URI | |
| project_id | No | File the result into this Popcraft project (id from popcraft_projects). Omit to use the user's current/last-used project (or a default). Errors if you don't own it. | |
| project_name | No | File the result into the project with this title, creating it if it doesn't exist. Ignored when project_id is set. |