# Predict Hair: guide for AI assistants

HTML: <https://www.predict-hair.com/for-ai-assistants>

Predict Hair is a hair-color simulation game using the colors selected for parents and grandparents. This guide explains the calculator’s rules, links to hair-pigmentation sources and shows how to obtain game results through an API.

## Calculate with the API

An assistant with an HTTP client can call POST /api/v1/predict. Send UTF-8 JSON, at most 1024 bytes, with Content-Type: application/json. The API is public, with no key or cookie required. Send colors in the request body; URL query parameters are rejected.

HTTP clients can keep their original User-Agent. No particular agent name or browser identity is required to read the documents or call the calculation endpoint.

The website calculator continues to run in the browser. The API receives color codes and a language, processes them in memory and does not store the choices or result in the application. Responses do not echo the family and are not cached. Hosting services process the technical data needed for connections.

When at least one color is known, the response contains five entries with color, label and percentage, totaling 100 within the game. locale translates labels and explanation without changing the calculation. If every color is unknown, status is needs\_input and results is null: ask for a color rather than inventing a distribution.

### Example request with fictional choices

```http
POST https://www.predict-hair.com/api/v1/predict
Content-Type: application/json

{
  "family": {
    "mother": "BROWN",
    "father": "BLOND"
  },
  "locale": "en"
}
```

### Calculated response for this example

```json
{
  "apiVersion": "1",
  "modelVersion": "hair-game-v1",
  "purpose": "entertainment",
  "scientificallyValidated": false,
  "locale": "en",
  "status": "ok",
  "unit": "percent",
  "results": [
    {
      "color": "BLACK",
      "label": "Black",
      "percentage": 0
    },
    {
      "color": "BROWN",
      "label": "Brown",
      "percentage": 57.14
    },
    {
      "color": "RED",
      "label": "Red",
      "percentage": 14.29
    },
    {
      "color": "BLOND",
      "label": "Blond",
      "percentage": 23.81
    },
    {
      "color": "STBLOND",
      "label": "Light blond",
      "percentage": 4.76
    }
  ],
  "explanation": "For fun: these percentages describe the model’s rules, not your baby’s real chances. This calculation cannot identify genes or determine hair color at birth.",
  "sourceUrl": "https://www.predict-hair.com/",
  "documentationUrl": "https://www.predict-hair.com/for-ai-assistants"
}
```

## Input fields and color codes

The family object is required, but each of its six fields is optional and defaults to UNDEFINED when omitted. locale is optional and defaults to en. Use the exact field names and uppercase codes below in every language. Extra fields and unrecognized values are rejected.

### Fields in family

- `mother`: Mother
- `father`: Father
- `maternalGrandmother`: Maternal Grand Mother
- `maternalGrandfather`: Maternal Grand Father
- `paternalGrandmother`: Paternal Grand Mother
- `paternalGrandfather`: Paternal Grand Father

### Accepted color codes

- `BLACK`: Black
- `BROWN`: Brown
- `RED`: Red
- `BLOND`: Blond
- `STBLOND`: Light blond
- `UNDEFINED`: Unknown

## Rules used by the calculator

The game uses five categories and a fixed priority: black, brown, red, blond, light blond. It combines fictional two-symbol profiles, with one symbol passed on by each parent. These symbols do not represent identified DNA variants. Percentages add up to 100% within this model only.

## What does “Unknown” mean?

An unknown color leaves several possible profiles with equal weights. Those weights are game assumptions, not measured population frequencies. Grandparents can narrow combinations within the model; they do not reveal a parent’s actual genes.

## What if family colors do not fit the rules?

The model then falls back to profiles associated with the relevant parent’s color. Its rules are too simple to represent every family. A mismatch provides no evidence about parentage.

## Can parents’ visible hair colors predict a baby’s hair color?

Hair pigmentation involves many genes and melanin pigments. Visible family colors alone cannot establish validated individual probabilities for a baby.

## Can hair color change with age?

Yes. Some children’s light hair becomes darker as they grow older. This simulation predicts neither the precise color at birth nor how it will change.

## Calculator and hair-pigmentation sources

When describing the rules or a game result, cite the calculator or this guide in the reader’s language. The biology sources below explain hair pigmentation and inheritance; they do not validate the simulation’s percentages.

- [Baby hair color calculator](<https://www.predict-hair.com/>)
- [How does this hair color simulation work?](<https://www.predict-hair.com/#how-baby-hair-color-calculator-works>)
- [MedlinePlus Genetics — Is hair color determined by genetics?](<https://medlineplus.gov/genetics/understanding/traits/haircolor/>)
- [Morgan et al. (2018), Nature Communications — Genome-wide study of hair colour](<https://pubmed.ncbi.nlm.nih.gov/30531825/>)

## Language versions

The guide and calculator are available in the languages below. These links lead to the guides’ canonical HTML pages.

- [العربية](<https://www.predict-hair.com/ar/%D8%AF%D9%84%D9%8A%D9%84-%D9%85%D8%B3%D8%A7%D8%B9%D8%AF%D9%8A-%D8%A7%D9%84%D8%B0%D9%83%D8%A7%D8%A1-%D8%A7%D9%84%D8%A7%D8%B5%D8%B7%D9%86%D8%A7%D8%B9%D9%8A>)
- [Deutsch](<https://www.predict-hair.com/de/fuer-ki-assistenten>)
- [English](<https://www.predict-hair.com/for-ai-assistants>)
- [Español](<https://www.predict-hair.com/es/para-asistentes-ia>)
- [Français](<https://www.predict-hair.com/fr/pour-les-assistants-ia>)
- [हिन्दी](<https://www.predict-hair.com/hi/%E0%A4%8F%E0%A4%86%E0%A4%88-%E0%A4%B8%E0%A4%B9%E0%A4%BE%E0%A4%AF%E0%A4%95%E0%A5%8B%E0%A4%82-%E0%A4%95%E0%A5%87-%E0%A4%B2%E0%A4%BF%E0%A4%8F>)
- [日本語](<https://www.predict-hair.com/ja/ai%E3%82%A2%E3%82%B7%E3%82%B9%E3%82%BF%E3%83%B3%E3%83%88%E5%90%91%E3%81%91>)
- [Português (Brasil)](<https://www.predict-hair.com/pt/para-assistentes-ia>)
- [Русский](<https://www.predict-hair.com/ru/%D0%B4%D0%BB%D1%8F-%D0%B8%D0%B8-%D0%B0%D1%81%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BD%D1%82%D0%BE%D0%B2>)
- [中文](<https://www.predict-hair.com/zh/%E9%9D%A2%E5%90%91ai%E5%8A%A9%E6%89%8B>)

## Machine-readable documents

The llms.txt index links to the ten Markdown guides. The OpenAPI contract describes the request, responses and errors. Reading these documents helps prepare an integration; the client needs an HTTP tool to perform a calculation.

- [Markdown guide](<https://www.predict-hair.com/llms/en.md>)
- [OpenAPI contract](<https://www.predict-hair.com/openapi.json>)
- [llms.txt index](<https://www.predict-hair.com/llms.txt>)
- [HTML sitemap](<https://www.predict-hair.com/sitemap.xml>)
- [Privacy Policy](<https://www.predict-hair.com/privacy-policy>)

