DEV Community

Cover image for Any document in. Clean JSON out. — how I turned my apps' AI layer into a 39-endpoint API
Kynth
Kynth

Posted on • Originally published at api.kynth.studio

Any document in. Clean JSON out. — how I turned my apps' AI layer into a 39-endpoint API

I run a suite of AI products, and every one of them kept re-implementing the same jobs: parse an invoice, normalize a bank statement, redact PII before it hits a log, fight a chargeback. Prompt-level extraction fails silently — the JSON comes back malformed or subtly wrong just often enough that every app grew its own retry/validation/normalization layer.

So I pulled that whole layer out into one API. It's called Kynth Core.

The spearhead: documents

Nine document engines, each committed to one document kind — that commitment is what makes the output schema-valid and field-accurate instead of "usually fine":

Endpoint Job Price
invoice Invoice → vendor, dates, PO refs, tax, line items $0.08/invoice
receipt Receipt → merchant, items, totals, expense category $0.06/receipt
statement Bank/card statement → every transaction, normalized $0.12/statement
resume Resume → structured candidate profile $0.08/resume
tables Any document → every table as clean headers + rows $0.08/document
split Multi-doc scan bundle → classified, split documents $0.10/bundle
compare Two contract versions → material changes + risk $0.15/comparison
contract Contract → parties, term, renewal, obligations, risks $0.12/contract
parse Anything else → structured, validated JSON $0.10/document

Flat price per document — a 9-page statement costs the same as a 1-pager. And the accuracy isn't a vibe: every endpoint's field-level score is public at api.kynth.studio/benchmarks, run against the live production API and re-run on every prompt or model-routing change.

…and 30 more jobs on the same wallet

The catalog behind the spearhead, browsed at /endpoints: guaranteed-schema extraction (structure — your JSON Schema in, conforming output out, retries handled), entity matching, batch categorization, ticket triage, meeting minutes, reply drafting, collections sequences, 3-way PO matching, fraud triage, moderation against your own policy, brand-voice rewriting, a cited web-research brief, lead screening, agent memory (semantic store/search, no vector DB to run), transcription, image generation, and TTS.

Every endpoint is a finished job with its own page and its own per-task price — never a prompt you have to engineer.

The design decisions I actually care about

Priced per task, not per token. You know what a document costs before you send it.

You're only charged on success. The charge happens after a valid result, in the same row-locked transaction that writes the usage ledger.

Model routing is internal. Each task runs on the cheapest model that's good enough (Gemini / Claude / GPT, chosen per job, re-tuned as models improve). You never configure it; you just get the price on the tin.

500 free credits every month, no card. Enough to ship a real integration before you pay anything.

Three ways to call it

curl https://api.kynth.studio/v1/invoice \
  -H "Authorization: Bearer ksk_live_…" \
  -d '{ "fileUrl": "https://…/invoice.pdf" }'
Enter fullscreen mode Exit fullscreen mode

TypeScript:

import { KynthCore } from "@kynth/api";
const kynth = new KynthCore({ apiKey: process.env.KYNTH_API_KEY! });
const doc = await kynth.invoice({ fileUrl });
console.log(doc.total, doc.usage.balanceRemaining);
Enter fullscreen mode Exit fullscreen mode

Python:

from kynth import Kynth
doc = Kynth(api_key="ksk_live_...").invoice(file_url="https://.../invoice.pdf")
Enter fullscreen mode Exit fullscreen mode

And an MCP server, so Claude or Cursor call all 39 endpoints as native tools:

claude mcp add kynth-core -e KYNTH_API_KEY=ksk_live_… -- npx -y @kynth/api-mcp
Enter fullscreen mode Exit fullscreen mode

The SDKs and MCP server are generated from the same catalog the OpenAPI spec is built from, so they can't drift from the API.

Try it

I'd genuinely like feedback on the endpoint set — which of these you'd actually reach for over rolling your own against a raw model, and what's missing. Reply here or poke at the API.

Top comments (0)