--- title: "Create training" slug: "clovastudio-posttask" tags: ["CLOVA Studio"] updated: 2026-10-08T04:23:39Z published: 2026-10-08T04:23:39Z canonical: "api.ncloud-docs.com/clovastudio-posttask" --- > ## Documentation Index > Fetch the complete documentation index at: https://api.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # Create training Available in Classic and VPC Create a training. After the training you created is complete, you can call [Chat Completions API](/docs/en/clovastudio-chatcompletions) or [Chat Completions V3 API](/docs/en/clovastudio-chatcompletionsv3) to generate interactive sentences to see the answers CLOVA Studio generated. ## Request This section describes the request format. The method and URI are as follows: | Method | URI | | --- | --- | | POST | /tuning/v2/tasks | ### Request headers For information about the request headers common to all CLOVA Studio APIs, see [CLOVA Studio request headers](/docs/en/ai-naver-clovastudio-summary#%EC%9A%94%EC%B2%AD%ED%97%A4%EB%8D%94). ### Request body You can include the following data in the body of your request: | Field | Type | Required | Description | | --- | --- | --- | --- | | `name` | String | Optional | Training name - Auto-generate with training creation date if not entered. | | `model` | String | Required | Model name to use for tuning | | `tuningType` | String | Optional | Tuning method - `PEFT` (default) | | `trainEpochs` | String | Optional | Number of epochs trained on the model - 1 ≤ `trainEpochs` ≤ 20 (default: 8) | | `learningRate` | String | Optional | Training rate (level or degree to which model parameters are relearned when tuning) - 1 ≤ `learningRate` ≤ 1.0E-6 (default: 1.0E-4) | | `validationSplitRatio` | Double | Optional | Dataset ratio for validation - 0.0-0.1 (default: 0.0) | | `loraR` | Integer | Optional | Number of dimensions for the low-dimensional matrix used during PEFT training - 2-8 (default: 8) | | `loraAlpha` | Integer | Optional | Scale factor to apply when applying PEFT training results - 2-512 (default: 64) | | `trainingDatasetFilePath` | String | Conditional | Path to the dataset file to be used for training (path within the bucket, excluding the bucket name) - Required if uploaded to the Object Storage service. | | `trainingDatasetBucket` | String | Conditional | Name of the bucket where the dataset file to be used for training was uploaded - Required if `trainingDatasetFilePath` is entered. | | `trainingDatasetAccessKey` | String | Conditional | Access key for accessing the dataset file used for training - Required if `trainingDatasetFilePath` is entered. | | `trainingDatasetSecretKey` | String | Conditional | Secret key for accessing the training dataset file - Required if `trainingDatasetFilePath` is entered. | ### Request example The request example is as follows: ``` curl --location --request POST 'https://clovastudio.stream.ntruss.com/tuning/v2/tasks' \ --header 'Authorization: Bearer {API Key}' \ --header 'Content-Type: multipart/form-data' \ --header 'X-NCP-CLOVASTUDIO-REQUEST-ID: {Request ID}' --data '{ "name": "generation_task", "model": "HCX-003", "tuningType": "PEFT", "trainEpochs": 8, "learningRate": 1e-5f, "trainingDatasetFilePath": "root_path/sub_path/file_name", "trainingDatasetBucket": "bucket_name", "trainingDatasetAccessKey": "access_key", "trainingDatasetSecretKey": "secret_key", "validationSplitRatio": 0, "loraR": 8, "loraAlpha": 64 }' ``` ## Response This section describes the response format. ### Response headers The following describes the response headers. | Headers | Required | Description | | --- | --- | --- | | Content-Type | - | Response data format - `application/json` | ### Response body The response body includes the following data: | Field | Type | Required | Description | | --- | --- | --- | --- | | `status` | Object | - | See [Response status](/docs/en/ai-naver-clovastudio-summary#%EC%9D%91%EB%8B%B5). | | `result` | Object | - | Response result | | `result.id` | String | - | Training ID | | `result.name` | String | - | Training name | | `result.model` | String | - | Tuning model name | | `result.taskType` | String | - | Job type - GENERATION: generation (default) - CLASSIFICATION: classification | | `result.trainEpochs` | Integer | - | Number of epochs trained on the model | | `result.learningRate` | Double | - | Training rate (level or degree to which model parameters are retrained when tuning) | | `result.status` | String | - | Training progress - `WAIT` \| `RUNNING` \| `FAILED` \| `SUCCEEDED` - `WAIT`: Training pending - `RUNNING`: Training in progress - `FAILED`: Training stopped - `SUCCEEDED`: Training completed | | `result.statusInfo` | Array | - | Training progress details: [statusInfo](/docs/en/clovastudio-posttask#statusInfo) | | `result.createdClientType` | String | - | Type of client requesting training - `API` \| `WEB` - `API`: API client - `WEB`: Web client | | `result.createdDate` | String | - | Training creation date - ISO 8601 format | | `result.updatedDate` | String | - | Training modification date - ISO 8601 format | #### `statusInfo` The following describes `statusInfo`. | Field | Type | Required | Description | | --- | --- | --- | --- | | `label` | Array | - | - When the training type is `CLASSIFICATION`: User data labels are displayed. - When the training type is `GENERATION`: `null` | | `dataRows` | Integer | - | Number of data | | `numOfTokens` | Integer | - | Number of data tokens | | `currStep` | Integer | - | Number of current training steps | | `totalTrainSteps` | Integer | - | Number of total training steps | | `currEpoch` | Integer | - | Current epoch | | `totalTrainEpochs` | Integer | - | All training epochs | | `estimatedTime` | Integer | - | Estimated run time - Derived by multiplying the average time of 1 epoch by the total number of training epochs | | `trainLoss` | Double | - | Training loss | | `sendWeightSuccess` | Boolean | - | Whether to save training results - `false` \| `true` - `false`: Don't save - `true`: Save | | `failureReason` | String | - | [Reason for training failure (`FAILED`)](/docs/en/clovastudio-posttask#failureReasonmessage) | | `message` | String | - | [Detailed message for training failure (`FAILED`) reason](/docs/en/clovastudio-posttask#failureReasonmessage) | | `endDatetime` | String | - | Training end date - ISO 8601 format | #### `failureReason`, `message` The following describes training failure reasons (`failureReason`) and the detailed message (`message`) for each training failure reason. | Training failure reason | Message details | Description | | --- | --- | --- | | `file.extension` | `Unavailable file extension. Please check the file extension again.` | The data file extension does not match the requested `tuningType`. | | `file.size` | `Exceeded the disk usage limit. Please check if the file size is {limit} or less.` | The expected file size for the training request is exceeded. | | `file.encoding` | `Unsupported charset` | Non-UTF8-sig encoding | | `file.format` | `Invalid json format. {reason}` | Unable to decode the dataset file (.json/.jsonl) | | `file.format` | `Invalid dataset: required field empty. {column}` | The dataset file does not have the required columns. | | `file.format` | `Invalid dataset: unexpected column. {column}` | The dataset file has unexpected columns. | | `file.format` | `Invalid dataset: duplicate columns. {column}` | The dataset file is not case sensitive and contains duplicate columns. | | `file.format` | `Invalid dataset: column order` | The column order in the dataset file deviates from System_Prompt, C_ID, T_ID, Text, and Completion. | | `file.format` | `Invalid dataset: {column}` | The C_ID (or T_ID) in the dataset file does not satisfy the pattern of starting at 0 and incrementing by 1, or the value is empty. | | `file.error` | - | File read error upon training | | `file.noexist` | - | If the dataset file does not exist | | `File not found` | - | If the file can't be found in Object Storage | | `resource.timeout` | - | Response timeout due to GPU acquisition failure; retry required | | `clops.error` | - | CLOps error while training | | `train.unknown` | - | Non-file related error while training | ### Response example The response example is as follows: #### Succeeded The following is a sample response upon a successful call. ``` { "status": { "code": "20000", "message": "OK" }, "result": { "id": "czf9fbky", "name": "230821-130704", "model": "HCX-003", "trainEpochs": 8, "learningRate": 1.0E-4, "status": "WAIT", "statusInfo": { "label": null, "dataRows": null, "numOfTokens": null, "currStep": null, "totalTrainSteps": null, "currEpoch": null, "totalTrainEpochs": null, "estimatedTime": null, "trainLoss": null, "sendWeightSuccess": null, "failureReason": null, "message":null, "endDatetime": null }, "createdClientType": "API", "createdDate": "2023-08-21T13:07:06+0900", "updatedDate": "2023-08-21T13:07:06+0900" } } ``` #### Failure The following is a sample response upon a failed call. - [Common client error troubleshooting (4xx)](/docs/en/clovastudio-troubleshoot-c4xx) - [Common server error troubleshooting (5xx)](/docs/en/clovastudio-troubleshoot-c5xx)