upscale_image
Upscale an existing generated image (from a prior generate_image call) to a higher resolution -- the same "1K/2K/4K" choice Flow offers when downloading.
account: the Google account whose project owns media_id. Do not guess it and do not
ask the user: the generate_image result you already have carries it in the
`account_used` field -- pass that value verbatim. A media_id only exists inside the
project of the account that produced it, so any other account returns a clean error.
target_resolution: "2K" or "4K". Not every image supports upscaling (depends on the
source model/size) and 4K may be locked behind a paid plan tier on some accounts --
both cases come back as a clean error rather than a crash, so just report it if that
happens instead of retrying.
Takes roughly 15-30s -- returns a job_id to poll with check_job if it is not done
within ~35s.
Returns {"media_id": <new upscaled mediaId>, "download_path": "/v1/media/....jpg",
"resolution": ...} when done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| media_id | Yes | ||
| target_resolution | No | 2K |