Credit Clustering Tool

Quick start

The Corporate Credit Clustering Tool benchmarks a company's financial-risk profile against a universe of 7,000+ US-listed public companies. It produces a model-relative risk tier, a continuous scorecard score, domain-level risk diagnostics, and downloadable PDF and Excel reports.

  1. Sign in at /login with the credentials provided by your administrator.
  2. Choose your input method — fill the single-company form, or upload an Excel batch file.
  3. Submit and review the results on screen.
  4. Download the PDF or Excel report (Analyst and Admin roles only).
Viewer accounts can score and view results on screen. Analyst and Admin accounts can additionally download PDF and Excel reports and use batch upload.

The assessment form

All monetary values must be in the same currency. Enter raw values — no thousands separators or currency symbols.

Company identity

FieldRequiredNotes
Company nameYesUsed for report display only. No validation against any register.
Fiscal yearYesFour-digit year of the financial statements, e.g. 2024.
SectorYesBroad sector classification. Does not affect the scoring model directly, but is included in reports.
CurrencyYesCurrency of the financial statements. Use the FX field to convert to USD if needed.
FX to USDNoMultiplier to convert input currency to USD. Example: if data is in BGN and 1 USD ≈ 1.85 BGN, enter 0.54 (1/1.85). Leave at 1.0 if data is already in USD.

Balance sheet

FieldCredit role
Total assetsBase for leverage, profitability, and cash-flow ratios. One of the most important inputs.
Total liabilitiesKey leverage signal — liabilities/assets and structural distress.
EquityEquity cushion. Negative equity triggers a structural distress flag.
Cash & equivalentsNet debt calculation and cash buffer.
Current assetsCurrent ratio (short-term liquidity).
Current liabilitiesCurrent and quick ratio.
ReceivablesQuick ratio (liquid assets vs current liabilities).
InventoryWorking capital diagnostics.
Long-term debtTogether with short-term debt: total debt load, debt/EBITDA, net debt/EBITDA.
Short-term debtAs above. Also matters for near-term refinancing risk.

Income statement

FieldCredit role
RevenueScale context and gross margin diagnostics.
Net incomeProfitability risk — net income / assets.
Operating income (EBIT)Interest coverage (EBIT / interest expense). Also used to reconstruct EBITDA if not provided directly.
Interest expenseInterest coverage and EBITDA interest coverage ratios. Critical for debt-service risk.
D&AEBITDA reconstruction: EBITDA = Operating income + D&A.
EBITDA (override)Optional. If provided, used directly instead of reconstructing from operating income + D&A.
Gross profitOptional. Gross margin diagnostics in reports.
Make sure Operating income means EBIT (earnings before interest and tax), not EBT (before tax only). Using EBT instead of EBIT will distort interest coverage ratios.

Cash flow

FieldCredit role
Operating cash flow (CFO)Operating cash generation vs assets and debt. Core cash-flow risk signal.
CapexFree cash flow = CFO − |Capex|. Used in FCF/debt and debt repayment capacity ratios.

What if a field is missing?

All financial fields are optional except company name and fiscal year. Missing fields reduce the quality of the score. The result page shows feature coverage % — the share of model inputs that were available before imputation.

CoverageInterpretation
100%Full model-feature availability. Strongest basis for scoring.
80–99%Strong coverage. Results are reliable.
67–79%Acceptable. Note the limitation in any analyst commentary.
Below 67%Weak basis. Manual review required before using results.

Batch upload

The batch upload feature allows you to score multiple companies at once from a single Excel file.

  1. Go to Batch upload in the navigation bar.
  2. Download the Excel template using the Download template button.
  3. Open the template in Excel. Row 3 is a pre-filled example — overwrite or delete it. Add one company per row from row 3 onwards.
  4. Save the file as .xlsx. Do not rename or remove column headers.
  5. Upload the file using the drag-and-drop zone or the file selector.
  6. Click Process file and wait.
