Client
DocuTray client class and configuration options
DocuTray
The main client class for interacting with the DocuTray API. Provides access to all API resources through typed properties.
import DocuTray from 'docutray';
// Using environment variable (DOCUTRAY_API_KEY)
const client = new DocuTray();// Explicit API key
const client = new DocuTray({ apiKey: 'dt_my-api-key' });// Custom configuration
const client = new DocuTray({
apiKey: 'dt_my-api-key',
timeout: 30_000,
maxRetries: 3,
});Resources
| Property | Type | Description |
|---|---|---|
convert | Convert | Document conversion operations |
identify | Identify | Document identification operations |
documentTypes | DocumentTypes | Document type catalog |
steps | Steps | Processing step execution |
knowledgeBases | KnowledgeBases | Knowledge base management |
ClientOptions
Configuration options for the DocuTray client.
Prop
Type
RequestOptions
Per-request options that override client-level defaults.
Prop
Type
RetryConfig
Configuration for the exponential backoff retry strategy.
Prop
Type
File Input Types
FileInput
Accepted file input types for document uploads: Blob | Buffer | ArrayBuffer | FileWithMetadata.
FileWithMetadata
A file with explicit filename and optional content type.
Prop
Type