Shared Types
Shared TypeScript types in the Docutray Node.js SDK — upload MIME types, pagination wrappers, rate-limit info, and error-detail models with fields.
These types are reused across every method of the Docutray Node.js SDK: the MIME types you may upload, the pagination envelope wrapping list responses, rate-limit metadata read from response headers, and the error shapes surfaced when a request fails. They are all exported from the package for direct import:
import type { ImageContentType, PaginatedResponse } from 'docutray';For the full error class hierarchy that wraps ErrorDetail and
QuotaExceededInfo, see Errors.
ImageContentType
The set of file MIME types accepted by upload-based operations such as Convert and Identify. Passing any other content type is rejected before the request is sent.
type ImageContentType =
| 'image/png'
| 'image/jpeg'
| 'image/tiff'
| 'image/webp'
| 'application/pdf';Pagination
Pagination metadata returned by the API — the current page, page size, and total count. It lets you compute how many more pages remain when iterating list endpoints.
PaginatedResponse
The generic wrapper around every list response: the array of items plus the
Pagination block above. List methods like
client.documentTypes.list() resolve to this shape.
RateLimitInfo
Rate-limit state parsed from the API response headers — remaining requests and the reset window. Read it to back off proactively before hitting a 429.
QuotaExceededInfo
The details attached to a 429 quota response — which limit was exceeded and
when it resets. Surfaced on the corresponding SDK error so you can retry after
the reset.
ErrorDetail
A single structured error entry from a failed API response, carrying the field, code, and message. The typed SDK errors expose an array of these for validation failures.
Knowledge Base Types
TypeScript types for knowledge bases in the Docutray Node.js SDK — KnowledgeBase, documents, and semantic-search result models with fields and enums.
Python SDK
Official Python SDK for the DocuTray API — OCR conversion, document identification, data extraction, and knowledge bases for Python 3.10+.