Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Before you can run Dataproc jobs, you need to create a cluster
of virtual machines to run them on. To create a Dataproc cluster
in your project, fill in and execute the Google APIs Explorer Try this API
template.
Specify the region
where your cluster will be located (accept or replace "us-central1"). Since you
are not specifying a zone within the region in this quickstart,
Dataproc Auto Zone placement
will pick a zone within the region where it will create the cluster.
Request body:
Specify a
clusterName,
(accept or replace "example-cluster").
You will use this name to interact with your cluster, for example when you
submit jobs
or update the cluster.
Click EXECUTE. The first time you
run the API template, you may be asked to choose and sign into
your Google account, then authorize the Google APIs Explorer to access your
account. If the request is successful, the JSON response
shows that cluster creation is pending.
To confirm cluster creation, open the
Dataproc Clusters
page in the Google Cloud console. After cluster provisioning completes,
the cluster's status will show as "Running".
Clean up
To avoid incurring charges to your Google Cloud account for
the resources used on this page, follow these steps.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eThis guide demonstrates how to create a Dataproc cluster using an inline Google APIs Explorer template to interact with the Dataproc API.\u003c/p\u003e\n"],["\u003cp\u003eBefore running Dataproc jobs, a cluster of virtual machines must be created using the provided Google APIs Explorer template, which requires your project ID and a specified region.\u003c/p\u003e\n"],["\u003cp\u003eWhen creating a cluster, users must input their project ID, choose a cluster region, and assign a cluster name, with options to accept or alter pre-filled values.\u003c/p\u003e\n"],["\u003cp\u003eAfter cluster creation, you can verify its status as "Running" on the Dataproc Clusters page in the Google Cloud console, and if no longer needed, the cluster should be deleted to avoid charges.\u003c/p\u003e\n"],["\u003cp\u003eAlternative ways to create a cluster exist, such as using the Google Cloud console, the Google Cloud CLI, or client libraries, and these are also options for removing the cluster.\u003c/p\u003e\n"]]],[],null,["Create a Dataproc cluster by using a template This page shows you how to use an inline\n[Google APIs Explorer](https://developers.google.com/apis-explorer/#p/)\ntemplate to call the Dataproc API to create a Dataproc cluster.\n\nFor other ways to create a cluster, see:\n\n- [Create a Dataproc cluster by using the Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#create_a_cluster)\n- [Create a Dataproc cluster by using the Google Cloud CLI](/dataproc/docs/quickstarts/create-cluster-gcloud#create_a_cluster)\n- [Create a Dataproc cluster by using client libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries)\n\nBefore you begin\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Dataproc API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=dataproc&redirect=https://console.cloud.google.com)\n\n\u003cbr /\u003e\n\nCreate a cluster\n\nBefore you can run Dataproc jobs, you need to create a cluster\nof virtual machines to run them on. To create a Dataproc cluster\nin your project, fill in and execute the Google APIs Explorer **Try this API**\ntemplate.\n| **Note:** The `region` and `clusterName` parameter values are filled in for you. Accept or replace these \"seeded\" parameter values.\n\n1. **Request parameters:**\n\n 1. Insert your [**projectId**](https://console.cloud.google.com/).\n 2. Specify the [**region**](/compute/docs/regions-zones/regions-zones#available) where your cluster will be located (accept or replace \"us-central1\"). Since you are not specifying a zone within the region in this quickstart, [Dataproc Auto Zone placement](/dataproc/docs/concepts/configuring-clusters/auto-zone) will pick a zone within the region where it will create the cluster.\n2. **Request body:**\n\n 1. Specify a [**clusterName**](/dataproc/docs/reference/rest/v1/projects.regions.clusters#Cluster.FIELDS.cluster_name), (accept or replace \"example-cluster\"). You will use this name to interact with your cluster, for example when you [submit jobs](/dataproc/docs/quickstarts/submit-spark-job-template) or [update the cluster](/dataproc/docs/quickstarts/update-cluster-template).\n3. Click **EXECUTE**. The first time you\n run the API template, you may be asked to choose and sign into\n your Google account, then authorize the Google APIs Explorer to access your\n account. If the request is successful, the JSON response\n shows that cluster creation is pending.\n\n4. To confirm cluster creation, open the\n [Dataproc Clusters](https://console.cloud.google.com/dataproc/clusters)\n page in the Google Cloud console. After cluster provisioning completes,\n the cluster's status will show as \"Running\".\n\n\nClean up\n\n\nTo avoid incurring charges to your Google Cloud account for\nthe resources used on this page, follow these steps.\n\n\u003cbr /\u003e\n\n1. If you don't need the cluster to explore the other quickstarts or to run other jobs, use the [APIs Explorer](/dataproc/docs/quickstarts/quickstart-explorer-delete), the [Google Cloud console](/dataproc/docs/quickstarts/create-cluster-console#clean-up), the gcloud CLI [gcloud](/dataproc/docs/quickstarts/create-cluster-gcloud#clean-up) command-line tool, or the [Cloud Client Libraries](/dataproc/docs/quickstarts/create-cluster-client-libraries) to delete the cluster.\n\nWhat's next\n\n- Learn how to [submit a Spark job by using a template](/dataproc/docs/quickstarts/submit-spark-job-template)."]]