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

# PIN 上传数据集

> PIN API 的 POST /v1/datasets。使用 multipart/form-data 上传数据集，包含 name、format 与 file 字段。最大接受 MAX_BYTES。

使用此接口上传你自己的数据集文件。提交一个包含数据集名称、格式与文件的 multipart/form-data 请求。服务器接受不超过所配置 MAX\_BYTES 限制的文件，并在数据集处理过程中返回 202 响应。

## 接口

```http theme={null}
POST /v1/datasets
```

## 认证

需要有效的 `Authorization: Bearer <jwt-or-api-key>` 头。

## 请求体

<ParamField body="name" type="string" required>
  上传数据集的名称。
</ParamField>

<ParamField body="format" type="string" required>
  数据集的文件格式，例如 `jsonl`、`csv` 或 `parquet`。
</ParamField>

<ParamField body="file" type="file" required>
  要上传的数据集文件。不得超过 MAX\_BYTES 限制。
</ParamField>

## 响应

<ResponseField name="id" type="string">
  所创建数据集的唯一标识符。
</ResponseField>

<ResponseField name="name" type="string">
  请求中提供的名称。
</ResponseField>

<ResponseField name="status" type="string">
  处理状态，通常为 `processing`。
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://ariapin.example.com:8001/v1/datasets \
    -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
    -F "name=my-dataset" \
    -F "format=jsonl" \
    -F "file=@data.jsonl"
  ```
</RequestExample>

<ResponseExample>
  ```json 202 theme={null}
  {
    "code": 0,
    "data": {
      "id": "ds_xyz",
      "name": "my-dataset",
      "status": "processing"
    },
    "message": ""
  }
  ```
</ResponseExample>
