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

# Datasets

> Upload, manage, and version your tabular datasets.

Datasets are the foundation of every model in Wood Wide AI. Upload a CSV or Parquet file to create a dataset, then reference it when training models.

<CardGroup cols={2}>
  <Card title="Create Dataset" icon="plus" href="/api-reference/datasets/create-dataset">
    Upload a file (up to 30 MB) to create a new dataset.
  </Card>

  <Card title="List Datasets" icon="list" href="/api-reference/datasets/list-datasets">
    Retrieve all datasets in your account.
  </Card>

  <Card title="Get Dataset" icon="eye" href="/api-reference/datasets/get-dataset">
    Fetch details for a specific dataset.
  </Card>

  <Card title="Delete Dataset" icon="trash" href="/api-reference/datasets/delete-dataset">
    Permanently remove a dataset and all its versions.
  </Card>

  <Card title="Preview Dataset Rows" icon="table" href="/api-reference/datasets/preview-dataset-rows">
    Sample rows from the latest ready version.
  </Card>

  <Card title="Look Up Dataset Rows" icon="search" href="/api-reference/datasets/look-up-dataset-rows">
    Fetch specific rows by their ingest-time ID.
  </Card>

  <Card title="List Models Trained on Dataset" icon="list" href="/api-reference/datasets/list-models-trained-on-dataset">
    See all models trained on any version of a dataset.
  </Card>
</CardGroup>

***

## Large File Uploads

Direct file uploads to `POST /datasets`, `POST /models/{model_id}/infer`, and `POST /models/{model_id}/infer-async` are limited to **30 MB**.

For larger files, use the three-step signed-URL upload flow:

1. **Prepare** the upload with the [Prepare Signed-URL Upload](/api-reference/datasets/prepare-signed-url-upload) endpoint to get a signed URL.
2. **Upload** the file directly to the signed URL.
3. **Complete** the upload to trigger ingestion.

<CodeGroup>
  ```python Python theme={null}
  import os
  import requests

  api_key = os.getenv("WOODWIDE_API_KEY")
  base_url = "https://api.woodwide.ai"
  headers = {"Authorization": f"Bearer {api_key}"}

  # Step 1: Prepare Signed-URL Upload
  prepare_response = requests.post(
      f"{base_url}/datasets/upload",
      headers={**headers, "Content-Type": "application/json"},
      json={
          "dataset_name": "large_dataset",
          "file": {
              "filename": "large_data.csv",
              "bytes": os.path.getsize("large_data.csv"),
              "content_type": "text/csv",
          },
      },
  )

  prepare = prepare_response.json()
  upload_url = prepare["upload"]["upload_url"]
  dataset_version_id = prepare["dataset"]["version_id"]

  # Step 2: Upload the file to the signed URL
  with open("large_data.csv", "rb") as f:
      requests.put(upload_url, data=f, headers={"Content-Type": "text/csv"})

  # Step 3: Complete the upload to trigger ingestion
  complete_response = requests.post(
      f"{base_url}/datasets/{dataset_version_id}/complete",
      headers=headers,
  )

  print(complete_response.json())
  ```

  ```javascript JavaScript theme={null}
  const fs = require("fs");

  const apiKey = process.env.WOODWIDE_API_KEY;
  const baseUrl = "https://api.woodwide.ai";
  const headers = { Authorization: `Bearer ${apiKey}` };

  // Step 1: Prepare Signed-URL Upload
  const prepareResponse = await fetch(`${baseUrl}/datasets/upload`, {
    method: "POST",
    headers: { ...headers, "Content-Type": "application/json" },
    body: JSON.stringify({
      dataset_name: "large_dataset",
      file: {
        filename: "large_data.csv",
        bytes: fs.statSync("large_data.csv").size,
        content_type: "text/csv",
      },
    }),
  });

  const prepare = await prepareResponse.json();
  const uploadUrl = prepare.upload.upload_url;
  const datasetVersionId = prepare.dataset.version_id;

  // Step 2: Upload the file to the signed URL
  const fileStream = fs.createReadStream("large_data.csv");
  await fetch(uploadUrl, {
    method: "PUT",
    headers: { "Content-Type": "text/csv" },
    body: fileStream,
  });

  // Step 3: Complete the upload to trigger ingestion
  const completeResponse = await fetch(
    `${baseUrl}/datasets/${datasetVersionId}/complete`,
    { method: "POST", headers }
  );

  console.log(await completeResponse.json());
  ```

  ```bash curl theme={null}
  export WOODWIDE_API_KEY="your_api_key_here"
  export BASE_URL="https://api.woodwide.ai"

  # Step 1: Prepare Signed-URL Upload
  PREPARE=$(curl -s -X POST "$BASE_URL/datasets/upload" \
    -H "Authorization: Bearer $WOODWIDE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "dataset_name": "large_dataset",
      "file": {
        "filename": "large_data.csv",
        "bytes": 50000000,
        "content_type": "text/csv"
      }
    }')

  UPLOAD_URL=$(echo "$PREPARE" | jq -r '.upload.upload_url')
  VERSION_ID=$(echo "$PREPARE" | jq -r '.dataset.version_id')

  # Step 2: Upload the file to the signed URL
  curl -X PUT "$UPLOAD_URL" \
    -H "Content-Type: text/csv" \
    --data-binary @large_data.csv

  # Step 3: Complete the upload
  curl -s -X POST "$BASE_URL/datasets/$VERSION_ID/complete" \
    -H "Authorization: Bearer $WOODWIDE_API_KEY"
  ```
</CodeGroup>
