Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To build an image analyzer with Google Cloud Vision API and Cloud Run, create an HTTP service that validates an uploaded image, sends it to Vision with only the annotation features your task needs, and returns a concise result. Cloud Run hosts and scales the service; Vision performs the analysis. Your choices about image access, feature selection, authentication, quotas, and cost determine whether the application is private, responsive, and economical.

How the image analyzer works

The application sits between the user and Google Cloud Vision. A request reaches your Cloud Run service, the service checks the image and chooses an input method, and a server-side call asks Vision for specific annotations. Your application then reshapes the response into something useful to the caller.

  1. Receive: accept an image upload or a reference to an image.
  2. Validate: check the file type and size, and reject unsupported input before calling Vision.
  3. Choose access: send the image bytes inline, reference an object in Cloud Storage, or use a publicly accessible URI.
  4. Analyze: request the appropriate Vision feature or combination of features.
  5. Return: extract useful fields from Vision’s response and provide them in your application’s response format.
  6. Host: deploy the HTTP application as a Cloud Run service and set its access, capacity, and resource configuration.

This design keeps API credentials on the server rather than exposing them to a browser or mobile client. The application can offer a single endpoint while allowing callers to request different analysis outcomes.

Choose Vision features for the job

“Image analysis” is not one fixed model or response. Cloud Vision offers separate annotation features. Choose based on the user outcome instead of requesting every feature for every image; each applied feature can affect cost and response handling.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Need Vision feature What it returns or when to use it
Read text embedded in an ordinary image TEXT_DETECTION OCR intended for text in general images, including sparse text within a larger image.
OCR a dense scanned document DOCUMENT_TEXT_DETECTION Document-oriented text extraction. For structured parsing or entity extraction from dense documents, Google recommends considering Document AI.
Describe the general contents of an image Label detection Generalized labels with confidence and topicality information.
Find objects and their locations Object localization Object labels and normalized bounding polygons.
Locate faces Face detection Facial locations and attributes. It does not identify a specific individual.
Screen for defined explicit-content categories SafeSearch Likelihood values for adult, spoof, medical, violence, and racy categories.
Recognize a known place or brand mark Landmark or logo detection Names or descriptions, confidence, and location data as documented for the feature.
Find web matches or related images Web detection Web entities and information about matching images or pages.
Get dominant colors or crop suggestions Image properties or crop hints Image properties include color information; crop hints can be requested for multiple aspect ratios.

These are distinct outputs, not interchangeable descriptions. For example, label detection supplies broad concepts, while object localization supplies labels tied to positions in the image. OCR output includes text structures, and localization features provide geometry such as bounding boxes or polygons. Shape your response around the output the caller actually needs.

See Google Cloud Vision’s feature list for documented features and their outputs.

Choose how the service accesses images

The Vision request can identify image content in three documented ways. Pick one based on where the image originates, how large it is, and who is allowed to access it.

Input method How it works Important consideration
Inline base64 content The service includes the encoded image bytes in the request. Convenient for an HTTP upload already received by the service; request-size limits still apply.
Cloud Storage URI The request points to an image stored in Cloud Storage. Configure storage access deliberately, especially for private images and retention requirements.
Public URI The request references an image that is publicly accessible. Public accessibility may be inappropriate for private or sensitive images.

The API documentation describes these input choices, but it does not decide your application’s privacy policy, storage retention, or access-control design. Avoid making an image public merely to simplify processing. Validate the content type and size at your service boundary, and define how long uploaded or stored images remain available.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Review the Vision API request guide for supported image sources and request structure.

Make an authenticated annotation request

The REST endpoint for synchronous image annotation is POST https://vision.googleapis.com/v1/images:annotate. The authenticated JSON body contains a requests list. Each annotation request supplies an image source and one or more requested feature types. Multiple features can be requested for an image, so a service can combine, for example, OCR and labels when both are needed.

A simplified request has this shape; replace the example source and feature with values appropriate to your service:

{
  "requests": [
    {
      "image": {
        "content": "BASE64_ENCODED_IMAGE"
      },
      "features": [
        {
          "type": "TEXT_DETECTION"
        }
      ]
    }
  ]
}

This is a request-body illustration, not a complete runnable application: the HTTP call must be authenticated, and the image field can instead use a supported Cloud Storage or public URI source. Google also provides client libraries; the REST approach makes the request and response shape explicit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Keep authentication on the Cloud Run side. Use the service identity and permissions appropriate to the project, and keep secrets out of source code. Exact IAM permissions depend on how the service accesses Google Cloud resources; confirm them against the current Cloud Run service identity guidance when configuring the deployment.