1 company: Results are shown on screen, same as the manual form.
2+ companies: A ZIP file is downloaded containing a separate PDF and Excel report for each company.
Batch reporting (2+ companies) requires Analyst or Admin role. Viewer accounts can upload single-company files only.

Risk tier label

The model assigns each company to one of five risk tiers. These are model-relative labels — not formal credit ratings.

Risk rankLabelInterpretation
Rank 1Strong relative credit profileStronger financial-risk profile than most companies in the benchmark universe.
Rank 2Good credit profileGenerally sound profile. Not the strongest bucket, but no material concerns.
Rank 3Leveraged / elevated risk profileNoticeable leverage, profitability, liquidity, or cash-flow pressure.
Rank 4Weak credit profileMaterial financial weakness. Often loss-making or cash-burning, but not necessarily insolvent.
Rank 5Distressed / near-default proxySevere financial weakness or distress-like balance-sheet and debt-service profile.
The risk tier is not a formal credit rating and has not been calibrated against agency ratings, observed defaults, or bond yields. Do not use it as a lending approval decision, regulatory assessment, or investment recommendation.

Scorecard credit score

A continuous risk index from 0 to 100. Higher = weaker. It is a weighted average of the six domain risk scores.

Score rangeBroad reading
0 – 20Strong model-relative profile
20 – 40Generally sound profile
40 – 60Elevated / mixed risk profile
60 – 80Weak profile
80 – 100Distress-like profile

These ranges are reading aids, not hard thresholds. The score supports interpretation — it does not replace it.


Cluster affinity

Cluster affinity measures how centrally the company sits within its assigned risk tier. It is based on normalized distance to the cluster centroid.

AffinityReading
Above 0.70Clear, well-centered assignment.
0.40 – 0.70Moderate. Company may sit near a tier boundary.
Below 0.40Borderline. The tier label should be interpreted with extra caution.

Near-default affinity measures similarity to the weakest cluster centroid. A company can be assigned to a non-distressed tier while still showing proximity to distressed profiles. This is a warning signal even without a distressed label.

Affinity is not probability of default. It is a normalized distance-based similarity measure.

Warning flags

Mechanical signals generated directly from the submitted financials. They are not automatic disqualifiers — they are prompts for analyst attention.

FlagMeaning
liabilities_exceed_assetsTotal liabilities exceed total assets. Technical insolvency signal.
negative_equityEquity is negative. Strong structural distress indicator.
current_ratio_below_1Current liabilities exceed current assets. Short-term liquidity concern.
quick_ratio_below_0_5Liquid assets cover less than half of current liabilities.
interest_coverage_below_1EBIT does not cover interest expense. Debt service concern.
negative_or_zero_ebitdaEBITDA is zero or negative. Leverage ratios become unreliable.
negative_cfo_to_assetsOperating cash flow is negative relative to asset base.
high_debt_to_assetsDebt load is high relative to total assets.
assets_below_model_thresholdCompany is significantly smaller than the public-company training universe. Out-of-distribution risk.

Guardrails

A professional interpretation layer added after the model score. Guardrails detect specific red flags that require analyst caution — particularly when the model cluster label may be too optimistic given the raw financials.

LevelMeaning
ClearNo material contradiction detected.
MonitorMinor weakness. Explain but do not overreact.
CautionMeaningful caveat. Qualify the conclusion in any analysis.
High cautionMaterial weakness. Avoid clean low-risk framing in reports.
Override requiredSevere red flag. Manual analyst review is required before any use of the output.

A company can have a relatively strong cluster label and still trigger a guardrail. When this happens, the report should explain the tension rather than hiding it.


Risk domain scores

Each scored company receives six domain risk scores. All scores are on a 0–1 scale where higher means worse. When a component is missing (e.g. EBITDA is negative), the domain score renormalizes over the components that are available — it does not default to the universe median or collapse to NaN.

