API Quickstart

From zero to first API call in 60 seconds. Search 20 EU data sources, translate across 552 language pairs, and query 2.4 million IATE terms.

Suomeksi (Finnish version)

1. Getting Started

Set up your environment

# Clone the repository
git clone https://github.com/pauhu/pauhu-stack.git
cd pauhu-stack

# Install dependencies
npm install

# Copy environment template and fill in your credentials
cp .env.example .env

# Start the development server
npm run dev

Get an API key

Create your API key from the dashboard at staging.pauhu.eu/keys/. Keys are prefixed with pk_ and are SHA-256 hashed before storage—Pauhu never stores your key in plain text.

Two authentication methods

Pass your key using either header:

# Option 1: Bearer token
Authorization: Bearer pk_...

# Option 2: API key header
X-API-Key: pk_...

Free tier

Every account includes 3 free requests per day with no API key required (IP-based rate limiting). To exceed this limit, add your API key to unlock your plan’s full quota.

2. API Examples

Copy and paste these examples to verify your setup. All endpoints return JSON.

Search EUR-Lex

GET /eurlex/all
curl "https://staging.pauhu.eu/eurlex/all?lang=en&limit=3"

Returns the latest EUR-Lex documents. Add &q=AI+Act to filter by keyword.

IATE terminology lookup

GET /iate/lookup
curl "https://staging.pauhu.eu/iate/lookup?term=public+procurement&lang=en"

Searches the IATE terminology database (2.4 million terms in 24 EU official languages).

Translate (EN → FI)

POST /v1/translate
curl -X POST "https://staging.pauhu.eu/v1/translate" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The contracting authority shall comply with the transparency principle.",
    "source_lang": "en",
    "target_lang": "fi"
  }'

Translates text using OPUS-MT (Helsinki-NLP). Supports 552 language pairs.

Embeddings (BGE-M3)

POST /v1/embeddings
curl -X POST "https://staging.pauhu.eu/v1/embeddings" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "public procurement",
    "model": "bge-m3"
  }'

Returns a 1024-dimensional embedding vector. Uses BGE-M3 for multilingual semantic search.

Chat (SSE stream)

POST /v1/chat
curl -N -X POST "https://staging.pauhu.eu/v1/chat" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What are the obligations of a contracting authority when deploying an AI system?"
  }'

Returns a server-sent events (SSE) stream with grounded answers. Each answer includes source citations from the underlying EU data sources.

All endpoints accept an optional Authorization header. Without one, you are on the free tier (3 requests/day).

3. 20 Data Sources

Pauhu® provides unified API access to 20 official EU institutional data sources. All data is synchronised automatically via cron pipelines.

SourceDescriptionExample Query
TEDTenders Electronic Daily — EU public procurement notices/ted/all?cpv=72000000&lang=en
EUR-LexEU law — regulations, directives, decisions, case law/eurlex/all?lang=en&limit=5
IATEInter-Active Terminology for Europe — 2.4M terms in 24 languages/iate/lookup?term=data+protection&lang=en
CURIACourt of Justice of the EU — judgments and opinions/curia/all?lang=en&limit=3
European ParliamentParliamentary documents, debates, and legislative procedures/europarl/all?lang=en&limit=3
European CommissionPolicy documents, press releases, and communications/commission/all?lang=en&limit=3
Council of the EUCouncil conclusions, meeting documents, and legal acts/consilium/all?lang=en&limit=3
OEILLegislative Observatory — tracking EU legislative procedures/oeil/all?lang=en&limit=3
CORDISEU research projects — Horizon Europe, FP7, H2020/cordis/all?lang=en&limit=3
Data EuropaOpen data portal — datasets from EU institutions/dataeuropa/all?lang=en&limit=3
EurostatStatistical data — demographics, economy, trade/eurostat/all?lang=en&limit=3
Publications OfficeEU publications, Official Journal, CELLAR repository/publications/all?lang=en&limit=3
ECBEuropean Central Bank — monetary policy, financial stability/ecb/all?lang=en&limit=3
ECHAEuropean Chemicals Agency — REACH, CLP, biocides/echa/all?lang=en&limit=3
EMAEuropean Medicines Agency — pharmaceutical authorisations/ema/all?lang=en&limit=3
EPOEuropean Patent Office — patent applications and grants/epo/all?lang=en&limit=3
National LawNational legislation from EU member states/lex/all?lang=en&limit=3
Who is WhoEU institutional directory — organisations and contacts/whoiswho/all?lang=en&limit=3
DPPDigital Product Passport — product lifecycle data (ESPR)/dpp/all?lang=en&limit=3
WikipediaMultilingual encyclopedia — background context/wiki/all?lang=en&limit=3

