@model-match/api 3.78.0 → 3.79.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES.md +13 -0
- package/dist/{index-BTnMwTHB.d.mts → index-CdwXnduS.d.mts} +260 -22
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/slim/index.d.mts +14 -8
- package/dist/slim/index.mjs +24 -8
- package/dist/{src-Ccn-ewCn.mjs → src-DsHTdH5F.mjs} +24 -6
- package/openapi.json +492 -22
- package/package.json +1 -1
package/openapi.json
CHANGED
|
@@ -47182,6 +47182,11 @@
|
|
|
47182
47182
|
},
|
|
47183
47183
|
"type": "array"
|
|
47184
47184
|
},
|
|
47185
|
+
"completeThrough": {
|
|
47186
|
+
"description": "For a market table: the last day (YYYY-MM-DD) its records are treated as fully recorded. Later months are still filling in, so end trends and year-over-year windows here, not at today, and compare the same months of each year.",
|
|
47187
|
+
"nullable": true,
|
|
47188
|
+
"type": "string"
|
|
47189
|
+
},
|
|
47185
47190
|
"coverage": {
|
|
47186
47191
|
"description": "What part of the data is available, when not all of it.",
|
|
47187
47192
|
"type": "string"
|
|
@@ -48153,7 +48158,7 @@
|
|
|
48153
48158
|
"additionalProperties": {
|
|
48154
48159
|
"nullable": true
|
|
48155
48160
|
},
|
|
48156
|
-
"description": "The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. `headline` — one sentence. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on. `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false
|
|
48161
|
+
"description": "The report card (`ready` and `refused`). Read it to the person as it is written; do not round it up. Show the sentences and the fields named `label`, `…Label`, `sentence`, `detail`, `reason`, `summary` and `note`: they are written in plain words. The fields named `id`, `code`, `verdict`, `better`, `kind`, `table` and `column`, and everything under `technical` and `details`, are for programs: never show them to a person (say `verdictLabel` \"helped a little\", not `verdict` `helped_a_little`). `headline` — one sentence. `outcome.label` — what it predicts. `learnedFrom` — how many past cases and over what dates, and the later cases it was tested on; for a model on the person's own outcomes, `learnedFrom.funnel` — the rows in their file, then how many had a date and an outcome, matched a home, had history before their date and were used, each with the reason rows were dropped (`funnel.sentence` says it in one line). `lift.top10` (and `lift.top1` on large tests) — `modelPer100`, `randomPer100`, `bestSimpleRulePer100` and a ready-made `sentence`. `checks` — three, each `passed` true or false, with a `label` and a `detail`: beats the best simple rule, finds nothing when the outcomes are shuffled, holds up across time periods. `dataPoints.ranking` — each data point's `label`, its share, a `verdictLabel` and a `sentence`, and `dataPoints.summary`. `comparison` — the person's picks against every available data point (`sentence`, `betterLabel`) and `worthAdding`. `changeFromPrevious.sentence` — what changed since the version it replaced or was based on. `calibration.calibrated` — only when true may a home's estimated chance be called a chance; otherwise scores are a ranking; `calibration.note` says it. `caution` — when present, say it first. `caveats` — say them. `refusal` — `reason` and `whatWouldHelp` when refused.",
|
|
48157
48162
|
"nullable": true,
|
|
48158
48163
|
"type": "object"
|
|
48159
48164
|
},
|
|
@@ -48184,6 +48189,30 @@
|
|
|
48184
48189
|
],
|
|
48185
48190
|
"type": "object"
|
|
48186
48191
|
},
|
|
48192
|
+
"expectedMinutes": {
|
|
48193
|
+
"description": "While a run is going (training, or a refresh): how long a run like it takes from start to finish, in minutes. It depends on the size of the state: a couple of minutes for a small one, 15 to 25 for the largest. An estimate. Null when nothing is running.",
|
|
48194
|
+
"nullable": true,
|
|
48195
|
+
"properties": {
|
|
48196
|
+
"high": {
|
|
48197
|
+
"type": "number"
|
|
48198
|
+
},
|
|
48199
|
+
"low": {
|
|
48200
|
+
"type": "number"
|
|
48201
|
+
}
|
|
48202
|
+
},
|
|
48203
|
+
"required": [
|
|
48204
|
+
"low",
|
|
48205
|
+
"high"
|
|
48206
|
+
],
|
|
48207
|
+
"type": "object"
|
|
48208
|
+
},
|
|
48209
|
+
"featureLabels": {
|
|
48210
|
+
"description": "The data points by their plain labels, in the same order as `features`.",
|
|
48211
|
+
"items": {
|
|
48212
|
+
"type": "string"
|
|
48213
|
+
},
|
|
48214
|
+
"type": "array"
|
|
48215
|
+
},
|
|
48187
48216
|
"features": {
|
|
48188
48217
|
"items": {
|
|
48189
48218
|
"$ref": "#/components/schemas/StudioModelDataPoint"
|
|
@@ -48209,6 +48238,10 @@
|
|
|
48209
48238
|
"nullable": true,
|
|
48210
48239
|
"type": "string"
|
|
48211
48240
|
},
|
|
48241
|
+
"outcomeLabel": {
|
|
48242
|
+
"description": "What the model predicts, in plain words. Show a person this, `populationLabel` and `featureLabels`; `outcome`, `population` and `features` are the request's own values, for programs.",
|
|
48243
|
+
"type": "string"
|
|
48244
|
+
},
|
|
48212
48245
|
"outcomeSource": {
|
|
48213
48246
|
"additionalProperties": false,
|
|
48214
48247
|
"nullable": true,
|
|
@@ -48263,15 +48296,68 @@
|
|
|
48263
48296
|
"population": {
|
|
48264
48297
|
"$ref": "#/components/schemas/StudioModelPopulation"
|
|
48265
48298
|
},
|
|
48299
|
+
"populationLabel": {
|
|
48300
|
+
"description": "Who is scored, in plain words.",
|
|
48301
|
+
"type": "string"
|
|
48302
|
+
},
|
|
48266
48303
|
"progress": {
|
|
48267
|
-
"description": "
|
|
48304
|
+
"description": "While the model trains: the step it is on, how long it has been, and how long is left (an estimate). Tell the person the step and the remaining range, as a range.",
|
|
48268
48305
|
"nullable": true,
|
|
48269
48306
|
"properties": {
|
|
48307
|
+
"elapsedSeconds": {
|
|
48308
|
+
"description": "Seconds since the run was started.",
|
|
48309
|
+
"type": "number"
|
|
48310
|
+
},
|
|
48311
|
+
"expectedMinutes": {
|
|
48312
|
+
"description": "A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").",
|
|
48313
|
+
"nullable": true,
|
|
48314
|
+
"properties": {
|
|
48315
|
+
"high": {
|
|
48316
|
+
"type": "number"
|
|
48317
|
+
},
|
|
48318
|
+
"low": {
|
|
48319
|
+
"type": "number"
|
|
48320
|
+
}
|
|
48321
|
+
},
|
|
48322
|
+
"required": [
|
|
48323
|
+
"low",
|
|
48324
|
+
"high"
|
|
48325
|
+
],
|
|
48326
|
+
"type": "object"
|
|
48327
|
+
},
|
|
48328
|
+
"note": {
|
|
48329
|
+
"description": "Says that the times are estimates, or that the run is past its estimate and still going. Pass it on.",
|
|
48330
|
+
"type": "string"
|
|
48331
|
+
},
|
|
48332
|
+
"remainingMinutes": {
|
|
48333
|
+
"description": "What is left of the estimate. Null when there is no estimate for this run.",
|
|
48334
|
+
"nullable": true,
|
|
48335
|
+
"properties": {
|
|
48336
|
+
"high": {
|
|
48337
|
+
"type": "number"
|
|
48338
|
+
},
|
|
48339
|
+
"low": {
|
|
48340
|
+
"type": "number"
|
|
48341
|
+
}
|
|
48342
|
+
},
|
|
48343
|
+
"required": [
|
|
48344
|
+
"low",
|
|
48345
|
+
"high"
|
|
48346
|
+
],
|
|
48347
|
+
"type": "object"
|
|
48348
|
+
},
|
|
48270
48349
|
"stage": {
|
|
48350
|
+
"description": "The step the run is on, numbered: \"step 3 of 6: building past cases to learn from\". Steps only ever go up.",
|
|
48271
48351
|
"type": "string"
|
|
48272
48352
|
},
|
|
48273
48353
|
"startedAt": {
|
|
48274
48354
|
"type": "string"
|
|
48355
|
+
},
|
|
48356
|
+
"step": {
|
|
48357
|
+
"type": "number"
|
|
48358
|
+
},
|
|
48359
|
+
"steps": {
|
|
48360
|
+
"type": "number"
|
|
48275
48361
|
}
|
|
48276
48362
|
},
|
|
48277
48363
|
"required": [
|
|
@@ -48284,6 +48370,10 @@
|
|
|
48284
48370
|
"description": "A refresh in progress, or why the last one produced nothing (the earlier scores stay).",
|
|
48285
48371
|
"nullable": true,
|
|
48286
48372
|
"properties": {
|
|
48373
|
+
"elapsedSeconds": {
|
|
48374
|
+
"description": "While it runs: seconds since it started. `expectedMinutes` on the model says how long a refresh takes.",
|
|
48375
|
+
"type": "number"
|
|
48376
|
+
},
|
|
48287
48377
|
"error": {
|
|
48288
48378
|
"properties": {
|
|
48289
48379
|
"code": {
|
|
@@ -48902,6 +48992,104 @@
|
|
|
48902
48992
|
},
|
|
48903
48993
|
"type": "array"
|
|
48904
48994
|
},
|
|
48995
|
+
"trainingTime": {
|
|
48996
|
+
"description": "How long a model takes from start to finish, as a range of minutes: for each state (`states`, when the sizes are known) and by size of state (`sizes`). An estimate from earlier runs (`note` says so; pass it on). Tell the person the range for their state BEFORE starting a model.",
|
|
48997
|
+
"properties": {
|
|
48998
|
+
"basis": {
|
|
48999
|
+
"type": "string"
|
|
49000
|
+
},
|
|
49001
|
+
"note": {
|
|
49002
|
+
"type": "string"
|
|
49003
|
+
},
|
|
49004
|
+
"sizes": {
|
|
49005
|
+
"items": {
|
|
49006
|
+
"properties": {
|
|
49007
|
+
"expectedMinutes": {
|
|
49008
|
+
"description": "A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").",
|
|
49009
|
+
"properties": {
|
|
49010
|
+
"high": {
|
|
49011
|
+
"type": "number"
|
|
49012
|
+
},
|
|
49013
|
+
"low": {
|
|
49014
|
+
"type": "number"
|
|
49015
|
+
}
|
|
49016
|
+
},
|
|
49017
|
+
"required": [
|
|
49018
|
+
"low",
|
|
49019
|
+
"high"
|
|
49020
|
+
],
|
|
49021
|
+
"type": "object"
|
|
49022
|
+
},
|
|
49023
|
+
"label": {
|
|
49024
|
+
"type": "string"
|
|
49025
|
+
},
|
|
49026
|
+
"size": {
|
|
49027
|
+
"enum": [
|
|
49028
|
+
"small",
|
|
49029
|
+
"medium",
|
|
49030
|
+
"large"
|
|
49031
|
+
],
|
|
49032
|
+
"type": "string"
|
|
49033
|
+
}
|
|
49034
|
+
},
|
|
49035
|
+
"required": [
|
|
49036
|
+
"size",
|
|
49037
|
+
"label",
|
|
49038
|
+
"expectedMinutes"
|
|
49039
|
+
],
|
|
49040
|
+
"type": "object"
|
|
49041
|
+
},
|
|
49042
|
+
"type": "array"
|
|
49043
|
+
},
|
|
49044
|
+
"states": {
|
|
49045
|
+
"items": {
|
|
49046
|
+
"properties": {
|
|
49047
|
+
"expectedMinutes": {
|
|
49048
|
+
"description": "A range of minutes, `low` to `high`. An estimate from earlier runs of the same size, not a promise: say it as a range (\"about 13 to 23 minutes\").",
|
|
49049
|
+
"properties": {
|
|
49050
|
+
"high": {
|
|
49051
|
+
"type": "number"
|
|
49052
|
+
},
|
|
49053
|
+
"low": {
|
|
49054
|
+
"type": "number"
|
|
49055
|
+
}
|
|
49056
|
+
},
|
|
49057
|
+
"required": [
|
|
49058
|
+
"low",
|
|
49059
|
+
"high"
|
|
49060
|
+
],
|
|
49061
|
+
"type": "object"
|
|
49062
|
+
},
|
|
49063
|
+
"size": {
|
|
49064
|
+
"enum": [
|
|
49065
|
+
"small",
|
|
49066
|
+
"medium",
|
|
49067
|
+
"large"
|
|
49068
|
+
],
|
|
49069
|
+
"type": "string"
|
|
49070
|
+
},
|
|
49071
|
+
"state": {
|
|
49072
|
+
"type": "string"
|
|
49073
|
+
}
|
|
49074
|
+
},
|
|
49075
|
+
"required": [
|
|
49076
|
+
"state",
|
|
49077
|
+
"size",
|
|
49078
|
+
"expectedMinutes"
|
|
49079
|
+
],
|
|
49080
|
+
"type": "object"
|
|
49081
|
+
},
|
|
49082
|
+
"type": "array"
|
|
49083
|
+
}
|
|
49084
|
+
},
|
|
49085
|
+
"required": [
|
|
49086
|
+
"note",
|
|
49087
|
+
"basis",
|
|
49088
|
+
"sizes",
|
|
49089
|
+
"states"
|
|
49090
|
+
],
|
|
49091
|
+
"type": "object"
|
|
49092
|
+
},
|
|
48905
49093
|
"uploadedOutcomes": {
|
|
48906
49094
|
"properties": {
|
|
48907
49095
|
"keyKinds": {
|
|
@@ -49133,6 +49321,10 @@
|
|
|
49133
49321
|
"StudioQueryRequest": {
|
|
49134
49322
|
"additionalProperties": false,
|
|
49135
49323
|
"properties": {
|
|
49324
|
+
"background": {
|
|
49325
|
+
"description": "`true`: do not wait for the answer. The question starts in the background and this call answers `202` with a `queryId` at once. For a question known to be heavy (a whole state with a window function, several joins). Without it a question is answered here when it is quick, and carries on in the background by itself when it is not.",
|
|
49326
|
+
"type": "boolean"
|
|
49327
|
+
},
|
|
49136
49328
|
"limit": {
|
|
49137
49329
|
"description": "Rows to return (1–1000, default 200). `rowCount` is always the full count.",
|
|
49138
49330
|
"maximum": 1000,
|
|
@@ -49223,6 +49415,158 @@
|
|
|
49223
49415
|
],
|
|
49224
49416
|
"type": "object"
|
|
49225
49417
|
},
|
|
49418
|
+
"StudioQueryResultState": {
|
|
49419
|
+
"properties": {
|
|
49420
|
+
"code": {
|
|
49421
|
+
"description": "On `failed`: the stable code (`timeout`, `query_failed`, …).",
|
|
49422
|
+
"type": "string"
|
|
49423
|
+
},
|
|
49424
|
+
"columns": {
|
|
49425
|
+
"items": {
|
|
49426
|
+
"properties": {
|
|
49427
|
+
"name": {
|
|
49428
|
+
"type": "string"
|
|
49429
|
+
},
|
|
49430
|
+
"type": {
|
|
49431
|
+
"type": "string"
|
|
49432
|
+
}
|
|
49433
|
+
},
|
|
49434
|
+
"required": [
|
|
49435
|
+
"name",
|
|
49436
|
+
"type"
|
|
49437
|
+
],
|
|
49438
|
+
"type": "object"
|
|
49439
|
+
},
|
|
49440
|
+
"type": "array"
|
|
49441
|
+
},
|
|
49442
|
+
"credits": {
|
|
49443
|
+
"description": "What this question costs.",
|
|
49444
|
+
"properties": {
|
|
49445
|
+
"charged": {
|
|
49446
|
+
"description": "Always `0` here: a question in the background is not charged by this request.",
|
|
49447
|
+
"example": 0,
|
|
49448
|
+
"type": "number"
|
|
49449
|
+
},
|
|
49450
|
+
"pending": {
|
|
49451
|
+
"description": "Credits your organization is charged, once, for this question if it succeeds (while `running`) or because it succeeded (on `succeeded`) — whether or not its result is fetched. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.",
|
|
49452
|
+
"example": 5,
|
|
49453
|
+
"type": "number"
|
|
49454
|
+
}
|
|
49455
|
+
},
|
|
49456
|
+
"required": [
|
|
49457
|
+
"charged"
|
|
49458
|
+
],
|
|
49459
|
+
"type": "object"
|
|
49460
|
+
},
|
|
49461
|
+
"details": {
|
|
49462
|
+
"additionalProperties": {
|
|
49463
|
+
"nullable": true
|
|
49464
|
+
},
|
|
49465
|
+
"type": "object"
|
|
49466
|
+
},
|
|
49467
|
+
"elapsedMs": {
|
|
49468
|
+
"type": "number"
|
|
49469
|
+
},
|
|
49470
|
+
"error": {
|
|
49471
|
+
"description": "On `failed`: what went wrong, written for the caller.",
|
|
49472
|
+
"type": "string"
|
|
49473
|
+
},
|
|
49474
|
+
"expiresAt": {
|
|
49475
|
+
"description": "When the answer stops being kept (an hour after it finished).",
|
|
49476
|
+
"type": "string"
|
|
49477
|
+
},
|
|
49478
|
+
"pollAfterSeconds": {
|
|
49479
|
+
"description": "Seconds to wait before fetching the result (again).",
|
|
49480
|
+
"example": 5,
|
|
49481
|
+
"type": "number"
|
|
49482
|
+
},
|
|
49483
|
+
"queryId": {
|
|
49484
|
+
"description": "Identifies the question. Fetch its result with `getStudioQueryResult`.",
|
|
49485
|
+
"example": "q_3f9a1c0b7d2e4a6f8b1c0d2e",
|
|
49486
|
+
"type": "string"
|
|
49487
|
+
},
|
|
49488
|
+
"rowCount": {
|
|
49489
|
+
"description": "Rows the question produced in total.",
|
|
49490
|
+
"type": "number"
|
|
49491
|
+
},
|
|
49492
|
+
"rows": {
|
|
49493
|
+
"description": "One object per row, keyed by column name.",
|
|
49494
|
+
"items": {
|
|
49495
|
+
"additionalProperties": {
|
|
49496
|
+
"nullable": true
|
|
49497
|
+
},
|
|
49498
|
+
"type": "object"
|
|
49499
|
+
},
|
|
49500
|
+
"type": "array"
|
|
49501
|
+
},
|
|
49502
|
+
"status": {
|
|
49503
|
+
"description": "`running` — still going: wait `pollAfterSeconds` and fetch again. `succeeded` — the answer is here (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept until `expiresAt`. `failed` — it did not produce an answer: `error` and `code` say why, as the question itself would have. `expired` — it finished, and its answer is no longer kept: ask the question again.",
|
|
49504
|
+
"enum": [
|
|
49505
|
+
"running",
|
|
49506
|
+
"succeeded",
|
|
49507
|
+
"failed",
|
|
49508
|
+
"expired"
|
|
49509
|
+
],
|
|
49510
|
+
"type": "string"
|
|
49511
|
+
},
|
|
49512
|
+
"truncated": {
|
|
49513
|
+
"description": "True when `rows` holds fewer than `rowCount`.",
|
|
49514
|
+
"type": "boolean"
|
|
49515
|
+
}
|
|
49516
|
+
},
|
|
49517
|
+
"required": [
|
|
49518
|
+
"status",
|
|
49519
|
+
"queryId"
|
|
49520
|
+
],
|
|
49521
|
+
"type": "object"
|
|
49522
|
+
},
|
|
49523
|
+
"StudioQueryRunning": {
|
|
49524
|
+
"properties": {
|
|
49525
|
+
"credits": {
|
|
49526
|
+
"description": "What this question costs.",
|
|
49527
|
+
"properties": {
|
|
49528
|
+
"charged": {
|
|
49529
|
+
"description": "Always `0` here: a question in the background is not charged by this request.",
|
|
49530
|
+
"example": 0,
|
|
49531
|
+
"type": "number"
|
|
49532
|
+
},
|
|
49533
|
+
"pending": {
|
|
49534
|
+
"description": "Credits your organization is charged, once, for this question if it succeeds (while `running`) or because it succeeded (on `succeeded`) — whether or not its result is fetched. Absent when nothing will be charged: a question asked from the web app, or an account that is not metered.",
|
|
49535
|
+
"example": 5,
|
|
49536
|
+
"type": "number"
|
|
49537
|
+
}
|
|
49538
|
+
},
|
|
49539
|
+
"required": [
|
|
49540
|
+
"charged"
|
|
49541
|
+
],
|
|
49542
|
+
"type": "object"
|
|
49543
|
+
},
|
|
49544
|
+
"pollAfterSeconds": {
|
|
49545
|
+
"description": "Seconds to wait before fetching the result (again).",
|
|
49546
|
+
"example": 5,
|
|
49547
|
+
"type": "number"
|
|
49548
|
+
},
|
|
49549
|
+
"queryId": {
|
|
49550
|
+
"description": "Identifies the question. Fetch its result with `getStudioQueryResult`.",
|
|
49551
|
+
"example": "q_3f9a1c0b7d2e4a6f8b1c0d2e",
|
|
49552
|
+
"type": "string"
|
|
49553
|
+
},
|
|
49554
|
+
"status": {
|
|
49555
|
+
"description": "The question is still running in the background. It has NOT failed: fetch its result with `queryId`. Do not ask it again — that starts a second run.",
|
|
49556
|
+
"enum": [
|
|
49557
|
+
"running"
|
|
49558
|
+
],
|
|
49559
|
+
"type": "string"
|
|
49560
|
+
}
|
|
49561
|
+
},
|
|
49562
|
+
"required": [
|
|
49563
|
+
"status",
|
|
49564
|
+
"queryId",
|
|
49565
|
+
"pollAfterSeconds",
|
|
49566
|
+
"credits"
|
|
49567
|
+
],
|
|
49568
|
+
"type": "object"
|
|
49569
|
+
},
|
|
49226
49570
|
"StudioUpload": {
|
|
49227
49571
|
"properties": {
|
|
49228
49572
|
"bytes": {
|
|
@@ -50330,7 +50674,7 @@
|
|
|
50330
50674
|
"info": {
|
|
50331
50675
|
"description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
|
|
50332
50676
|
"title": "ModelMatch API",
|
|
50333
|
-
"version": "3.
|
|
50677
|
+
"version": "3.161.1"
|
|
50334
50678
|
},
|
|
50335
50679
|
"openapi": "3.1.0",
|
|
50336
50680
|
"paths": {
|
|
@@ -89253,7 +89597,7 @@
|
|
|
89253
89597
|
}
|
|
89254
89598
|
}
|
|
89255
89599
|
},
|
|
89256
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
89600
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89257
89601
|
},
|
|
89258
89602
|
"409": {
|
|
89259
89603
|
"content": {
|
|
@@ -89273,7 +89617,7 @@
|
|
|
89273
89617
|
}
|
|
89274
89618
|
}
|
|
89275
89619
|
},
|
|
89276
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
89620
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
89277
89621
|
},
|
|
89278
89622
|
"429": {
|
|
89279
89623
|
"content": {
|
|
@@ -89355,7 +89699,7 @@
|
|
|
89355
89699
|
}
|
|
89356
89700
|
}
|
|
89357
89701
|
},
|
|
89358
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
89702
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89359
89703
|
},
|
|
89360
89704
|
"409": {
|
|
89361
89705
|
"content": {
|
|
@@ -89375,7 +89719,7 @@
|
|
|
89375
89719
|
}
|
|
89376
89720
|
}
|
|
89377
89721
|
},
|
|
89378
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
89722
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
89379
89723
|
},
|
|
89380
89724
|
"429": {
|
|
89381
89725
|
"content": {
|
|
@@ -89465,7 +89809,7 @@
|
|
|
89465
89809
|
}
|
|
89466
89810
|
}
|
|
89467
89811
|
},
|
|
89468
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
89812
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89469
89813
|
},
|
|
89470
89814
|
"409": {
|
|
89471
89815
|
"content": {
|
|
@@ -89485,7 +89829,7 @@
|
|
|
89485
89829
|
}
|
|
89486
89830
|
}
|
|
89487
89831
|
},
|
|
89488
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
89832
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
89489
89833
|
},
|
|
89490
89834
|
"429": {
|
|
89491
89835
|
"content": {
|
|
@@ -89581,7 +89925,7 @@
|
|
|
89581
89925
|
}
|
|
89582
89926
|
}
|
|
89583
89927
|
},
|
|
89584
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
89928
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89585
89929
|
},
|
|
89586
89930
|
"409": {
|
|
89587
89931
|
"content": {
|
|
@@ -89601,7 +89945,7 @@
|
|
|
89601
89945
|
}
|
|
89602
89946
|
}
|
|
89603
89947
|
},
|
|
89604
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
89948
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
89605
89949
|
},
|
|
89606
89950
|
"429": {
|
|
89607
89951
|
"content": {
|
|
@@ -89695,7 +90039,7 @@
|
|
|
89695
90039
|
}
|
|
89696
90040
|
}
|
|
89697
90041
|
},
|
|
89698
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
90042
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89699
90043
|
},
|
|
89700
90044
|
"409": {
|
|
89701
90045
|
"content": {
|
|
@@ -89715,7 +90059,7 @@
|
|
|
89715
90059
|
}
|
|
89716
90060
|
}
|
|
89717
90061
|
},
|
|
89718
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
90062
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
89719
90063
|
},
|
|
89720
90064
|
"429": {
|
|
89721
90065
|
"content": {
|
|
@@ -89821,7 +90165,7 @@
|
|
|
89821
90165
|
}
|
|
89822
90166
|
}
|
|
89823
90167
|
},
|
|
89824
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
90168
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
89825
90169
|
},
|
|
89826
90170
|
"409": {
|
|
89827
90171
|
"content": {
|
|
@@ -89872,7 +90216,7 @@
|
|
|
89872
90216
|
},
|
|
89873
90217
|
"/v1/studio/models": {
|
|
89874
90218
|
"get": {
|
|
89875
|
-
"description": "Every model your organization has: its status, what it predicts, the data points it uses, its report card and where its scores are. Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.",
|
|
90219
|
+
"description": "Every model your organization has: its status, what it predicts, the data points it uses (`featureLabels` in plain words), its report card and where its scores are; for one that is training, the step it is on and how long is left (`progress`, `expectedMinutes`: estimates). Only your organization's models are listed. Listing is free; a model that has just finished is charged for here if this is the first call to see it (`credits`), exactly as getStudioModel would.",
|
|
89876
90220
|
"operationId": "listStudioModels",
|
|
89877
90221
|
"responses": {
|
|
89878
90222
|
"200": {
|
|
@@ -89972,7 +90316,7 @@
|
|
|
89972
90316
|
]
|
|
89973
90317
|
},
|
|
89974
90318
|
"post": {
|
|
89975
|
-
"description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training
|
|
90319
|
+
"description": "Define a model — what to predict, for whom, in which state, and the data points to use — and start training it. It answers at once with `status: training` and `expectedMinutes`, a range that depends on the size of the state: a couple of minutes for a small state, 15 to 25 for the largest (an estimate; say the range, and say it is an estimate). Read the model with getStudioModel until it is `ready` or `refused`: `progress` gives the numbered step it is on and how long is left. `features` is the heart of it: the data points the person believes matter. Their own knowledge can be data points too — columns of their uploaded outcomes table such as a lead source or a rating their team gives. To learn from their own results instead of a market outcome, pass `outcomeSource` (an uploaded table with a home, a date and what happened on every row); that usually helps most. Everything a model learns from is taken strictly before each case's date, and a data point that could show it the answer is refused with the reason. To try a different list of data points, send the same `name` with `replace: true`, or a new name with `basedOn`: the new report card says what changed. An uploaded file's table is named `upload_<name>` (the upload `my_deals` is the table `upload_my_deals`); a wrong name is refused with the names that exist. A request that cannot work is refused now with a clear reason (`error`, `code`, and the numbers in `details`). One model trains at a time per organization, up to 10 models. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
|
|
89976
90320
|
"operationId": "createStudioModel",
|
|
89977
90321
|
"requestBody": {
|
|
89978
90322
|
"content": {
|
|
@@ -90084,7 +90428,7 @@
|
|
|
90084
90428
|
},
|
|
90085
90429
|
"/v1/studio/models/options": {
|
|
90086
90430
|
"get": {
|
|
90087
|
-
"description": "Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits,
|
|
90431
|
+
"description": "Everything needed to define a model: the outcomes that can be predicted, who can be scored (`populations`), the data points a model may use, grouped by theme, each with a line on why someone might believe it matters, the limits, what a table of your own outcomes must contain, and how long a model takes for each state (`trainingTime`: a range of minutes, an estimate). Call this first, show the themes, and ASK which data points the person believes matter: a model is trained on exactly their picks, and its report card tests that belief. Free.",
|
|
90088
90432
|
"operationId": "getStudioModelOptions",
|
|
90089
90433
|
"responses": {
|
|
90090
90434
|
"200": {
|
|
@@ -90300,7 +90644,7 @@
|
|
|
90300
90644
|
]
|
|
90301
90645
|
},
|
|
90302
90646
|
"get": {
|
|
90303
|
-
"description": "The model and, once training has finished, its report card (`card`). Read the card as it is written. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then
|
|
90647
|
+
"description": "The model and, once training has finished, its report card (`card`). While it trains, `progress` says which numbered step it is on, how long it has been and how long is left (an estimate, as a range). Read the card as it is written, using its sentences and labels: fields named `id`, `code`, `verdict`, `better`, and everything under `technical`, are for programs and are never shown to a person. It says how many past cases the model learned from and was tested on; the lift (`in the top 10% of the list, X of every 100 had the outcome, against Y at random and Z for the best simple rule`); three checks, each passed or not; how much each chosen data point mattered; how the person's picks compare with using every data point; and the caveats. Never promise accuracy, and never call a score a probability unless `card.calibration.calibrated` is true (then each home's estimated chance is an estimate from past cases). `status: refused` means the model is not dependable enough to publish: `card.refusal.reason` says why and `card.refusal.whatWouldHelp` what to try; a refused model has no scores. When `scores` is not null, query `scores.table` with runStudioQuery: one row per home with `rank`, `percentile`, `score`, `topReason`, the home's `city` and `zipCode` (select those and leave `streetAddress` out to show the list without street addresses), and `propertyId` to join to `loans` and `sales`. Reading is free. 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). The charge is reported in `credits`.",
|
|
90304
90648
|
"operationId": "getStudioModel",
|
|
90305
90649
|
"parameters": [
|
|
90306
90650
|
{
|
|
@@ -90426,7 +90770,7 @@
|
|
|
90426
90770
|
},
|
|
90427
90771
|
"/v1/studio/models/{name}/refresh": {
|
|
90428
90772
|
"post": {
|
|
90429
|
-
"description": "Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves). Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
|
|
90773
|
+
"description": "Score the model's population again as of today, with the trained model as it is. The current scores stay queryable until the new ones are ready; read the model with getStudioModel to see when (`refresh` goes back to null and `scores.asOf` moves); `expectedMinutes` says how long it is expected to take. Pass `retrain: true` to also train it again on the latest data (the same data points, a fresh report card; if it no longer passes its checks it becomes `refused` and its scores are taken down). A model with a `weekly` or `monthly` schedule is refreshed on its own. 10 credits for refreshed scores, charged once, the same way (a scheduled refresh too). 50 credits for a model that passes its checks, charged once when it has finished: by the first call that reads it or, if nobody does, on its own within about two hours. A model that is refused or fails is free.",
|
|
90430
90774
|
"operationId": "refreshStudioModel",
|
|
90431
90775
|
"parameters": [
|
|
90432
90776
|
{
|
|
@@ -90560,9 +90904,125 @@
|
|
|
90560
90904
|
]
|
|
90561
90905
|
}
|
|
90562
90906
|
},
|
|
90907
|
+
"/v1/studio/queries/{queryId}": {
|
|
90908
|
+
"get": {
|
|
90909
|
+
"description": "What became of a question `runStudioQuery` answered `202` for. `running`: wait `pollAfterSeconds` and fetch again — after a few tries, tell the user it is still running and can be checked later. `succeeded`: the same answer a quick question gets (`columns`, `rows`, `rowCount`, `truncated`, `elapsedMs`), kept for an hour. `failed`: `error` and `code`, as the question itself would have been refused or stopped. `expired`: the answer is no longer kept. Fetching is free. A question that succeeded in the background costs 5 credits once, whether or not its result is fetched: `credits.pending` on the result says what your organization is charged for it. Only the organization that asked can fetch a result.",
|
|
90910
|
+
"operationId": "getStudioQueryResult",
|
|
90911
|
+
"parameters": [
|
|
90912
|
+
{
|
|
90913
|
+
"description": "The `queryId` a `202` from `runStudioQuery` returned.",
|
|
90914
|
+
"in": "path",
|
|
90915
|
+
"name": "queryId",
|
|
90916
|
+
"required": true,
|
|
90917
|
+
"schema": {
|
|
90918
|
+
"description": "The `queryId` a `202` from `runStudioQuery` returned.",
|
|
90919
|
+
"example": "q_3f9a1c0b7d2e4a6f8b1c0d2e",
|
|
90920
|
+
"pattern": "^q_[0-9a-f]{24}$",
|
|
90921
|
+
"type": "string"
|
|
90922
|
+
}
|
|
90923
|
+
}
|
|
90924
|
+
],
|
|
90925
|
+
"responses": {
|
|
90926
|
+
"200": {
|
|
90927
|
+
"content": {
|
|
90928
|
+
"application/json": {
|
|
90929
|
+
"schema": {
|
|
90930
|
+
"$ref": "#/components/schemas/StudioQueryResultState"
|
|
90931
|
+
}
|
|
90932
|
+
}
|
|
90933
|
+
},
|
|
90934
|
+
"description": "The question's state, and its answer once it has one"
|
|
90935
|
+
},
|
|
90936
|
+
"400": {
|
|
90937
|
+
"content": {
|
|
90938
|
+
"application/json": {
|
|
90939
|
+
"schema": {
|
|
90940
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90941
|
+
}
|
|
90942
|
+
}
|
|
90943
|
+
},
|
|
90944
|
+
"description": "The request was refused, and `error` says why: SQL that is not a single read-only SELECT, an unknown table (`details.table`, `details.availableTables`), an unknown column (`details.column`, `details.suggestions`), a function that is not available (`details.function`), or a job that could not run as written (`invalid_job`)."
|
|
90945
|
+
},
|
|
90946
|
+
"401": {
|
|
90947
|
+
"content": {
|
|
90948
|
+
"application/json": {
|
|
90949
|
+
"schema": {
|
|
90950
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90951
|
+
}
|
|
90952
|
+
}
|
|
90953
|
+
},
|
|
90954
|
+
"description": "Authentication required."
|
|
90955
|
+
},
|
|
90956
|
+
"403": {
|
|
90957
|
+
"content": {
|
|
90958
|
+
"application/json": {
|
|
90959
|
+
"schema": {
|
|
90960
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90961
|
+
}
|
|
90962
|
+
}
|
|
90963
|
+
},
|
|
90964
|
+
"description": "`no_organization` — Studio works inside an organization: select one and retry. `studio_not_enabled` — Studio is in a limited preview and is not enabled for this account."
|
|
90965
|
+
},
|
|
90966
|
+
"404": {
|
|
90967
|
+
"content": {
|
|
90968
|
+
"application/json": {
|
|
90969
|
+
"schema": {
|
|
90970
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90971
|
+
}
|
|
90972
|
+
}
|
|
90973
|
+
},
|
|
90974
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
90975
|
+
},
|
|
90976
|
+
"409": {
|
|
90977
|
+
"content": {
|
|
90978
|
+
"application/json": {
|
|
90979
|
+
"schema": {
|
|
90980
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90981
|
+
}
|
|
90982
|
+
}
|
|
90983
|
+
},
|
|
90984
|
+
"description": "`job_exists` — the name is taken; `job_limit_reached` — your organization is at its limit of saved jobs (`details.limit`); `job_running` — another job is running for your organization, retry when it has finished."
|
|
90985
|
+
},
|
|
90986
|
+
"422": {
|
|
90987
|
+
"content": {
|
|
90988
|
+
"application/json": {
|
|
90989
|
+
"schema": {
|
|
90990
|
+
"$ref": "#/components/schemas/StudioError"
|
|
90991
|
+
}
|
|
90992
|
+
}
|
|
90993
|
+
},
|
|
90994
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
90995
|
+
},
|
|
90996
|
+
"429": {
|
|
90997
|
+
"content": {
|
|
90998
|
+
"application/json": {
|
|
90999
|
+
"schema": {
|
|
91000
|
+
"$ref": "#/components/schemas/StudioError"
|
|
91001
|
+
}
|
|
91002
|
+
}
|
|
91003
|
+
},
|
|
91004
|
+
"description": "`rate_limited` — too many requests from your organization in the last minute; or `busy` — every slot is taken right now. Wait `details.retryAfterSeconds` (also sent as `Retry-After`)."
|
|
91005
|
+
},
|
|
91006
|
+
"503": {
|
|
91007
|
+
"content": {
|
|
91008
|
+
"application/json": {
|
|
91009
|
+
"schema": {
|
|
91010
|
+
"$ref": "#/components/schemas/StudioError"
|
|
91011
|
+
}
|
|
91012
|
+
}
|
|
91013
|
+
},
|
|
91014
|
+
"description": "`studio_unavailable` — Studio is not available right now."
|
|
91015
|
+
}
|
|
91016
|
+
},
|
|
91017
|
+
"summary": "The result of a question that ran in the background",
|
|
91018
|
+
"tags": [
|
|
91019
|
+
"Studio"
|
|
91020
|
+
]
|
|
91021
|
+
}
|
|
91022
|
+
},
|
|
90563
91023
|
"/v1/studio/query": {
|
|
90564
91024
|
"post": {
|
|
90565
|
-
"description": "Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A question that
|
|
91025
|
+
"description": "Run one read-only SQL SELECT over the tables in the catalog and get the rows back. Use it for questions the list and analytics routes cannot answer in one call: a ranking across every company or agent in a market, a join between loans and sales, a custom roll-up. The data is stored by state: filter by `state` (and a date range) whenever the question allows, and aggregate in SQL instead of fetching rows. `rows` carries up to `limit` rows (default 200, at most 1000); `rowCount` is always the full count and `truncated` says when there are more. A quick question is answered here (`200`). One that is still running after about twelve seconds is NOT stopped: this call answers `202` with `status: \"running\"` and a `queryId`, the question carries on in the background for up to five minutes, and `getStudioQueryResult` returns its answer. A `202` is not a failure — do not ask the question again (that starts a second run) and do not rewrite it; wait `pollAfterSeconds` and fetch the result. One question per organization runs in the background at a time. Only tables in the catalog can be read; nothing can be written. 5 credits per answered question, charged once whether it was answered here or in the background; a refused or failed question is free. `credits` in the answer says what this question was charged and how many credits are left; on `202`, `credits.pending` is what will be charged if the question succeeds.",
|
|
90566
91026
|
"operationId": "runStudioQuery",
|
|
90567
91027
|
"requestBody": {
|
|
90568
91028
|
"content": {
|
|
@@ -90585,6 +91045,16 @@
|
|
|
90585
91045
|
},
|
|
90586
91046
|
"description": "The answer"
|
|
90587
91047
|
},
|
|
91048
|
+
"202": {
|
|
91049
|
+
"content": {
|
|
91050
|
+
"application/json": {
|
|
91051
|
+
"schema": {
|
|
91052
|
+
"$ref": "#/components/schemas/StudioQueryRunning"
|
|
91053
|
+
}
|
|
91054
|
+
}
|
|
91055
|
+
},
|
|
91056
|
+
"description": "Still running in the background: fetch the result with `getStudioQueryResult`"
|
|
91057
|
+
},
|
|
90588
91058
|
"400": {
|
|
90589
91059
|
"content": {
|
|
90590
91060
|
"application/json": {
|
|
@@ -90623,7 +91093,7 @@
|
|
|
90623
91093
|
}
|
|
90624
91094
|
}
|
|
90625
91095
|
},
|
|
90626
|
-
"description": "`job_not_found` — your organization has no job of that name."
|
|
91096
|
+
"description": "`job_not_found` — your organization has no job of that name. `query_not_found` — your organization has no background question of that id."
|
|
90627
91097
|
},
|
|
90628
91098
|
"409": {
|
|
90629
91099
|
"content": {
|
|
@@ -90643,7 +91113,7 @@
|
|
|
90643
91113
|
}
|
|
90644
91114
|
}
|
|
90645
91115
|
},
|
|
90646
|
-
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran
|
|
91116
|
+
"description": "The SQL is valid but asks for more than one answer may cost: `timeout` (it ran for its whole time, in the background included, and was stopped — narrow it by state or date; or it could not carry on in the background because another question of your organization already is), `result_too_large`, `resource_limit`. For a job run, `job_failed`."
|
|
90647
91117
|
},
|
|
90648
91118
|
"429": {
|
|
90649
91119
|
"content": {
|