# Add Model

> 📘 [Click for Python SDK](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.NucleusClient.create_model)
>
> ```
> Dataset.create_model(
>     name: str,
>     reference_id: str,
>     metadata: dict
> ) -> Model
> ```

This endpoint creates a `Model` object inside Nucleus, whose predictions can be associated with various `Datasets`.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Nucleus API",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://api.scale.com/v1/nucleus"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/models/add": {
      "post": {
        "summary": "Add Model",
        "description": "",
        "operationId": "add-model",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "reference_id"
                ],
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "A human-readable name for the Model. This will be displayed in the dashboard."
                  },
                  "reference_id": {
                    "type": "string",
                    "description": "A user-specified identifier to reference this given Models. Must be unique across all Models."
                  },
                  "metadata": {
                    "type": "string",
                    "description": "A metadata blob for the Model. Only supporting one level JSONs",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"model_id\": \"prj_bw1twwkfw7e15wfnz5tg\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "model_id": {
                      "type": "string",
                      "example": "prj_bw1twwkfw7e15wfnz5tg"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "60a66ff6bfbc7000736519dd:61a6d808e39b3f0245282827"
}
```