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 ofGenerator.
Response body
If successful, the response body contains a newly created instance ofGenerator.
[[["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 webpage documents how to create a generator using an HTTP POST request to a specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires a \u003ccode\u003eparent\u003c/code\u003e path parameter, which specifies the project and location where the generator will be created, formatted as \u003ccode\u003eprojects/<Project ID>/locations/<Location ID>\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAn optional \u003ccode\u003egeneratorId\u003c/code\u003e query parameter can be used to define a custom ID for the generator, following specific character and length constraints, or it will be auto-generated if left blank.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include an instance of the \u003ccode\u003eGenerator\u003c/code\u003e resource, and a successful response will return a newly created \u003ccode\u003eGenerator\u003c/code\u003e resource.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication requires one of the specified OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/dialogflow\u003c/code\u003e.\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}/v2/{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/v2/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/v2/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)."]]