DomainWhat it capturesScorecard weight
Leverage riskLiabilities/assets (30%), debt/assets (25%), net debt/EBITDA (25%), equity/assets (20%). Net debt/EBITDA component drops for negative-EBITDA companies — remaining weights renormalize.25%
Debt service riskEBIT interest coverage (35%), FCF/debt (25%), debt/EBITDA (25%), EBITDA interest coverage (15%). EBITDA-dependent components drop for negative-EBITDA companies. Fallback to EBIT coverage (60%) + FCF/debt (40%) when no EBITDA components are available at all.25%
Operating cash flow riskCFO/assets (50%) and CFO/debt (50%). CFO/debt component drops for debt-free companies, falling back to CFO/assets alone.20%
Earnings riskNet income / total assets. Single-component domain.15%
Liquidity riskCurrent ratio (35%), quick ratio (30%), FCF/debt repayment capacity (20%), cash/assets buffer (15%). Debt repayment component drops for debt-free companies.10%
Structural distress riskGradient composite: equity buffer risk (60%) + liabilities/assets risk (40%). Distinguishes a 5% equity company from a 50% equity one — not a binary distress flag.5%

Key ratios

RatioFormulaReading aid
Debt / EBITDATotal debt / EBITDABelow 2× strong; 2–4× moderate; above 5× elevated; above 6× high risk
Net debt / EBITDA(Debt − cash) / EBITDANet leverage after cash holdings
Interest coverageEBIT / interest expenseAbove 5× strong; 2–5× adequate; below 2× concern; below 1× distress signal
Current ratioCurrent assets / current liabilitiesAbove 1.5× comfortable; below 1× short-term liquidity concern
Equity / assetsEquity / total assetsDisplayed as %. Higher is better. Negative = negative equity.
These reading aids are general guidelines. The scoring model uses its own calibrated thresholds which may differ from standard textbook ranges.

PDF & Excel reports

PDF report

A professional credit diagnostic document. Sections include:

  • Executive summary with model-relative risk label
  • Risk label scale (1–5 tiers explained)
  • Key financial ratios and risk domain scores
  • Model diagnostics (affinity, near-default affinity, feature coverage)
  • Guardrail assessment
  • Comparison of company to assigned cluster median
  • Mechanical scenario analysis
  • Limitations and methodology disclosure

Excel report

An analyst workbook with multiple tabs:

  • Score Summary — risk label, rank, affinity, outlook, guardrails
  • Ratio Snapshot — financial ratios and risk features
  • Cluster Comparison — company vs assigned-cluster median
  • Scenario Analysis — base + stress scenarios
  • Guardrails — triggered caution items
  • Model Metadata — artifact version, feature list, assumptions
Report downloads require Analyst or Admin role.

Profile & API keys

Go to My profile in the navigation bar to manage your personal API keys and view your request history.

API keys

  • Click New key, give it a label, and copy the full key — it is shown only once.
  • The key begins with ccct_sk_. Store it securely.
  • You can have up to 5 active keys simultaneously.
  • Deactivate or delete keys you no longer use.

Request history

The history table shows your last 50 requests: date, company name, fiscal year, endpoint used, files generated, and success/error status.

Overview

The Corporate Credit Clustering Tool applies domain-guided unsupervised machine learning to produce a structured financial-risk segmentation of companies. The output is a model-relative credit-risk benchmark, not a formal credit rating.

The core question the model answers is: given a company's audited financial profile, how does it compare to a large universe of publicly listed companies across six dimensions of financial risk?

The model is best described as domain-guided unsupervised clustering — not pure unsupervised discovery and not a traditional scoring model. Domain knowledge (ratio selection, risk transformation thresholds, domain aggregation) shapes the feature space, which makes the output financially interpretable.

Data sources

The benchmark model is trained on annual financial statement data from SEC EDGAR filings, sourced through structured XBRL facts.

DimensionDetail
SourceSEC EDGAR (US public company annual filings, primarily 10-K)
Fiscal years2020–2025 in the current version
UniverseUS-listed companies with valid CIK/ticker data
SegmentNon-financial companies only
Size filterMinimum total assets USD 1,000,000
ExcludedBanks, insurers, financial institutions (different accounting logic)

