Skip to main content

Official Python SDK for Kynth Core — the AI back-end for your product.

Project description

kynth

Official Python SDK for Kynth Core — the AI back-end for your product. Parse documents, extract fields, redact PII, analyze contracts, fight chargebacks, and enrich companies.

pip install kynth

Quickstart

from kynth import Kynth

client = Kynth(api_key="ksk_live_...")

doc = client.parse(file_url="https://.../invoice.pdf")
print(doc["totalAmount"])              # 4820.5
print(doc["usage"]["balanceRemaining"])  # 490

Get a key (and 500 free credits) at api.kynth.studio. Zero dependencies — stdlib only, Python 3.8+.

Methods

Every method returns the endpoint result as a dict, including a usage envelope. A non-2xx response raises a typed KynthError (and never burns credits).

client.parse(file_url=...)                                  # documents → JSON
client.extract(text=..., fields=["order", "total"])         # pull named fields
client.classify(text=..., labels=["billing", "tech"])       # label text
client.summarize(text=..., length="standard")               # summary + actions
client.redact(text=...)                                      # strip PII/PHI
client.sentiment(text=..., aspects=["product"])             # sentiment + aspects
client.contract(file_url=...)                               # contract → terms + risks
client.chargeback(reason=..., transaction={"amount": 129})  # representment packet
client.enrich(email="sam@stripe.com")                       # company profile
client.account()                                            # balance

Error handling

from kynth import Kynth, KynthError

client = Kynth(api_key="ksk_live_...")
try:
    client.parse(file_url="https://.../invoice.pdf")
except KynthError as err:
    # err.code: "insufficient_credits" | "rate_limited" | "unauthorized" | ...
    print(err.code, err.status, err.message)

MIT © Kynth Studios

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kynth-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kynth-0.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file kynth-0.2.0.tar.gz.

File metadata

  • Download URL: kynth-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for kynth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aaf67c87850531329e1dacf7f9df02ca772e7fefd0a37d342c65f3c28b1c6447
MD5 9ee10a26addd94bc2d4572d2d8a8dbb2
BLAKE2b-256 3a5c55e8389ea6fac85ab4e35d9696195aed1cf18ff36e287f49f31420530824

See more details on using hashes here.

File details

Details for the file kynth-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kynth-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for kynth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8c539cf0f9769923bc2138253d3859f9488fd6e48acae09c7a6d82d8dab3b0d2
MD5 1b50c80e69175cc42e4d5f524a126dc4
BLAKE2b-256 3a7450ec96804584d3ae0f792b31a7ae47b33e724af8e6a5c5b626728ee9a861

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page