Files
fil/docs/snippets/wasm/ocr/cloud_ocr_backend.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

651 B

import init, { extractBytes } from "kreuzberg-wasm";

await init();

// Cloud OCR backends are not supported in WASM directly.
// WASM runs in a sandboxed environment without direct network access.
// To use cloud OCR services, implement a wrapper on your server
// or use a cloud platform with built-in OCR integration.

const cloudOcrConfig = {
  ocr: {
    backend: "custom", // Custom backends must be registered via native runtime
    language: "eng",
  },
};

// This example shows the configuration structure.
// In production, route cloud OCR requests through your backend service.