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.
- Set
DOCUVATE_SERVICE_API_KEYSin.envas a JSON array (keyId, secret, tenantUserId, claims). - Call the API at
https://your-host/v1. - Send the secret as
Authorization: Bearer <secret>orX-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.
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' } });await client.api.createTag({ body: { name: 'Inbox' } });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.
final client = DocuvateClient(
DocuvateClientConfig(
baseUrl: 'https://your-host/v1',
apiKey: apiKey,
),
);
await client.documents.createDocument(/* MultipartFile */);final tags = await client.taxonomy.listTags();
print(tags.data?.items);final response = await client.documents.chat(
id: documentId,
documentChatRequestDto: DocumentChatRequestDto(
message: 'What due date is mentioned?',
),
);
print(response.data?.reply.content);