Referencedeveloper reference

How baba's Hebrew tools talk to the translation engine

Every AI-backed free tool on this site calls the same internal gateway. This page documents that contract as it exists today.

This page is documentation only; there is no interactive tool on it.

The gateway contract

Every AI-backed free tool on this site (translation, slang, nikud, grammar checking, and the rest) calls a server-side endpoint at POST /api/tools/<tool> with a JSON body of { text, options, session }. The endpoint checks the session, a per-IP hourly burst guard, a cache, then the visitor's daily quota for that tool, before calling the translation model and returning its result plus a remaining count.

Getting a session

A tool call needs a session token first. POST /api/tools/session with a solved Turnstile token returns a signed session good for 12 hours; pass it back as session on every tool call from that browser.

POST /api/tools/session
Content-Type: application/json

{ "turnstileToken": "..." }

→ { "token": "...", "expiresIn": 43200 }

Calling a tool

This is the actual shape of the internal translate call, sent from this site's own pages.

POST /api/tools/translate
Content-Type: application/json

{
  "text": "I need to renew my passport",
  "options": { "direction": "en-he", "speaker": "female", "listener": "male" },
  "session": "..."
}

→ {
  "translation": "אני צריכה לחדש את הדרכון שלי",
  "transliteration": "ani tricha lechadesh et hadarkon sheli",
  "remaining": 27
}

Tool ids, options and limits

Limits are per visitor per UTC day, except the character cap, which is per request.

Tool idOptionsMax charactersDaily requestsDaily characters
translatedirection, speaker, listener500306000
slangdirection, speaker, listener300102000
biblicalera600155000
aramaicdirection600155000
yiddishdirection, target600155000
pairsource, target, speaker, listener500205000
registerregister, direction, speaker, listener800156000
nikudstyle800208000
grammarstrictness1200158000
tattoonone200101500
lookupcontext120603000

Error codes

CodeStatusMeaning
gate401The session token is missing, expired or was not issued for this IP. Solve the Turnstile challenge again to get a new one.
too_long413The text is over that tool's per-request character cap.
quota429The daily request or character limit for this tool and session has been reached. It resets at midnight UTC.
burst429Too many requests from this IP across every tool in the last hour.
unavailable503The quota store is unreachable, so no paid call is made. Retry after a minute.

Public API status

There is no public API key programme for this engine yet. Anyone wanting Hebrew translation access at scale for a business, newsroom or government use case should go through /enterprise instead of calling the internal /api/tools/* endpoint, which is not for external use and can change without notice.

More free Hebrew tools

All tools