Scoring models
A scoring model gives 0–1000 risk scores for one kind of decision. Creating one, labeled records, schemas, questions and jobs.
A scoring model rates the risk of one kind of decision, such as a payment, a sign-up or a loan application. It scores a record by asking Grayson a few yes/no questions about it and weighing the answers. Score each record with POST /v1/score and a score_id of your own, unique within the scoring model.
Scores run from 0 (lowest risk) to 1000 (highest). Once a scoring model is calibrated, a score divided by 1,000 is about the chance the outcome is bad: about 1 in 4 records scored near 250 turn out bad. Before then, scores rank records, but their scale is an estimate. See Calibration.
Creating a scoring model
Create one with POST /v1/score/models, from either:
- Its criteria:
nameandcriteria(what the decision is and what a bad outcome means). It's ready at once, with no questions: add your own to start scoring, or calibrate it with labeled records and Finic writes its questions. - Labeled records:
nameanddata. It's calibrated from the start, in about two minutes.
curl https://api.finic.ai/v1/score/models \
-H "Authorization: Bearer $FINIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Card-not-present payment fraud", "criteria": "Card-not-present payments at an online store. Bad: the payment was charged back as fraud within 90 days."}'Rename it, change its criteria or archive it with update_model.
Labeled records
Labeled records are past records with is_bad: true when the outcome was bad, false when it was good. Send them as a JSON array of objects, or as CSV with a header row:
amount_usd,merchant_category,account_age_days,new_device,billing_country,ip_country,is_bad
2400.00,electronics,19,true,US,NG,true
58.12,grocery,1260,false,US,US,false
310.00,gift_cards,3,true,US,US,true- At least 100 rows, with 20 of each outcome. Up to 2,000 are used; the request can be up to 2 MB, and each row up to 60,000 bytes.
is_badistrueorfalse,1or0, or"yes"or"no".- In CSV, an empty cell is
null, and a dotted column name such asmerchant.categoryis a nested field. - Send the fields you'll score with, and only what was known at the time of the decision.
Schema
A scoring model's first calibration records the fields of its labeled records and their types. Records you score are checked against them, and rejected with 400 schema_mismatch if they differ. Send skip_schema_validation: true to score one anyway, or update_schema: true to make its fields the new schema. Until its first calibration, a scoring model takes any record.
Questions and weights
GET /v1/score/models/{model_id} lists the questions a scoring model uses, strongest first:
"questions": [
{ "id": "q004", "text": "This record is a card payment. Is the IP address in a different country from the billing address?", "source": "finic", "weight": 0.91 },
{ "id": "q051", "text": "Was the account opened less than a week before the payment?", "source": "user", "weight": 0.38 }
]weight is how much a question moves the score: positive when a likely yes raises it. Before the first calibration, it's Finic's estimate. source is finic or user. To see the answers behind one score, send include_questions: true to POST /v1/score.
Changing questions
Add your own yes/no questions with add_questions, and remove them with remove_question. Before a scoring model is calibrated, a question you add counts right away. After, it's tried at the next calibration, which uses it if it helps. To remove a question the calibrated score uses, calibrate with remove_questions.
Weights
Each question the score uses has one weight: how far a likely yes moves the score. Positive raises it, negative lowers it, and the larger the number the more the question counts. get_model shows every question's weight.
A weight changes in two ways:
- A calibration fits it from your labeled records. Before the first calibration, Finic estimates it.
- You set it, on the scoring model's page in the Finic app, with
set_question_weight, or with the MCP tool of the same name:
curl -X PATCH https://api.finic.ai/v1/score/models/scm_01M4XRC000RT2GZSKYPD8J86G9/questions/q002 \
-H "Authorization: Bearer $FINIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"weight": 2}'Whichever happened last is the weight. Setting one replaces the fitted or estimated weight and changes the score at once. Calibrating fits every weight again, including the ones you set, so set them again afterwards if you still want them. After you change a weight by hand, the accuracy a calibration reported no longer describes the score.
Weights go from -10 to 10; fitted and estimated ones are mostly between -3 and 3. 0 keeps asking the question without counting its answer. A weight belongs to the scoring model, not to a score request, and the pre-made scores (POST /v1/score/<use_case>) have fixed ones.
Jobs
Creating from labeled records and calibrating return 202 with a job_id. Each takes about two minutes. Check it with GET /v1/jobs/{job_id} every 10 seconds or so, until complete is true. See Limits for how many you can run.
What's stored
A scoring model keeps its name, criteria, schema and questions. Each score keeps its score_id, the score and Grayson's answers. The record you score is kept for as long as your data retention says, so you can open it under Events in the Finic app, and not at all under Zero Data Retention. The labeled records you create or calibrate with are kept, encrypted, only while their job runs, and deleted when it ends.
AI token fraud
Stop free-credit farming, stolen cards and leaked keys. POST /v1/score/ai_token_fraud scores ai token fraud from 0 to 1000 for $0.002 a call.
Calibration
How Finic's scores and answers match your own fraud rates. Calibrating a scoring model with labeled records, base rates for questions, and choosing thresholds.