Skip to main content
Back to API List This API exports a trained AI model from the system. Once initiated, the export process runs in the background. Use the dockStatusId from the API response to call the Get Dock Status API and track the export status. Additionally, the response provides a download URL. Copy and paste this URL into a browser or API client to download the exported model’s file.
MethodPOST
Endpointhttps://{host}/api/public/models/:{modelId}/export
Content Typeapplication/json
AuthorizationX-api-key - The API key used for authentication.
Where can I find the API key? To use the API, create ab API key.

Path Parameters

PARAMETERDESCRIPTIONTYPEREQUIRED/OPTIONAL
hostThe environment URL. For example, https://agent-platform.domain.ai/StringRequired
modelIdThe unique identifier of the model you want to export.StringRequired

Sample Request

curl --location --request POST 'https://{host}/api/public/models/cm-dxxxxxxxxxxxxxxxxxx6/export' 
--header 'x-api-key: kg-axxxxxxx-5xx3-5xx8-xxx-9xxxxxxxxxx-ebxxxxxx-5xxb-4xxb-9xx5-cxxxxxxxxx3'

Body Parameters

No parameters are passed.

Sample Response

{
  "_id": "ds-fxxxxxx0-6xxf-5xxb-9xxf-ebxxxxxxxxx0",
   "modelId": "cm-ddxxxxxb-0xxb-5xxe-bxx2-51xxxxxxxxx6",
   "jobType": "MODELS",
   "action": "EXPORT",
   "status": "SUCCESS",
   "percentageComplete": 100,
   "response": {
       "downloadUrl": " https://{host}/api/v1/account/xxxxxx"
  }
}

Response Parameters

PARAMETERDESCRIPTIONTYPE
dockStatusIdThe unique identifier to track the status of action. For example: import, export, deploy, etc.String
modelIdThe unique identifier for the model.String
jobTypeType of job being performed.String
actionThe action that is performed on the model.String
statusThe current status of the job (IN_PROGRESS, SUCCESS, or FAILED).String
percentageCompleteThe percentage of the model export process that is complete.Number
downloadURLThe URL to download the exported model file.String