Different XBRL tags for economically similar items (e.g. multiple revenue tags) are resolved through deterministic concept mapping: preferred tags are selected first, with fallback tags used when preferred tags are missing.


Feature engineering

The same feature engineering logic is applied during model training and during private-company scoring. This consistency is critical — the scored company must be represented in the same feature space as the training data.

Derived accounting values

ItemDerivation
Total debtLong-term debt + short-term debt. If both are missing, treated as missing (not zero).
Net debtTotal debt − cash
Free cash flowOperating cash flow − |Capex|
EBITDADirect EBITDA if available; otherwise Operating income + D&A

Base ratios

RatioFormulaCredit meaning
Liabilities / assetsLiabilities / assetsBalance-sheet leverage
Debt / assetsTotal debt / assetsInterest-bearing debt load
Equity / assetsEquity / assetsEquity cushion
Current ratioCurrent assets / current liabilitiesShort-term liquidity
Quick ratio(Cash + receivables) / current liabilitiesLiquid-asset coverage
Interest coverageOperating income / interest expenseEBIT-based debt-service capacity
EBITDA interest coverageEBITDA / interest expenseEBITDA-based interest cushion
Debt / EBITDATotal debt / EBITDALeverage relative to operating earnings
Net debt / EBITDANet debt / EBITDANet leverage
CFO / assetsOperating cash flow / assetsCash generation efficiency
FCF / debtFree cash flow / total debtCash repayment capacity
Net income / assetsNet income / assetsProfitability relative to asset base

All ratio calculations are protected against very small denominators. When a denominator is below the minimum threshold, the ratio is treated as missing rather than producing an extreme value.

Bounded risk transformation

Raw ratios have different units and scales. The model maps each ratio to a bounded component risk score on [0, 1]:

  • For ratios where higher values indicate more risk (e.g. debt/assets): score = clip((x − low) / (high − low), 0, 1)
  • For ratios where lower values indicate more risk (e.g. interest coverage): score = clip((good − x) / (good − bad), 0, 1)

Result: 0 = low risk for that component, 1 = high risk. This makes the feature space mathematically suitable for Euclidean-distance-based clustering and financially interpretable.

Thresholds are analyst-defined and professionally calibrated. Debt-service thresholds are intentionally conservative — strong interest coverage is treated as low risk, while merely positive coverage can still carry moderate risk.

Domain feature aggregation — missing-component renormalization

Component risks are aggregated into domain features using fixed per-domain weights. When a component is NaN for a specific row (for example, net_debt_to_ebitda_risk cannot be computed for a company with negative or zero EBITDA), the remaining components are renormalized to their available weight share. Formally:

domain_feature = Σ(w_i × risk_i for present i) / Σ(w_i for present i)

Consequences:

  • A domain feature is NaN only when every component in that domain is missing — an edge case that rarely occurs in practice.
  • Debt-free companies (CFO/debt undefined), negative-EBITDA companies, and companies missing specific statement items receive valid domain scores based on what can actually be computed.
  • When all components are present, the output is identical to a standard weighted sum (component weights within each domain sum to 1.0). There is no backward-compatibility break for complete data.
  • The same renormalization applies to the scorecard credit score, which aggregates the six domain features with their stated domain weights.
This replaces a prior implementation where any missing component collapsed the entire domain feature to NaN. The imputer would then replace that NaN with the universe median, silently pulling distressed and debt-free companies toward average risk. The renormalization removes that hidden bias.

Six domain features

Component risks are aggregated into six domain features. These six features are the direct model inputs — each company becomes a six-dimensional risk vector. Component weights within each domain sum to 1.0. Missing components are renormalized out (see above).

