LendIQ
AI-powered underwriting — bank statement analysis, health scoring, and risk decisions in seconds.
LendIQ is the AI underwriting engine behind LendWorks. Upload bank statements, get health scores, risk decisions, and advance recommendations in seconds. LendIQ runs on its own infrastructure at iq.lend.works.
Install the SDK
LendIQ provides official SDKs for TypeScript/Node.js and Python. Both are typed, zero-dependency, and support ESM and CJS.
npm install @lendworks/lendiqpip install lendiqInfo: Requires Node.js 20+ for the TypeScript SDK or Python 3.9+ for the Python SDK.
Initialize the Client
Create a client instance with your API key. You can generate keys from the portal or via the API.
Standalone
import { LendIQ } from "@lendworks/lendiq";
const client = new LendIQ({ apiKey: "liq_live_..." });from lendiq import LendIQ
client = LendIQ(api_key="liq_live_...")Via Unified LendWorks SDK
When using LendIQ through the unified LendWorks SDK, pass lendiqApiKey at init time:
import { LW } from "@lendworks/lwjs"
const lw = new LW({
apiKey: "lw_live_...",
lendiqApiKey: "liq_live_...",
})
// Then use lw.lendiq.deals.*, lw.lendiq.rulesets.*, etc.
const deal = await lw.lendiq.deals.quickStart({
business_name: "Acme Trucking LLC",
file: "./statements/chase_jan.pdf",
document_type: "bank_statement",
})Create a Deal & Upload a Statement
The quickStart method combines deal creation and document upload into a single call. The pipeline starts processing immediately.
const result = await client.deals.quickStart({
business_name: "Acme Trucking LLC",
file: "./statements/chase_jan.pdf",
document_type: "bank_statement",
idempotency_key: "quick-start-1",
});
console.log(result.deal_id); // New deal created
console.log(result.document_id); // Document queued
console.log(result.status); // "processing"result = client.deals.quick_start(
business_name="Acme Trucking LLC",
file="./statements/chase_jan.pdf",
document_type="bank_statement",
idempotency_key="quick-start-1",
)
print(result.deal_id) # New deal created
print(result.document_id) # Document queued
print(result.status) # "processing"Get the Result
Once the pipeline completes, retrieve the full deal with health score, underwriting decision, and recommended terms.
const deal = await client.deals.get(result.deal_id);
console.log(deal.health.health_score); // 78.5
console.log(deal.health.health_grade); // "B"
console.log(deal.recommendation?.decision); // "approved"
console.log(deal.recommendation?.advance_amount); // 50000
console.log(deal.recommendation?.factor_rate); // 1.35deal = client.deals.get(result.deal_id)
print(deal.health.health_score) # 78.5
print(deal.health.health_grade) # "B"
print(deal.recommendation.decision) # "approved"
print(deal.recommendation.advance_amount) # 50000
print(deal.recommendation.factor_rate) # 1.35Tip: Use SSE streaming instead of polling to get real-time pipeline progress. See the Streaming section for details.
Tip: For a complete API reference with request/response schemas and a try-it explorer, visit the interactive API Reference at /lendiq/api.