# create_model (/reference/score/create-scoring-model)



Up to 100 new scoring models per organization per day. Created from labeled records, a scoring model is calibrated from the start; created from its criteria alone, it has no questions until you add your own or [calibrate](/score-model/calibration#calibrate-a-scoring-model) it. See [Creating a scoring model](/score-model#creating-a-scoring-model). To add questions of your own, send `add_questions` ([Changing questions](/score-model#changing-questions)).

## POST https://api.finic.ai/v1/score/models

Creates a scoring model, from either:

- **Its `name` and `criteria` alone.** Returns `201` with its `model_id` at once. It has no questions yet: [add your own](/reference/score/add-questions) to score records right away, each weighed by Finic's estimate, or [calibrate](/reference/score/calibrate) it with labeled records, which has Finic write its questions and fit them to your data.
- **Labeled records in `data`:** past records whose outcomes you know. Returns `202` with its `model_id` and a `job_id`: wait for the [job](/reference/score/get-job-status), about two minutes, then [score records](/reference/score/score). It's calibrated to them from the start. For what to send, see [Labeled records](/score-model#labeled-records).

To try it here, open the playground and pick the **300 sample payments** example: they're synthetic card payments in the same shape as the score example (also as [sample-payments.csv](/examples/sample-payments.csv)). A scoring model built on sample data is only for trying Finic out.

Authorization: `Bearer <API key>` (see [Authentication](/authentication)).

### Request body (multipart/form-data or application/json)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | array of object or string |  | Optional. Labeled records: a JSON array of objects, or CSV text with a header row. Every row needs `is_bad`: `true` when the outcome was bad, `false` when good (also `1`/`0`). At least 100 rows with 20 or more of each outcome; up to 2,000 are used. Row rules are under [Labeled records](/score-model#labeled-records). Without `data`, send `criteria`. |
| `name` | string | yes | Required. A few words for people to recognize the scoring model by, such as "Card-not-present payment fraud". |
| `criteria` | string |  | What the decision is and what a bad outcome (`is_bad`) means, such as "Card-not-present payments. Bad: charged back as fraud within 90 days." Required without `data`: Finic writes its questions with it at the first calibration, and weighs your own questions by it until then. With `data`, optional context. You can change it later with [update_model](/reference/score/update-scoring-model). |
| `add_questions` | array of string |  | Optional. Your own yes/no questions about a record, such as "Was the account opened less than a week before the payment?". Created from labeled records, the scoring model uses the ones that help, alongside Finic's, and the others are listed as not used on its page in the Finic app. Created from criteria alone, they're its only questions until its first calibration, each weighed by Finic's estimate. Up to 20 at a time, and 50 per scoring model. |

Example:

```json
{
  "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."
}
```

### Responses

- **201**: Created from its criteria alone, the scoring model is ready, with no questions but any in `add_questions`.

| Field | Type | Always | Description |
| --- | --- | --- | --- |
| `model_id` | string | yes | The scoring model's id, `scm_…`, for adding questions, calibrating and scoring. |
| `request_id` | string | yes | `req_…`, the same as the `X-Request-Id` header. |

```json
{
  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",
  "request_id": "req_01M4Y7FASG9DB7MMWCS672J0JD"
}
```

- **202**: Created from labeled records, the scoring model is being created.

| Field | Type | Always | Description |
| --- | --- | --- | --- |
| `model_id` | string | yes | The scoring model's id, `scm_…`, for scoring and calibrating. |
| `job_id` | string | yes | The job creating it, `job_…`. |
| `request_id` | string | yes | `req_…`, the same as the `X-Request-Id` header. |

```json
{
  "model_id": "scm_01M4XRC000RT2GZSKYPD8J86G9",
  "job_id": "job_01M4XZXNCRZBPXV30MSF7RN5H3",
  "request_id": "req_01M4Y7FASG9DB7MMWCS672J0JD"
}
```

- **400**: `invalid_request`: `name` is missing, neither `criteria` nor `data` was sent, or the labeled records break a rule. The message says which, for example:
  - `criteria is required to create a scoring model without labeled records: what the decision is and what a bad outcome means. Or send labeled records as data.`
  - `A scoring model needs at least 100 labeled rows; got 64.`
  - `A scoring model needs at least 20 rows with is_bad true and 20 with it false; got 12 and 140.`
  - `Row 12 has no is_bad field. Every row needs is_bad: true when the outcome was bad, false when it was good.`
  - `Row 7: is_bad must be true or false (or 1 or 0); got "maybe".`
  - `data is not valid CSV: record on line 9: wrong number of fields.`

- **401**: `authentication_error`: the API key is missing, unknown, revoked or expired.

- **413**: `request_too_large`: over 2 MB, or the record is too large.

- **429**: `rate_limited`: 100 scoring models created in the last 24 hours, or over the [request rate](/reference#rate-limits).

- **503**: `overloaded`: creating scoring models, or weighing the questions in `add_questions`, isn't available right now. Try again.