DomainComponents and weightsCredit meaning
Leverage risk Liabilities/assets risk 30%
Debt/assets risk 25%
Net debt/EBITDA risk 25%
Equity/assets buffer risk 20%
Net debt/EBITDA drops when EBITDA ≤ 0
How much debt the company carries relative to its assets and earnings capacity
Debt service risk EBIT interest coverage risk 35%
FCF/debt risk 25%
Debt/EBITDA risk 25%
EBITDA interest coverage risk 15%
EBITDA components drop when EBITDA ≤ 0. Fallback: EBIT coverage (60%) + FCF/debt (40%) when no EBITDA data is available at all.
Ability to service debt from earnings and cash flow
Operating cash flow risk CFO/assets risk 50%
CFO/debt risk 50%
CFO/debt drops for debt-free companies; falls back to CFO/assets alone
Quality and sustainability of operating cash generation relative to both asset base and debt obligations
Earnings risk Net income/assets risk 100% Profitability relative to the asset base
Liquidity risk Current ratio risk 35%
Quick ratio risk 30%
FCF/debt repayment capacity risk 20%
Cash/assets buffer risk 15%
FCF/debt component drops for debt-free companies
Ability to meet short-term obligations
Structural distress risk Equity buffer risk 60%
Liabilities/assets risk 40%
Gradient composite — not a binary flag. Distinguishes 5% equity from 50% equity.
Hard balance-sheet vulnerability — thin or negative equity cushion and high liability coverage of assets

All six features are already bounded [0, 1] and directionally aligned (higher = more risk). The model does not apply StandardScaler before clustering, because scaling would destroy the intentional financial meaning of the bounded risk space.


Clustering

The model groups companies into five risk tiers based on their six-dimensional risk vectors. The algorithm identifies natural groupings in the financial-risk space — companies with similar risk profiles are placed in the same tier.

Five tiers were selected to produce an interpretable, practical risk scale. The selection balances mathematical cluster quality (measured by silhouette score, Calinski-Harabasz index, and Davies-Bouldin index) with financial interpretability and business communication value.

After clustering, tiers are ranked by their median scorecard credit score — from the strongest financial profile (rank 1) to the weakest (rank 5). Cluster IDs assigned by the algorithm are arbitrary; the ordered risk rank is the meaningful business scale.

Raw cluster IDs (e.g. "Cluster 2") are not directly meaningful. Always interpret the risk rank and cluster label, not the raw cluster number.

Scorecard credit score

The scorecard credit score is a weighted index of the six domain risk features, scaled to [0, 100], with renormalization over the domains that are actually available:

score = 100 × Σ(w_d × risk_d for available d) / Σ(w_d for available d)
DomainWeight
Leverage risk25%
Debt service risk25%
Operating cash flow risk20%
Earnings risk15%
Liquidity risk10%
Structural distress risk5%

The score is not itself the clustering model input. It is used to rank the clusters after training, to explain a company's continuous risk position, and to support report interpretation. When all six domains are available, the sum of weights equals 1.0 and the formula reduces to a standard weighted average.


Soft cluster affinity

After cluster assignment, distances to all centroids are converted to soft affinities using an exponential distance kernel:

a_j = exp(-d_j / T) / Σ_i exp(-d_i / T)

Where d_j is the distance to centroid j and T is a temperature parameter (default 1.0). Higher temperature produces flatter affinity distributions (more uncertainty); lower temperature sharpens the assignment.

Affinity measures how centrally the company sits within its assigned tier. Near-default affinity measures how similar the company is to the weakest tier centroid, regardless of which tier it was assigned to.


Guardrails

Guardrails are a post-model professional interpretation layer. They detect specific financial red flags that may require analyst caution — particularly when the cluster label may appear stronger than the raw financials justify.

Guardrail families include: leverage (high debt/assets, high debt/EBITDA), coverage (weak interest coverage), liquidity (current ratio below 1.0, quick ratio below 0.5), and structural distress (negative equity, liabilities exceeding assets).

Guardrails do not change the cluster assignment. They provide a professional interpretation overlay that qualifies the model output.


Scenario analysis

The report includes mechanical stress scenarios that modify the base financials and rescore the company. Typical scenarios:

