Back to all posts

Developer Offer

Try ImaginePro API with 50 Free Credits

Build and ship AI-powered visuals with Midjourney, Flux, and more — free credits refresh every month.

Start Free Trial

Boost Image Resolution with Imagen on Vertex AI

2025-10-21Unknown3 minutes read
Vertex AI
Image Upscaling
Generative AI

Unlock the power of high-resolution imagery by using Imagen on Vertex AI to increase the size of your images without sacrificing quality. This guide will walk you through the process, whether you prefer using the graphical interface or a programmatic approach via the REST API.

Model Version Compatibility

It's important to note that the upscaling feature is specific to certain model versions. Currently, it is only available for the original Imagen model.

FeatureImagen (v.002)Imagen 2 (v.005)Imagen 2 (v.006)
UpscalingNot supportedNot supported

Below are the code samples and steps to upscale an existing, generated, or edited image.

Upscaling via the Console

For a straightforward, user-friendly approach, you can use the Vertex AI console:

  1. First, follow the instructions to generate an image with text.
  2. Select the image you wish to enhance.
  3. Click Upscale/export.
  4. From the options, select Upscale images.
  5. Choose your desired Scale factor (2x or 4x).
  6. Click Export to save your new, high-resolution image.

Upscaling via the REST API

For developers looking to integrate this feature into their applications, the REST API provides a powerful method. For detailed information on imagegeneration model requests, refer to the model API reference.

To activate upscaling, you must include the "mode": "upscale" parameter and the upscaleConfig object in your JSON request.

Before you begin, replace the following placeholders in the request:

  • LOCATION: The region for your project, such as us-central1. See the list of available regions.
  • PROJECT_ID: Your unique Google Cloud project ID.
  • B64_BASE_IMAGE: The image you want to upscale, provided as a base64-encoded byte string (10 MB limit).
  • IMAGE_SOURCE: Alternatively, the Cloud Storage URI of your source image, e.g., gs://output-bucket/source-photos/photo.png.
  • UPSCALE_FACTOR: Optional. The factor to scale the image by. Available values are x2 or x4.

API Endpoint

Use the following POST request URL:

http POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/publishers/google/models/imagegeneration@002:predict

Request Body

Construct your request with the following JSON structure:

{ "instances": [ { "prompt": "", "image": { // Use one of the following to specify the image "bytesBase64Encoded": "B64_BASE_IMAGE", "gcsUri": "IMAGE_SOURCE" } } ], "parameters": { "sampleCount": 1, "mode": "upscale", "upscaleConfig": { "upscaleFactor": "UPSCALE_FACTOR" } } }

Sending the Request

To execute your request, you can use one of the following command-line tools.

Using cURL

Save the request body to a file named request.json and run the following command:

bash curl -X POST
-H "Authorization: Bearer $(gcloud auth print-access-token)"
-H "Content-Type: application/json; charset=utf-8"
-d @request.json
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/publishers/google/models/imagegeneration@002:predict"

Using PowerShell

Save the request body to a file named request.json and execute this command:

powershell $cred = gcloud auth print-access-token $headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest -Method POST -Headers $headers -ContentType: "application/json; charset=utf-8" -InFile request.json ` -Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/publishers/google/models/imagegeneration@002:predict" | Select-Object -Expand Content

Sample API Response

A successful request will return a JSON response containing the upscaled image encoded in base64:

{ "predictions": [ { "mimeType": "image/png", "bytesBase64Encoded": "iVBOR..[base64-encoded-upscaled-image]...YII=" } ] }

What's Next?

To learn more about the latest advancements in Google's generative AI, explore these resources:

Read Original Post

Compare Plans & Pricing

Find the plan that matches your workload and unlock full access to ImaginePro.

ImaginePro pricing comparison
PlanPriceHighlights
Standard$8 / month
  • 300 monthly credits included
  • Access to Midjourney, Flux, and SDXL models
  • Commercial usage rights
Premium$20 / month
  • 900 monthly credits for scaling teams
  • Higher concurrency and faster delivery
  • Priority support via Slack or Telegram

Need custom terms? Talk to us to tailor credits, rate limits, or deployment options.

View All Pricing Details
ImaginePro newsletter

Subscribe to our newsletter!

Subscribe to our newsletter to get the latest news and designs.