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

PropertyTypeDescription
convertConvertDocument conversion operations
identifyIdentifyDocument identification operations
documentTypesDocumentTypesDocument type catalog
stepsStepsProcessing step execution
knowledgeBasesKnowledgeBasesKnowledge 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

On this page