ScenarioDescription
BaseReported or submitted financials as-is
Revenue down 15%Revenue, profit, operating income, and CFO reduced
Debt up 25%Debt and liabilities increased
Cash burnCash reduced, profitability and cash flow weakened
Near-default stressBalance sheet and coverage pushed toward distress
Scenarios are mechanical sensitivities, not forecasts. They show how the model would classify the company under those specific input changes — they do not predict future outcomes.

Known limitations

LimitationImpactMitigation
Not a formal credit ratingLabels not calibrated to agency ratings or observed defaultsUse as screening and benchmarking only; disclose clearly
US public-company training universePrivate, SME, non-US, and IFRS-only companies are partly out-of-distributionReview feature coverage; disclose benchmark origin
Survivorship biasCompanies that defaulted or delisted before data pull are under-representedDo not use probability-of-default language; treat weakest cluster as stress proxy
Point-in-time profileOne fiscal year snapshot; does not model cycle or migrationScore multiple years; present as point-in-time signal
Missing data imputationDomain features renormalize over available components, reducing median imputation bias. However, when entire financial statements are absent (e.g. no cash flow data at all), the affected domain features still fall back to median imputation, pulling coverage toward the universe average.Always review feature_coverage_pct; avoid strong conclusions below 67% coverage
Financial companies excludedModel is invalid for banks, insurers, financial institutionsDo not override this limitation
No qualitative factorsManagement, covenants, ownership support, sector outlook not includedUse model as structured financial diagnostic; layer qualitative analysis separately
No external validationLabels not empirically tested against defaults or ratingsTreat as exploratory screening tool; external validation is future work

Correct terminology

Say thisNot this
Model-relative credit-risk bucketCredit rating
Assigned to an elevated-risk tierRated BB / rated sub-investment grade
Near-default affinity indicates proximity to the weakest cluster20% probability of default
Negative outlook means closer to a weaker adjacent tierThe company will deteriorate
Financial-risk diagnostic / benchmarkBank approval model / PD model
Cluster-derived risk labelObjective credit score

Authentication

All API endpoints require a personal API key passed in the X-API-Key HTTP header.

Obtaining your API key

  1. Sign in and go to My profile.
  2. Click New key, enter a label, and click Create.
  3. Copy the full key immediately — it is shown only once.
  4. Store it securely (environment variable, secrets manager).

Using your key

X-API-Key: ccct_sk_your_key_here
Never expose your API key in client-side code, public repositories, or shared documents. Deactivate compromised keys immediately from your profile page.

POST /api/v1/score

Score one company by submitting financial data as a JSON body. This is the recommended method for programmatic access.

MethodPOST
URLhttp://your-server/api/v1/score
Content-Typeapplication/json
Auth headerX-API-Key: ccct_sk_...

GET /api/v1/score

Score one company using URL query parameters. Useful for quick testing and simple integrations.

MethodGET
URLhttp://your-server/api/v1/score?company_name=...&fiscal_year=...&assets=...
Auth headerX-API-Key: ccct_sk_...
The interactive Swagger UI at /docs lets you test both endpoints directly in your browser. Click "Authorize" and enter your API key.

Request fields

Required

FieldTypeDescription
company_namestringCompany name for report display.
fiscal_yearintegerFiscal year of the financial statements, e.g. 2024.

Optional — identity

FieldTypeDefaultDescription
currencystring"USD"ISO 4217 currency code.
major_sectorstring"Manufacturing / Industrials"Broad sector classification.
financial_flagstring"Non-financial"Use "Non-financial" for all standard companies. Financial institutions not supported.
fx_to_model_currencyfloat1.0Multiplier to convert input currency to USD.

Optional — financial inputs

All monetary fields are optional floats. All values must be in the currency specified (or converted via fx_to_model_currency). Omit fields that are not available — the model will score with available inputs and report feature_coverage_pct.

