Required. The project/location to create generator for. Format: projects/<Project ID>/locations/<Location ID>
Query parameters
Parameters
generatorId
string
Optional. The ID to use for the generator, which will become the final component of the generator's resource name.
The generator ID must be compliant with the regression formula [a-zA-Z][a-zA-Z0-9_-]* with the characters length in range of [3,64]. If the field is not provided, an Id will be auto-generated. If the field is provided, the caller is responsible for 1. the uniqueness of the ID, otherwise the request will be rejected. 2. the consistency for whether to use custom ID or not under a project to better ensure uniqueness.
Request body
The request body contains an instance of Generator.
Response body
If successful, the response body contains a newly created instance of Generator.
[[["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-06-27 UTC."],[[["\u003cp\u003eThis page details the process of creating a generator via an HTTP POST request to a specific endpoint, following gRPC Transcoding syntax.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, specifying the project and location where the generator will be created, and an optional \u003ccode\u003egeneratorId\u003c/code\u003e query parameter to set a custom ID for the generator.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain a \u003ccode\u003eGenerator\u003c/code\u003e instance, and a successful response will return a newly created \u003ccode\u003eGenerator\u003c/code\u003e instance as well.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization to create a generator requires either the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: projects.generators.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a generator.\n\n### HTTP request\n\n`POST https://{endpoint}/v2beta1/{parent=projects/*}/generators`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/dialogflow/es/docs/reference/rest#rest_endpoints).\n\nThe URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n### Query parameters\n\n### Request body\n\nThe request body contains an instance of [Generator](/dialogflow/es/docs/reference/rest/v2beta1/projects.generators#Generator).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Generator](/dialogflow/es/docs/reference/rest/v2beta1/projects.generators#Generator).\n\n### Authorization scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n- `\n https://www.googleapis.com/auth/dialogflow`\n\nFor more information, see the [Authentication Overview](/docs/authentication#authorization-gcp)."]]