gcloud beta ai-platform predict --model=MODEL (--json-instances=JSON_INSTANCES | --json-request=JSON_REQUEST | --text-instances=TEXT_INSTANCES) [--region=REGION] [--signature-name=SIGNATURE_NAME] [--version=VERSION] [GCLOUD_WIDE_FLAG …]
(BETA) gcloud beta ai-platform predict sends a
prediction request to AI Platform for the given instances. This command will
read up to 100 instances, though the service itself will accept instances up to
the payload limit size (currently, 1.5MB). If you are predicting on more
instances, you should use batch prediction via
gcloud beta ai-platform jobs submit prediction.--model=MODEL--json-instances=JSON_INSTANCESAn example of the JSON instances file:
{"images": [0.0, …, 0.1], "key": 3} {"images": [0.0, …, 0.1], "key": 2} …
--json-request=JSON_REQUESTAn example of a JSON request:
{ "instances": [ {"x": [1, 2], "y": [3, 4]}, {"x": [-1, -2], "y": [-3, -4]} ] }
--text-instances=TEXT_INSTANCESAn example of the text instances file:
107,4.9,2.5,4.5,1.7 100,5.7,2.8,4.1,1.3 …
--region=REGIONglobal.
Learn more about regional endpoints and see a list of available regions: https://cloud.google.com/ai-platform/prediction/docs/regional-endpoints
REGION must be one of: global,
asia-east1, asia-northeast1,
asia-southeast1, australia-southeast1,
europe-west1, europe-west2, europe-west3,
europe-west4, northamerica-northeast1,
us-central1, us-east1, us-east4,
us-west1.
--signature-name=SIGNATURE_NAME--version=VERSIONIf unspecified, the default version of the model will be used. To list model versions run
gcloud beta ai-platform versions list--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud ai-platform predictgcloud alpha ai-platform predict
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.