> 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/v1/docti/use-cases-docti/nutrition-facts-label.md).

# Nutrition facts Label

This section describes how to build your custom OCR API to extract data from Nutrition Facts Label using the API Builder. A Nutrition Facts Label lists the nutritional content, the serving size, and the calories for a recommended serving of a food product

## Prerequisites

You’ll need at least one Nutrition Facts Label image or pdf to test your model once created.

## Define Your Nutrition Fact Label Use Case

Using the [Nutrition Fact Label](https://files.readme.io/5e34b1a-capture-decran-2021-01-21-a-110415.png) below, we’re going to define the fields we want to extract from it.

<figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-197438956de4e55894b8d04a50a657b6f7268d1d%2F5e34b1a-capture-decran-2021-01-21-a-110415.png?alt=media" alt="Nutrition Fact Label"><figcaption></figcaption></figure>

* **Serving Size Gram**
* **Total Fat Gram**
* **Total Fat Daily Value**
* **Calories Per Serving**
* **Total Carbohydrate Gram**
* **Nutrients:**
  * Name
  * Weight
  * Daily value

That’s it for this example. Feel free to add any other relevant data that fits your requirement.

## Deploy your API

Once you have defined the list of fields you want to extract from your Nutrition Facts Label, head over to the platform and follow these steps:

1. Log into your [Mindee account](https://platform.mindee.com/login). You'll land on the My APIs page.
2. Click the docTI tab.
3. Click the **Create a new API** button.

<figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-99e42a12ffdb780749793864cefa06c7684dd2d0%2F2f4584f-Untitled_7.png?alt=media" alt=""><figcaption></figcaption></figure>

On the\*\* Set up your API\*\* section, fill in the required information. Give the API a name, a description (optional), and a cover image(optional) and click on **Next**.

<figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-f0485a1c378bb9661fbea7f6e27c6b076157a7ea%2F0812e6a-ScreenShot_Tool_-20240311112648.png?alt=media" alt=""><figcaption></figcaption></figure>

## Define Your Model

Click on the different fields to add them to your list

Using the interface, you can manually add each field for the data you are extracting. For this example, here are the different field configurations used:

| Field Name              | Field Type     | Example   |
| ----------------------- | -------------- | --------- |
| Serving Size Gram       | Number         | 210       |
| Total Fat Gram          | Number         | 6         |
| Total Fat Daily Value   | Number         | 3         |
| Calories Per Serving    | Number         | 150       |
| Total Carbohydrate Gram | Number         | 32        |
| Nutrients               | Object \[List] |           |
| Nutrients - Name        | String         | Vitamin D |
| Nutrients - Weight      | String         | 3 mcg     |
| Nutrients - Daily Value | String         | 10%       |

<figure><img src="https://126655343-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2al1MDqAP9Dg9iDRjkWg%2Fuploads%2Fgit-blob-73b10e90639bdda902b03b9e6bf7a70200a5bd87%2Fc657fcc-ScreenShot_Tool_-20240311113217.png?alt=media" alt=""><figcaption></figcaption></figure>

Once you’re done setting up your data model, click the **Create API** button at the bottom of the screen.

You are now ready to test your API on the live interface.


---

# 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/v1/docti/use-cases-docti/nutrition-facts-label.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.