Shape the response for your application

Vision responses can contain feature-specific detail. Return only the fields that matter to the caller, with names and structure that your application can keep stable even if it later adds another Vision feature.

  • For labels, present the label and relevant confidence or topicality values.
  • For object localization, preserve each label and its normalized polygon so a client can draw boxes or markers over the original image.
  • For OCR, return the extracted text and, when needed, the text hierarchy or position information.
  • For SafeSearch, present the likelihood ratings by documented category rather than treating them as a binary guarantee.
  • For face detection, expose detection results without implying that they identify a person.

Also define how your endpoint reports invalid input, authentication failures, quota errors, and upstream API failures. A clear application-level error is more useful to clients than returning unfiltered upstream JSON.

Deploy the HTTP application to Cloud Run

Cloud Run runs containerized HTTP services. Your application must listen on the TCP port supplied in the PORT environment variable; the documented default is 8080. You can deploy a container image or use a source-code deployment flow. Deployment configuration lets you choose a region, authentication behavior, scaling, concurrency, resources, request timeout, secrets, and service account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
  1. Package the application: build a container that starts the HTTP server and listens on PORT.
  2. Choose access control: make the service public only if unauthenticated requests are intended. Otherwise, require authentication and restrict access to approved callers.
  3. Set the service identity: assign an identity suited to the resources the service must access; do not embed credentials in the application.
  4. Configure capacity: set concurrency, memory, timeout, and instance scaling with the image-processing workload and Vision limits in mind.
  5. Deploy: publish the container image or use the documented source deployment flow, then test the service endpoint with valid and invalid requests.

Use Google’s Cloud Run documentation and deployment guide for current deployment options and configuration labels.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Plan for quotas, payload limits, and traffic

Vision quotas are enforced at the Google Cloud project level, separately from Cloud Run’s capacity. The quota page retrieved in 2026 lists 1,800 requests per minute for common Vision request types and 1,800 per-minute feature quotas for label and text detection. It also lists a 20 MB image file limit, a 10 MB JSON request-object limit, up to 16 images in a synchronous images:annotate request, and up to 2,000 images in an asynchronous image batch request. These values are subject to change, and some limits apply per image or page while others apply per request; verify the current quota table and your project’s quotas before designing around them.

Cloud Run can scale out automatically, but more service instances do not increase the project’s Vision quota. If requests arrive faster than Vision can accept them, the application needs an explicit strategy, such as limiting concurrent API calls, returning a useful retry response, or queuing work for asynchronous processing. Synchronous annotation is suited to interactive requests; large collections may fit an asynchronous batch workflow better.

Cloud Run normally scales to zero when idle. Minimum instances can keep capacity warm at the cost of changing resource use, while maximum instances can bound scale and protect a backing service. Balance startup latency and request bursts against Vision quotas and your application’s concurrency. See Cloud Run autoscaling documentation and Vision API quotas and limits.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Estimate costs by feature and workload

Vision pricing is based on images and the features applied: each feature applied to an image is a billable unit, and multi-page files are billed page by page. The Google Cloud pricing page retrieved in 2026 lists the first 1,000 monthly units as free for features in its table. For monthly usage from 1,001 through 5,000,000, it displayed $1.50 per 1,000 units for label detection, text detection, document text detection, face detection, landmark detection, logo detection, and image properties; $3.50 for web detection; and $2.25 for object localization. The page’s publication date was not stated, and higher tiers have different rates. Check the live pricing page and currency-specific SKUs rather than treating these retrieved figures as a quote.

Estimate the Vision portion by counting images or pages and the features applied to each. Then include Cloud Run configuration and traffic, plus any storage or network services your design uses. Cloud Run’s cost depends on its resource and scaling configuration, including whether minimum instances stay warm; there is no single total that applies to every analyzer. Use the Vision pricing page and Cloud Run pricing page for current rates.

Operate and improve the analyzer

Once deployed, monitor both sides of the application: Cloud Run request volume, latency, startup behavior, and errors, alongside Vision API failures, quota consumption, and feature usage. Test realistic image sizes and traffic patterns, including malformed files and quota-related failures. Keep the endpoint’s accepted image types and maximum upload size aligned with the limits in force for your project.

For privacy-sensitive use, restrict who can invoke the service, avoid public image URIs unless public access is intentional, and establish image retention rules for uploads and Cloud Storage objects. For reliability, choose timeouts and concurrency based on observed workload rather than allowing Cloud Run autoscaling to send unbounded pressure toward a project-level API quota.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.