Stay organized with collectionsSave and categorize content based on your preferences.
You can export models that you have already trained to back them up.
You can use these backups to roll back an existing model or to transfer a model to a new project.
Export a model
Permissions required for this task
To perform this task, you must have the followingpermissions:
contactcenterinsights.issueModels.export
Exporting a topic model to Cloud Storage lets you save a backup
copy of the model so that you can restore it later if needed.
REST
To export a topic model, call theexportmethod on theissueModelresource.
Export Topic Model
Before using any of the request data,
make the following replacements:
PROJECT_ID: Your project ID.
ISSUE_MODEL_ID: The ID of the topic model to export.
GCS_DESTINATION: A Cloud Storage URI where the topic model is exported to.
HTTP method and URL:
POST https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels/ISSUE_MODEL_ID:export
To perform this task, you must have the followingpermissions:
contactcenterinsights.issueModels.create
contactcenterinsights.issueModels.import
Importing a topic model from Cloud Storage lets you replace an
existing topic model or create a new topic model based on an existing
model. Starting from an existing model can be useful when you want to
make tweaks without changing the original model.
To replace an existing topic model, call the import method with a
Cloud Storage object URI, pointing to a previously exported topic
model from the same project. Conversational Insights pulls the replacement model
ID from the exported file.
If the topic model does not exist in the project or is being imported
into a new project, Conversational Insights automatically creates a new topic model.
Optionally, you can set thecreate_new_modelflag if you don't want to
replace the existing model.
REST
Import Topic Model
Before using any of the request data,
make the following replacements:
PROJECT_ID: Your project ID.
GCS_SOURCE: The Cloud Storage URI where the topic model is saved.
CREATE_NEW_MODEL: Boolean flag to create a new model, rather than replacing an existing model.
HTTP method and URL:
POST https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels:import
[[["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-04 UTC."],[[["\u003cp\u003eTrained models can be exported to Cloud Storage for backup purposes, allowing for restoration if needed.\u003c/p\u003e\n"],["\u003cp\u003eExported models can be imported to replace an existing model or transfer to a new project, providing flexibility in model management.\u003c/p\u003e\n"],["\u003cp\u003eExporting and importing models is exclusively available for V2 or later topic models, ensuring feature availability for newer versions.\u003c/p\u003e\n"],["\u003cp\u003eSpecific permissions, such as \u003ccode\u003econtactcenterinsights.issueModels.export\u003c/code\u003e for exporting and \u003ccode\u003econtactcenterinsights.issueModels.create\u003c/code\u003e and \u003ccode\u003econtactcenterinsights.issueModels.import\u003c/code\u003e for importing, are necessary to perform these tasks.\u003c/p\u003e\n"],["\u003cp\u003eWhen importing, you have the option to replace an existing topic model, or create a new model, which can be toggled via the \u003ccode\u003ecreate_new_model\u003c/code\u003e flag, giving control over the model creation process.\u003c/p\u003e\n"]]],[],null,["# Export and import a topic model\n\nYou can export models that you have already trained to back them up.\nYou can use these backups to roll back an existing model or to transfer a model to a new project.\n| **Note:** Exporting and importing models is available only for V2 or later topic models.\n\nExport a model\n--------------\n\n#### Permissions required for this task\n\nTo perform this task, you must have the following\n[permissions](/iam/docs/overview#permissions):\n\n\n- `contactcenterinsights.issueModels.export`\n\nExporting a topic model to Cloud Storage lets you save a backup\ncopy of the model so that you can restore it later if needed. \n\n### REST\n\nTo export a topic model, call the `export` method on the\n[`issueModel`](/contact-center/insights/docs/reference/rest/v1/projects.locations.issueModels)\nresource.\nExport Topic Model\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eISSUE_MODEL_ID\u003c/var\u003e: The ID of the topic model to export.\n- \u003cvar translate=\"no\"\u003eGCS_DESTINATION\u003c/var\u003e: A Cloud Storage URI where the topic model is exported to.\n\n| **Note:** All the examples are using the global Conversational Insights instance. Refer to [Regionalization](/contact-center/insights/docs/regionalization) for instructions on using regional instances.\n\n\nHTTP method and URL:\n\n```\nPOST https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels/ISSUE_MODEL_ID:export\n```\n\n\nRequest JSON body:\n\n```\n{ \n gcs_destination: { \n object_uri: 'GCS_DESTINATION'\n }\n}\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels/ISSUE_MODEL_ID:export\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels/ISSUE_MODEL_ID:export\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_ID/locations/us-central1/operations/OPERATION_ID\"\n}\n```\n\nImport a model\n--------------\n\n#### Permissions required for this task\n\nTo perform this task, you must have the following\n[permissions](/iam/docs/overview#permissions):\n\n\n- `contactcenterinsights.issueModels.create`\n- `contactcenterinsights.issueModels.import`\n\nImporting a topic model from Cloud Storage lets you replace an\nexisting topic model or create a new topic model based on an existing\nmodel. Starting from an existing model can be useful when you want to\nmake tweaks without changing the original model.\n\n- To replace an existing topic model, call the import method with a Cloud Storage object URI, pointing to a previously exported topic model from the same project. Conversational Insights pulls the replacement model ID from the exported file.\n- If the topic model does not exist in the project or is being imported into a new project, Conversational Insights automatically creates a new topic model.\n- Optionally, you can set the `create_new_model` flag if you don't want to replace the existing model.\n\n### REST\n\nImport Topic Model\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eGCS_SOURCE\u003c/var\u003e: The Cloud Storage URI where the topic model is saved.\n- \u003cvar translate=\"no\"\u003eCREATE_NEW_MODEL\u003c/var\u003e: Boolean flag to create a new model, rather than replacing an existing model.\n| **Note:** All the examples are using the global Conversational Insights instance. Refer to [Regionalization](/contact-center/insights/docs/regionalization) for instructions on using regional instances.\n\n\nHTTP method and URL:\n\n```\nPOST https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels:import\n```\n\n\nRequest JSON body:\n\n```\n{\n gcs_source: {\n object_uri: 'GCS_SOURCE'\n }\n create_new_model: CREATE_NEW_MODEL\n}\n```\n\nTo send your request, expand one of these options:\n\n#### curl (Linux, macOS, or Cloud Shell)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X POST \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels:import\"\n```\n\n#### PowerShell (Windows)\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method POST `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://contactcenterinsights.googleapis.com/v1/projects/PROJECT_ID/locations/us-central1/issueModels:import\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_ID/locations/us-central1/operations/OPERATION_ID\"\n}\n```\n\n\u003cbr /\u003e"]]