Optional. The deploy config to use for the deployment. If not specified, the default deploy config will be used.
artifactsUnion type
The artifacts to deploy.artifactscan be only one of the following:
publisherModelNamestring
The Model Garden model to deploy. Format:publishers/{publisher}/models/{publisherModel}@{versionId}, orpublishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001.
huggingFaceModelIdstring
The Hugging Face model to deploy. Format: Hugging Face model id likegoogle/gemma-2-2b-it.
Response body
If successful, the response body contains an instance ofOperation.
ModelConfig
The model config to use for the deployment.
Fields
acceptEulaboolean
Optional. Whether the user accepts the End user License Agreement (EULA) for the model.
huggingFaceAccessTokenstring
Optional. The Hugging Face read access token used to access the model artifacts of gated models.
huggingFaceCacheEnabledboolean
Optional. If true, the model will deploy with a cached version instead of directly downloading the model artifacts from Hugging Face. This is suitable for VPC-SC users with limited internet access.
modelDisplayNamestring
Optional. The user-specified display name of the uploaded model. If not set, a default name will be used.
Optional. The specification of the container that is to be used when deploying. If not set, the default container spec will be used.
modelUserIdstring
Optional. The id to use for the uploaded Model, which will become the final component of the model resource name. When not provided, Vertex AI will generate a value for this id. When Model Registry model is provided, this field will be ignored.
This value may be up to 63 characters, and valid characters are[a-z0-9_-]. The first character cannot be a number or hyphen.
Optional. The user-specified display name of the endpoint. If not set, a default name will be used.
dedicatedEndpointEnabled (deprecated)boolean
Optional. Deprecated. Use dedicatedEndpointDisabled instead. If true, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon.
dedicatedEndpointDisabledboolean
Optional. By default, if dedicated endpoint is enabled, the endpoint will be exposed through a dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon.
If this field is set to true, the dedicated endpoint will be disabled and the deployed model will be exposed through the shared DNS {region}-aiplatform.googleapis.com.
endpointUserIdstring
Optional. Immutable. The id to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this id.
If the first character is a letter, this value may be up to 63 characters, and valid characters are[a-z0-9-]. The last character must be a letter or number.
If the first character is a number, this value may be up to 9 characters, and valid characters are[0-9]with no leading zeros.
When using HTTP/JSON, this field is populated based on a query string argument, such as?endpointId=12345. This is the fallback for fields that are not included in either the URI or the body.
[[["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-08-21 UTC."],[],[],null,["# Method: locations.deploy\n\n**Full name**: projects.locations.deploy\n\nDeploys a model to a new endpoint. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1``/{destination}:deploy` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`destination` `string` \nRequired. The resource name of the Location to deploy the model in. Format: `projects/{project}/locations/{location}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `modelConfig` `object (`[ModelConfig](/vertex-ai/docs/reference/rest/v1/projects.locations/deploy#ModelConfig)`)` \nOptional. The model config to use for the deployment. If not specified, the default model config will be used.\n`endpointConfig` `object (`[EndpointConfig](/vertex-ai/docs/reference/rest/v1/projects.locations/deploy#EndpointConfig)`)` \nOptional. The endpoint config to use for the deployment. If not specified, the default endpoint config will be used.\n`deployConfig` `object (`[DeployConfig](/vertex-ai/docs/reference/rest/v1/projects.locations/deploy#DeployConfig)`)` \nOptional. The deploy config to use for the deployment. If not specified, the default deploy config will be used. \n`artifacts` `Union type` \nThe artifacts to deploy. `artifacts` can be only one of the following:\n`publisherModelName` `string` \nThe Model Garden model to deploy. Format: `publishers/{publisher}/models/{publisherModel}@{versionId}`, or `publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`.\n`huggingFaceModelId` `string` \nThe Hugging Face model to deploy. Format: Hugging Face model id like `google/gemma-2-2b-it`. \n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\nModelConfig\n-----------\n\nThe model config to use for the deployment.\nFields `acceptEula` `boolean` \nOptional. Whether the user accepts the End user License Agreement (EULA) for the model.\n`huggingFaceAccessToken` `string` \nOptional. The Hugging Face read access token used to access the model artifacts of gated models.\n`huggingFaceCacheEnabled` `boolean` \nOptional. If true, the model will deploy with a cached version instead of directly downloading the model artifacts from Hugging Face. This is suitable for VPC-SC users with limited internet access.\n`modelDisplayName` `string` \nOptional. The user-specified display name of the uploaded model. If not set, a default name will be used.\n`containerSpec` `object (`[ModelContainerSpec](/vertex-ai/docs/reference/rest/v1/ModelContainerSpec)`)` \nOptional. The specification of the container that is to be used when deploying. If not set, the default container spec will be used.\n`modelUserId` `string` \nOptional. The id to use for the uploaded Model, which will become the final component of the model resource name. When not provided, Vertex AI will generate a value for this id. When Model Registry model is provided, this field will be ignored.\n\nThis value may be up to 63 characters, and valid characters are `[a-z0-9_-]`. The first character cannot be a number or hyphen. \n\nEndpointConfig\n--------------\n\nThe endpoint config to use for the deployment.\nFields `endpointDisplayName` `string` \nOptional. The user-specified display name of the endpoint. If not set, a default name will be used.\n`dedicatedEndpointEnabled` \n**(deprecated)** `boolean` \n| This item is deprecated!\n\nOptional. Deprecated. Use dedicatedEndpointDisabled instead. If true, the endpoint will be exposed through a dedicated DNS \\[Endpoint.dedicated_endpoint_dns\\]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon.\n`dedicatedEndpointDisabled` `boolean` \nOptional. By default, if dedicated endpoint is enabled, the endpoint will be exposed through a dedicated DNS \\[Endpoint.dedicated_endpoint_dns\\]. Your request to the dedicated DNS will be isolated from other users' traffic and will have better performance and reliability. Note: Once you enabled dedicated endpoint, you won't be able to send request to the shared DNS {region}-aiplatform.googleapis.com. The limitations will be removed soon.\n\nIf this field is set to true, the dedicated endpoint will be disabled and the deployed model will be exposed through the shared DNS {region}-aiplatform.googleapis.com.\n`endpointUserId` `string` \nOptional. Immutable. The id to use for endpoint, which will become the final component of the endpoint resource name. If not provided, Vertex AI will generate a value for this id.\n\nIf the first character is a letter, this value may be up to 63 characters, and valid characters are `[a-z0-9-]`. The last character must be a letter or number.\n\nIf the first character is a number, this value may be up to 9 characters, and valid characters are `[0-9]` with no leading zeros.\n\nWhen using HTTP/JSON, this field is populated based on a query string argument, such as `?endpointId=12345`. This is the fallback for fields that are not included in either the URI or the body. \n\nDeployConfig\n------------\n\nThe deploy config to use for the deployment.\nFields `dedicatedResources` `object (`[DedicatedResources](/vertex-ai/docs/reference/rest/v1/DedicatedResources)`)` \nOptional. The dedicated resources to use for the endpoint. If not set, the default resources will be used.\n`fastTryoutEnabled` `boolean` \nOptional. If true, enable the QMT fast tryout feature for this model if possible.\n`systemLabels` `map (key: string, value: string)` \nOptional. System labels for Model Garden deployments. These labels are managed by Google and for tracking purposes only."]]