AiDocx - Automating Customs Declarations with AI

Challenge

Customs brokers and logistics firms spend hours manually retyping invoice and shipping data into declaration forms.
Each shipment includes multiple documents, often in different formats and languages - invoices, packing lists, transport notes - all of which need to be converted into structured fields.

The founders of AiDocx approached us to automate this process using AI, while maintaining accuracy and compliance with customs requirements.
They needed a proof of concept that could handle complex document layouts and turn them into clean, structured JSON ready for customs declaration systems.

Solution

We designed and built AiDocx, an AI-powered document automation platform that reads, classifies, and structures logistics paperwork.

The system combines:

  • Azure Document Intelligence for OCR and layout understanding
  • OpenAI model integration for field extraction and validation
  • A custom schema-driven pipeline built on Hono, Postgres, and Vercel AI SDK for structured AI outputs

The product was developed end-to-end by Nebule, including architecture, backend, AI model integration, and deployment infrastructure on Azure.
The platform processes Excel, PDF, and image inputs, generating multiple customs declarations from a single file - reducing processing time from minutes to seconds.

Results

  • End-to-end automation of manual data entry for logistics brokers
  • Generation time reduced from ~10 seconds to under 2 seconds after prompt tuning
  • Accuracy improvement through schema validation and adaptive learning
  • Full SaaS infrastructure delivered — ready for multi-tenant scaling and integration with ERP or customs gateways

Key Takeaways

Even document-heavy, regulation-driven workflows can be reimagined through AI when combined with careful engineering.
By keeping models tightly bound to a schema and iterating in short, measurable steps, we helped AiDocx prove that automation can be both fast and reliable.