openapi: 3.1.0 info: title: Tensorlake Datasets Files 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: Files description: Upload and manage files referenced by parse and extraction jobs. paths: /documents/v2/files: put: operationId: put_file_v2 tags: - Files summary: Upload a file description: Uploads a document as multipart/form-data and returns a file id used in subsequent parse and extraction requests. MODELED request body. requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary responses: '200': description: The uploaded file. content: application/json: schema: $ref: '#/components/schemas/FileObject' '401': $ref: '#/components/responses/Unauthorized' get: operationId: list_files_v2 tags: - Files summary: List files description: Lists uploaded files in the current project. parameters: - $ref: '#/components/parameters/Cursor' - $ref: '#/components/parameters/Limit' responses: '200': description: A page of files. content: application/json: schema: type: object properties: items: type: array items: $ref: '#/components/schemas/FileObject' next_cursor: type: string '401': $ref: '#/components/responses/Unauthorized' /documents/v2/files/{file_id}: parameters: - $ref: '#/components/parameters/FileId' delete: operationId: delete_file_v2 tags: - Files summary: Delete a file description: Deletes an uploaded file by id. 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/files/{file_id}/metadata: parameters: - $ref: '#/components/parameters/FileId' get: operationId: get_file_metadata_v2 tags: - Files summary: Get file metadata description: Retrieves metadata (name, size, mime type, page count) for a file. responses: '200': description: The file metadata. content: application/json: schema: $ref: '#/components/schemas/FileObject' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: parameters: FileId: name: file_id in: path required: true description: The id of the uploaded file. schema: type: string Limit: name: limit in: query required: false description: Maximum number of items to return. schema: type: integer Cursor: name: cursor in: query required: false description: Pagination cursor returned by a previous list call. schema: type: string responses: 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: DeleteResponse: type: object properties: id: type: string deleted: type: boolean FileObject: type: object description: MODELED file object. properties: id: type: string name: type: string mime_type: type: string size_bytes: type: integer page_count: type: integer created_at: type: string format: date-time 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 .'