FieldFinancial item
assetsTotal assets
liabilitiesTotal liabilities
equityTotal equity
cashCash and cash equivalents
current_assetsCurrent assets
current_liabilitiesCurrent liabilities
receivablesTrade receivables
inventoryInventory
long_term_debtLong-term debt / borrowings
short_term_debtShort-term debt / current portion of debt
revenueTotal revenue / net sales
net_incomeNet profit / net income after tax
operating_incomeEBIT — operating income before interest and tax
gross_profitGross profit (optional diagnostic)
interest_expenseInterest expense / finance costs
depreciation_amortizationD&A — used for EBITDA reconstruction
ebitdaEBITDA — if provided directly, overrides reconstruction
cfoOperating cash flow from cash flow statement
capexCapital expenditures (positive number)

Response fields

FieldTypeDescription
company_namestringAs submitted.
fiscal_yearintegerAs submitted.
assigned_clusterintegerRaw cluster ID. Do not interpret directly.
cluster_labelstringHuman-readable risk tier label. Primary result.
risk_rankinteger (1–5)Ordered risk tier. 1 = strongest, 5 = weakest.
cluster_affinityfloat (0–1)Similarity to the assigned cluster centroid.
near_default_affinityfloat (0–1)Similarity to the weakest cluster centroid.
scorecard_credit_scorefloat (0–100)Weighted risk index. Higher = weaker profile.
feature_coverage_pctfloat (0–1)Share of model features available. 1.0 = full coverage.
warning_flagslist[string]Mechanical red flags from raw financials.
guardrail_levelstring or nullClear / Monitor / Caution / High caution / Override required.
guardrail_summarystring or nullProfessional explanation of guardrail triggers.
analyst_interpretationstring or nullAnalyst-level narrative of the risk position.
commercial_conclusionstring or nullCommercial framing of the result.
leverage_riskfloat (0–1) or nullLeverage domain risk score.
liquidity_riskfloat (0–1) or nullLiquidity domain risk score.
earnings_riskfloat (0–1) or nullEarnings domain risk score.
operating_cashflow_riskfloat (0–1) or nullOperating cash flow domain risk score.
debt_service_riskfloat (0–1) or nullDebt service domain risk score.
structural_distress_riskfloat (0–1) or nullStructural distress domain risk score.
debt_to_ebitdafloat or nullDebt / EBITDA ratio (×).
net_debt_to_ebitdafloat or nullNet debt / EBITDA ratio (×).
interest_coveragefloat or nullEBIT / interest expense (×).
current_ratiofloat or nullCurrent assets / current liabilities (×).
equity_to_assetsfloat or nullEquity / assets. Negative = negative equity.

Error codes

HTTP statusMeaningCommon cause
200SuccessValid request and response.
401UnauthorizedMissing, invalid, or deactivated API key.
422UnprocessableMissing required fields or invalid data types in request body.
500Server errorInternal error — check server logs. Contact administrator.

Error responses include a detail field with a human-readable explanation.


Python example

import requests

API_KEY = "ccct_sk_your_key_here"
BASE_URL = "http://localhost:8080"

payload = {
    "company_name": "Acme Corp",
    "fiscal_year": 2024,
    "assets": 29_721_275,
    "liabilities": 20_638_824,
    "equity": 9_082_353,
    "cash": 34_805,
    "current_assets": 10_037_746,
    "current_liabilities": 12_722_353,
    "long_term_debt": 7_910_588,
    "short_term_debt": 1_478_235,
    "revenue": 48_585_294,
    "net_income": 949_412,
    "operating_income": 1_664_706,
    "interest_expense": 597_647,
    "depreciation_amortization": 2_713_000,
    "cfo": 3_558_235,
    "capex": 588_235,
}

response = requests.post(
    f"{BASE_URL}/api/v1/score",
    json=payload,
    headers={"X-API-Key": API_KEY},
)

response.raise_for_status()
result = response.json()

