Stay organized with collectionsSave and categorize content based on your preferences.
Full name: projects.locations.models.copy
Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible forModel.metadatacontent to be region-agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible.
Required. The resource name of the Location into which to copy the Model. Format:projects/{project}/locations/{location}
Request body
The request body contains data with the following structure:
Fields
sourceModelstring
Required. The resource name of the Model to copy. That Model must be in the same Project. Format:projects/{project}/locations/{location}/models/{model}
Customer-managed encryption key options. If this is set, then the Model copy will be encrypted with the provided encryption key.
destination_modelUnion type
If both fields are unset, a new Model will be created with a generated ID.destination_modelcan be only one of the following:
modelIdstring
Optional. Copy sourceModel into a new Model with this id. The id will become the final component of the model resource name.
This value may be up to 63 characters, and valid characters are[a-z0-9_-]. The first character cannot be a number or hyphen.
parentModelstring
Optional. Specify this field to copy sourceModel into this existing Model as a new version. Format:projects/{project}/locations/{location}/models/{model}
Response body
If successful, the response body contains an instance ofOperation.
[[["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."],[],[],null,["# Method: models.copy\n\n**Full name**: projects.locations.models.copy\n\nCopies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for [Model.metadata](/vertex-ai/docs/reference/rest/v1/projects.locations.models#Model.FIELDS.metadata) content to be region-agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible. \n\n### Endpoint\n\npost `https:``/``/{service-endpoint}``/v1``/{parent}``/models:copy` \nWhere `{service-endpoint}` is one of the [supported service endpoints](/vertex-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n`parent` `string` \nRequired. The resource name of the Location into which to copy the Model. Format: `projects/{project}/locations/{location}`\n\n### Request body\n\nThe request body contains data with the following structure:\nFields `sourceModel` `string` \nRequired. The resource name of the Model to copy. That Model must be in the same Project. Format: `projects/{project}/locations/{location}/models/{model}`\n`encryptionSpec` `object (`[EncryptionSpec](/vertex-ai/docs/reference/rest/v1/EncryptionSpec)`)` \nCustomer-managed encryption key options. If this is set, then the Model copy will be encrypted with the provided encryption key. \n`destination_model` `Union type` \nIf both fields are unset, a new Model will be created with a generated ID. `destination_model` can be only one of the following:\n`modelId` `string` \nOptional. Copy sourceModel into a new Model with this id. The id will become the final component of the model resource name.\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`parentModel` `string` \nOptional. Specify this field to copy sourceModel into this existing Model as a new version. Format: `projects/{project}/locations/{location}/models/{model}` \n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/vertex-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation)."]]