Docuvate SDKs

Official Node and Flutter clients for the headless /v1 API. Contract and codegen use the exported OpenAPI document: openapi/docuvate.v1.json

Runtime: GET /v1/openapi.json (same document).

After API changes: pnpm openapi:export, then pnpm sdk:codegen (see docs/sdks.md). ( docs/sdks.md in the repository.)

Set up service access

Scripts and integrations use a service API key. The key is bound to a user and can carry document permissions.

  1. Set DOCUVATE_SERVICE_API_KEYS in .env as a JSON array (keyId, secret, tenantUserId, claims).
  2. Call the API at https://your-host/v1.
  3. Send the secret as Authorization: Bearer <secret> or X-Docuvate-Api-Key.

Node / TypeScript (@docuvate/sdk)

pnpm add @docuvate/sdk

DocuvateClient with baseUrl and apiKey (service API key). See docs/sdks.md and packages/sdk-node/README.md.

List documents
TypeScript
import { DocuvateClient } from '@docuvate/sdk';

const client = new DocuvateClient({
  baseUrl: 'https://your-host/v1',
  apiKey: process.env.DOCUVATE_API_KEY,
});

const list = await client.api.listDocuments({ query: { status: 'ready' } });
Create a label
TypeScript
await client.api.createTag({ body: { name: 'Inbox' } });
Ask in chat
TypeScript
const reply = await client.api.chat({
  path: { id: documentId },
  body: { message: 'What due date is mentioned?' },
});
console.log(reply.data?.reply?.content);

Flutter (docuvate)

docuvate: ^1.0.0 in pubspec.yaml (monorepo path packages/sdk-flutter)

DocuvateClientConfig with baseUrl and apiKey for headless access.

Upload a document
Dart
final client = DocuvateClient(
  DocuvateClientConfig(
    baseUrl: 'https://your-host/v1',
    apiKey: apiKey,
  ),
);
await client.documents.createDocument(/* MultipartFile */);
List labels
Dart
final tags = await client.taxonomy.listTags();
print(tags.data?.items);
Ask in chat
Dart
final response = await client.documents.chat(
  id: documentId,
  documentChatRequestDto: DocumentChatRequestDto(
    message: 'What due date is mentioned?',
  ),
);
print(response.data?.reply.content);