> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Export a Model API

[Back to API List](https://koreai.mintlify.site/agent-platform/v1/apis.md)

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](https://koreai.mintlify.site/agent-platform/v1/apis/apis-list/get-dock-status) 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.

| Method | POST |
| :- | :- |
| Endpoint | `https://{host}/api/public/models/:{modelId}/export` |
| Content Type | application/json |
| Authorization | `X-api-key` - The API key used for authentication. |

**Where can I find the API key?**

To use the API, [create ab API key](https://koreai.mintlify.site/agent-platform/v1/apis.md#how-to-create-the-api-key).

## Path Parameters

| PARAMETER | DESCRIPTION | TYPE | REQUIRED/OPTIONAL |
| :- | :- | :- | :- |
| host | The environment URL. For example, `https://agent-platform.domain.ai/` | String | Required |
| modelId | The unique identifier of the model you want to export. | String | Required |

## Sample Request

```js theme={null}
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

```js theme={null}
{
  "_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

| PARAMETER | DESCRIPTION | TYPE |
| :- | :- | :- |
| dockStatusId | The unique identifier to track the status of action. For example: import, export, deploy, etc. | String |
| modelId | The unique identifier for the model. | String |
| jobType | Type of job being performed. | String |
| action | The action that is performed on the model. | String |
| status | The current status of the job (`IN_PROGRESS`, `SUCCESS`, or `FAILED`). | String |
| percentageComplete | The percentage of the model export process that is complete. | Number |
| downloadURL | The URL to download the exported model file. | String |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.