openapi: 3.1.0 info: title: Tensorlake Datasets API description: 'Tensorlake Cloud APIs for Document Ingestion, Serverless Workflows, and Sandboxes. The Document Ingestion API parses documents (PDF, images, office formats) into layout-aware Markdown and structured chunks, performs schema-guided structured extraction and classification, and manages reusable files and datasets. Parsing runs as an asynchronous job: a parse request returns a parse id (job id) that is polled for results or delivered via webhook. All requests are authenticated with an API key passed as a Bearer token (Authorization: Bearer tl_apiKey_...). GROUNDING NOTE (API Evangelist, 2026-07-12): The path list, HTTP methods, base URL, and Bearer auth are grounded in Tensorlake''s published OpenAPI document (docs.tensorlake.ai/api-reference/openapi.yaml) and API reference. Request and response BODY SCHEMAS below are MODELED from Tensorlake documentation and SDK behavior and are illustrative, not byte-exact - verify field names against the live specification before generating client code.' version: 0.1.0 contact: name: Tensorlake url: https://www.tensorlake.ai servers: - url: https://api.tensorlake.ai description: Tensorlake Cloud security: - bearerAuth: [] tags: - name: Datasets description: Group documents under a shared parse/extraction configuration. paths: /documents/v2/datasets: post: operationId: create_dataset_v2 tags: - Datasets summary: Create a dataset description: Creates a dataset that applies a shared parse / extraction configuration across the files submitted to it. MODELED request body. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DatasetInput' responses: '200': description: The created dataset. content: application/json: schema: $ref: '#/components/schemas/Dataset' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' get: operationId: list_datasets_v2 tags: - Datasets summary: List datasets description: Lists datasets in the current project. responses: '200': description: A page of datasets. content: application/json: schema: type: object properties: items: type: array items: $ref: '#/components/schemas/Dataset' next_cursor: type: string '401': $ref: '#/components/responses/Unauthorized' /documents/v2/datasets/{dataset_id}: parameters: - $ref: '#/components/parameters/DatasetId' get: operationId: get_dataset_v2 tags: - Datasets summary: Get a dataset description: Retrieves a dataset and its configuration by id. responses: '200': description: The requested dataset. content: application/json: schema: $ref: '#/components/schemas/Dataset' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: update_dataset_v2 tags: - Datasets summary: Update a dataset description: Updates a dataset's parse / extraction configuration. MODELED request body. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DatasetInput' responses: '200': description: The updated dataset. content: application/json: schema: $ref: '#/components/schemas/Dataset' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: delete_dataset_v2 tags: - Datasets summary: Delete a dataset description: Deletes a dataset. responses: '200': description: Deletion confirmation. content: application/json: schema: $ref: '#/components/schemas/DeleteResponse' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /documents/v2/datasets/{dataset_id}/data: parameters: - $ref: '#/components/parameters/DatasetId' get: operationId: get_dataset_data_v2 tags: - Datasets summary: Get dataset data description: Retrieves the accumulated parse and structured extraction output for all documents processed under a dataset. parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: A page of dataset rows. content: application/json: schema: type: object properties: items: type: array items: type: object additionalProperties: true next_cursor: type: string '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /documents/v2/datasets/{dataset_id}/parse: parameters: - $ref: '#/components/parameters/DatasetId' post: operationId: parse_dataset_file_v2 tags: - Datasets summary: Submit a file to a dataset description: Submits a file to a dataset, parsing / extracting it with the dataset's shared configuration. Returns a parse id. MODELED request body. requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DatasetParseRequest' responses: '200': description: The parse job was accepted. content: application/json: schema: $ref: '#/components/schemas/ParseJobCreated' '401': $ref: '#/components/responses/Unauthorized' '422': $ref: '#/components/responses/ValidationError' components: parameters: Limit: name: limit in: query required: false description: Maximum number of items to return. schema: type: integer DatasetId: name: dataset_id in: path required: true description: The id of the dataset. schema: type: string Cursor: name: cursor in: query required: false description: Pagination cursor returned by a previous list call. schema: type: string responses: ValidationError: description: The request payload failed validation. content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid Bearer token. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: The requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/Error' schemas: DatasetInput: type: object description: MODELED dataset configuration. properties: name: type: string description: type: string parsing_options: $ref: '#/components/schemas/ParsingOptions' structured_extraction_options: type: array items: $ref: '#/components/schemas/StructuredExtractionOptions' DeleteResponse: type: object properties: id: type: string deleted: type: boolean Dataset: allOf: - $ref: '#/components/schemas/DatasetInput' - type: object properties: id: type: string created_at: type: string format: date-time ParseJobCreated: type: object description: Response returned when an async job is accepted. MODELED. properties: parse_id: type: string description: Identifier used to retrieve the job result. status: type: string enum: - pending - processing - successful - failure DatasetParseRequest: type: object description: MODELED request to submit a file to a dataset. properties: file_id: type: string file_url: type: string format: uri StructuredExtractionOptions: type: object description: MODELED structured extraction configuration. properties: schema_name: type: string json_schema: type: object additionalProperties: true description: A JSON Schema object describing the fields to extract. ParsingOptions: type: object description: MODELED parsing configuration. properties: chunking_strategy: type: string enum: - none - page - section - fragment description: How the parsed output is split into chunks. table_parsing_strategy: type: string description: Strategy used to detect and parse tables. table_output_mode: type: string enum: - markdown - html - json description: Serialization format for detected tables. signature_detection: type: boolean figure_detection: type: boolean Error: type: object properties: error: type: object properties: code: type: string message: type: string details: type: object additionalProperties: true securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: apiKey description: 'Tensorlake API key created in the Tensorlake Cloud dashboard (cloud.tensorlake.ai). Keys are prefixed tl_apiKey_ and are passed as Authorization: Bearer .'