---
title: "Create a new dataset. They are used in conjunction with the Structurued Data
or Documetn Parsing API requests. Behavior of datasets when used with the
APIs:
* Structured Extraction API - Structured Data from files are automatically
  inserted into datasets. A JSON schema is required to guide the extraction.
* Document Parsing API - Chunks of parsed documents from the Document
  Parsing API automatically."
method: POST
path: "/documents/v1/datasets"
tags: ["datasets"]
---

# Create a new dataset. They are used in conjunction with the Structurued Data
or Documetn Parsing API requests. Behavior of datasets when used with the
APIs:
* Structured Extraction API - Structured Data from files are automatically
  inserted into datasets. A JSON schema is required to guide the extraction.
* Document Parsing API - Chunks of parsed documents from the Document
  Parsing API automatically.

`POST /documents/v1/datasets`

## Request body

- CreateDatasetRequest
  - `name` string, required
  - `description` string, nullable
  - `settings` Settings, required
    - `tableParsingMode` 'tsr' | 'vlm' | 'unknown'
    - `tableOutputMode` 'markdown' | 'html'
    - `tableSummarization` boolean — Whether to summarize the contents of the tables.
    - `tableSummarizationPrompt` string, nullable — The prompt to use for table summarization.
    - `figureSummarization` boolean — Whether to summarize the contents of the figures.
    - `figureSummarizationPrompt` string, nullable — The prompt to use for figure summarization. If not provided, the default prompt will be used.
    - `formDetectionMode` 'vlm' | 'tsr' | 'unknown'
    - `chunkStrategy` 'page' | 'section' | 'fragment' — Chunking strategy determines how the document is chunked into smaller pieces. This is only supported in Markdown mode.
    - `jsonSchema` unknown
    - `structuredExtractionPrompt` string, nullable — Overide the prompt to customize structured extractions. Use this if you want to extract data from a file using a different prompt than the one we use to extract.
    - `modelProvider` 'tensorlake' | 'claude-3-5-sonnet-latest' | 'gpt-4o-mini' — The model provider to use for structured data extraction.
    - `deliverWebhook` boolean — Whether to deliver a webhook when the job is completed. A webhook needs to be configured for this to work. If a webhook is not configured, the job will still be processed but the webhook will not be delivered.
    - `detectSignature` boolean — Boolean to perform signature detection.
    - `skewCorrection` boolean — Skew correction for the document.
    - `disableLayoutDetection` boolean — Whether to disable layout detection.
    - `structuredExtractionSkipOcr` boolean — Whether to skip OCR for structured extraction.
    - `detectStrikethrough` boolean

## Response `200`

Create a new dataset. Reference the name to insert structured data from documents extracted by the Structured Extraction API automatically.

- CreateDatasetResponse
  - `id` string, required

## Other responses

- `400` — Invalid request. The dataset name must be alphanumeric, hyphens, and underscores, and the JSON schema must be valid.
- `401` — Unauthorized. Invalid or missing credentials
- `403` — Forbidden. You do not have permission to access this resource
- `404` — Dataset not found
- `500` — Internal server error

---

[API](https://skmtc.net/tensorlakeai/apis/tensorlake-api.md) · [All operations](https://skmtc.net/tensorlakeai/apis/tensorlake-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tensorlakeai/tensorlake-api/versions/fb161f7c0ab7/schema)
