Quickstart
Create a session on your server, open the SDK in your page, and receive the borrower's documents.
You need three things from Kita: KITA_BASE_URL, KITA_API_KEY, and your web
origin (for example https://app.example.com) registered against that key.
1. Create a session on your server
Use your applicant or loan ID as reference_id. It is stored with everything
Kita keeps, so it is how you match results to outcomes later.
Python
import os
from kita_risk import KitaRisk # one file, standard library only
kita = KitaRisk(api_key=os.environ["KITA_API_KEY"], base_url=os.environ["KITA_BASE_URL"])
def start_upload(loan_id: str) -> dict:
session = kita.create_session(reference_id=loan_id, origin="https://app.example.com")
# Only these two values go to the browser. Never the API key.
return {"session_id": session["session_id"], "client_token": session["client_token"]}Send only session_id and client_token to the browser. The token lasts 30
minutes and works for this one session, from this one origin. Without a valid
API key the call returns 401; see authentication.
2. Open the SDK in your page
3. Know when processing finished
onSubmitted means the borrower is done, not that Kita is. Poll the session
from your server, or receive the signed webhook.
Try it without real documents
In the test environment Kita can enable a sandbox mode that labels every screen as sandbox, so you can build the integration before sharing any borrower data.