print(f"Risk tier:  {result['cluster_label']}")
print(f"Score:      {result['scorecard_credit_score']:.1f} / 100")
print(f"Guardrail:  {result['guardrail_level'] or 'Clear'}")
print(f"Coverage:   {result['feature_coverage_pct'] * 100:.0f}%")

cURL example

curl -X POST http://localhost:8080/api/v1/score \
  -H "X-API-Key: ccct_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "company_name": "Acme Corp",
    "fiscal_year": 2024,
    "assets": 29721275,
    "liabilities": 20638824,
    "equity": 9082353,
    "revenue": 48585294,
    "net_income": 949412,
    "operating_income": 1664706,
    "interest_expense": 597647,
    "long_term_debt": 7910588,
    "short_term_debt": 1478235,
    "cfo": 3558235
  }'

GET with query parameters

curl "http://localhost:8080/api/v1/score?\
company_name=Acme+Corp\
&fiscal_year=2024\
&assets=29721275\
&revenue=48585294\
&operating_income=1664706\
&interest_expense=597647" \
  -H "X-API-Key: ccct_sk_your_key_here"

JavaScript example

const API_KEY = "ccct_sk_your_key_here";
const BASE_URL = "http://localhost:8080";

const payload = {
  company_name: "Acme Corp",
  fiscal_year: 2024,
  assets: 29721275,
  liabilities: 20638824,
  equity: 9082353,
  revenue: 48585294,
  net_income: 949412,
  operating_income: 1664706,
  interest_expense: 597647,
  long_term_debt: 7910588,
  short_term_debt: 1478235,
  cfo: 3558235,
};

const response = await fetch(`${BASE_URL}/api/v1/score`, {
  method: "POST",
  headers: {
    "X-API-Key": API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(payload),
});

if (!response.ok) {
  const err = await response.json();
  throw new Error(err.detail);
}

const result = await response.json();
console.log(`Risk tier: ${result.cluster_label}`);
console.log(`Score:     ${result.scorecard_credit_score.toFixed(1)} / 100`);

Batch file format

For bulk scoring, upload an Excel (.xlsx) or CSV file with one company per row.

Download the template

Go to Batch upload and click Download template (.xlsx). The template contains the correct column headers and an example row.

Column specifications

ColumnRequiredTypeNotes
company_nameYestextUsed for folder naming in ZIP output
fiscal_yearYesintegerFour-digit year
currencyYestextISO 4217 code, e.g. USD, EUR, BGN
major_sectorYestextSee template Instructions sheet for valid values
financial_flagYestext"Non-financial" for all standard companies
All financial fieldsNonumberLeave blank if unavailable — do not enter 0 for missing data
fx_to_model_currencyNofloatDefault 1.0 (USD). Required if input currency is not USD.
Do not enter 0 for missing financial data. Blank cells are treated as missing and handled by the model. Zero is interpreted as a real zero value (e.g. zero cash, zero debt) and will affect ratios.

ZIP output structure

credit_reports_5_companies.zip
├── acme_corp/
│   ├── acme_corp_score_report.xlsx
│   └── acme_corp_credit_report.pdf
├── beta_industries/
│   ├── beta_industries_score_report.xlsx
│   └── beta_industries_credit_report.pdf
└── ...

If a company fails to score, a _ERROR.txt file is included in that company's folder with the error message.


Best practices

  • Store your API key as an environment variable, never hardcoded in source files.
  • Use POST with JSON body for production integrations. GET with query params is convenient for testing but unsuitable for sensitive financial data.
  • Check feature_coverage_pct in every response. Results with coverage below 0.67 should be reviewed manually.
  • Check guardrail_level before using results. Override required means the result needs manual analyst review.
  • Do not interpret assigned_cluster directly — always use risk_rank and cluster_label.
  • Do not present results as formal credit ratings. See the Methodology tab for correct terminology.
  • Use the interactive docs at /docs for live endpoint testing during development.
  • Deactivate unused API keys from your profile page to reduce attack surface.
  • For Excel-based workflows, use the batch upload with a template file rather than calling the API for each company separately.