> For the complete documentation index, see [llms.txt](https://docs.mindee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mindee.com/getting-started/defining-a-model.md).

# Defining a Model

Build your model from a prebuilt template or create one from scratch using a sample document.

## From a Model Template

Chances are, there is already a model template that at least partly fits your needs.

Click on Catalog to check the model templates, and when clicking on one of them, you'll create a new model based on the template.

You now have your own model, you can start testing it immediately.

If you need to make adjustments, use the "Data Schema" tab as explained in more detail in: [Models Overview](/models/models-overview.md#modifying-your-data-schema).

For instance, here is a demo of how to create a model from the Invoice model template:

{% @supademo/embed url="<https://app.supademo.com/demo/cmieehzyjar67b7b4lf5tgvrb>" demoId="cmieehzyjar67b7b4lf5tgvrb" %}

## From Scratch

If you don't find something that matches your needs in the catalog, you also have the possibility to click on **Create Custom Model.**\
\
You'll have two possibilities :

* upload a sample document
* write the document type

Our AI Agent will then create a custom model for you.\
\
You now have a model with a **custom** schema that you can modify, using the "Data Schema" tab as explained in more detail in: [Models Overview](/models/models-overview.md#modifying-your-data-schema).\
\
Here is a tutorial that shows how to create a custom model by filling in the document type and by uploading a sample doc.

{% @supademo/embed url="<https://app.supademo.com/demo/cmiem2hsob2x5b7b4ye1il6a8>" demoId="cmiem2hsob2x5b7b4ye1il6a8" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mindee.com/getting-started/defining-a-model.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