All product endpoints follow the same pattern: /{product}/all?lang={lang}&limit={n}. Replace {product} with the source identifier from the table above.

4. Security

Pauhu® implements defence-in-depth security across every layer of the stack.

IEC 62443-3-3

Zone-based security architecture with conduit-controlled data flow. All access passes through authenticated security zones before reaching data or models.

GDPR Art. 25 & Art. 32

Privacy by Design and Security of Processing. Data minimisation, pseudonymisation, and encryption at rest and in transit.

Browser-native inference

AI inference runs entirely in the browser via ONNX Runtime. Your queries never leave your device. The server provides pre-scored data; the browser generates answers locally.

EU jurisdiction only

All infrastructure runs in Helsinki, Finland. Every database, storage bucket, and compute worker is bound to EU jurisdiction. No data leaves the EU.

Post-quantum key exchange

X25519Kyber768 hybrid key exchange protects against future quantum computing threats. Cryptographic agility built in from day one.

Ed25519 model signatures

Every ML model is signed with Ed25519. The browser verifies signatures before loading any model weights, preventing tampering.

For more details, see the Security Architecture page or contact security@pauhu.eu.

5. eForms and Public Procurement

Pauhu® indexes all TED (Tenders Electronic Daily) procurement notices and supports eForms business terms for structured querying.

Search TED procurement notices

GET /ted/all
curl "https://staging.pauhu.eu/ted/all?lang=en&limit=5"

Filter by CPV code

Common Procurement Vocabulary (CPV) codes classify the subject of procurement. Use the cpv parameter to filter:

# IT services (CPV 72000000)
curl "https://staging.pauhu.eu/ted/all?cpv=72000000&lang=en&limit=5"

# Construction work (CPV 45000000)
curl "https://staging.pauhu.eu/ted/all?cpv=45000000&lang=en&limit=3"

eForms business terms

The API returns eForms BT fields in the response. Key fields for procurement professionals:

BT FieldNameDescription
BT-21Lot TitleThe title of each lot within a procurement notice
BT-23Main NatureWhether the contract is for works, supplies, or services
BT-27Estimated ValueThe estimated value of the procurement in EUR
BT-262Main Classification CodeThe primary CPV code classifying the procurement subject

Example queries for procurement professionals

# Find IT procurement notices above EUR 100,000
curl "https://staging.pauhu.eu/ted/all?cpv=72000000&lang=en&limit=10"

# Search for AI-related procurement using chat
curl -N -X POST "https://staging.pauhu.eu/v1/chat" \
  -H "Content-Type: application/json" \
  -d '{"query": "Recent public procurement notices for artificial intelligence services in the EU"}'

# Look up procurement terminology in IATE
curl "https://staging.pauhu.eu/iate/lookup?term=contracting+authority&lang=en"

6. Translation and Terminology

OPUS-MT: 552 language pairs

Pauhu® uses Helsinki-NLP OPUS-MT models for neural machine translation. All 24 EU official languages are supported, plus additional pairs for a total of 552 language combinations.

POST /v1/translate
# English to Finnish
curl -X POST "https://staging.pauhu.eu/v1/translate" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The regulation shall apply from 2 August 2026.",
    "source_lang": "en",
    "target_lang": "fi"
  }'

# German to English
curl -X POST "https://staging.pauhu.eu/v1/translate" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Die Verordnung gilt ab dem 2. August 2026.",
    "source_lang": "de",
    "target_lang": "en"
  }'

IATE: 2.4 million terms in 24 languages

The Inter-Active Terminology for Europe (IATE) database contains terminology used by EU institutions. Use it to find the correct translation of domain-specific terms:

# Look up a term in English
curl "https://staging.pauhu.eu/iate/lookup?term=proportionality+principle&lang=en"

# Same term in German
curl "https://staging.pauhu.eu/iate/lookup?term=Verh%C3%A4ltnism%C3%A4%C3%9Figkeitsgrundsatz&lang=de"

# Swedish terminology
curl "https://staging.pauhu.eu/iate/lookup?term=upphandlande+myndighet&lang=sv"

ISO 18587 translation cascade

For production-quality translations, Pauhu implements the ISO 18587 post-editing workflow:

  1. Translation memory (TM) — exact and fuzzy matches from previous translations
  2. Terminology (TB) — IATE term lookup for domain-specific vocabulary
  3. Do-not-translate (DNT) — proper nouns, legal references, and codes preserved verbatim
  4. Neural MT — OPUS-MT translates the remaining text
  5. Post-editing — automated quality checks (terminology consistency, number preservation)
  6. Quality assurance — COMET and BERTScore confidence metrics

The cascade applies automatically when you use the /v1/translate endpoint. No additional configuration is needed.

Next Steps

Questions? Contact us at support@pauhu.eu or visit the API dashboard to manage your keys.