# Variants and logos

URL: https://docs.glossi.io/api/variants

List and create model variants, add them to a project, choose which variant each model wears, render only the ones you want, and set the logo in each decal slot, through the REST API or an agent.

A [variant](https://docs.glossi.io/set-up-the-product/variants.md) is one look of a model: a colorway, a finish, a trim. The REST API and the agent connector use the same services as the app, so a variant created through the API appears on the model page.

> **Team plan.** API and agent access are available on the Team plan.

## Access

REST requests use your workspace API key in `X-API-Key` (see [Get started with the API](https://docs.glossi.io/api/getting-started.md)). Paths below are relative to `https://api.glossi.io/api/v1`. Agent (MCP) tools take the same arguments by name, plus an optional `workspaceId` (see [Connect an agent](https://docs.glossi.io/agents/connect.md)).

Variant and slot IDs are GUIDs and are accepted with or without braces or dashes. Errors use the standard shape, `{ "error": { "code": "...", "message": "..." } }`: `400 VALIDATION_ERROR` for bad input, `404 NOT_FOUND` for a model, project, variant, slot, or decal that does not exist in your workspace. A material or tag that does not exist is a `400`. Creating or copying a variant answers `409 CONFLICT` when the variant or its source changed while it was saving; fetch it again and retry.

| REST                                                                     | MCP tool                      |
| ------------------------------------------------------------------------ | ----------------------------- |
| `GET /models/:modelId/variants`                                          | `list_model_variants`         |
| `POST /models/:modelId/variants`                                         | `create_model_variant`        |
| `POST /models/:modelId/variants/:variantId/preview`                      | `request_variant_preview`     |
| `POST /projects/:projectId/variants`                                     | `add_variants_to_project`     |
| `GET /projects/:projectId/variant-choices`                               | `get_project_variant_choices` |
| `PUT /projects/:projectId/variant-choices/:modelId`                      | `set_project_variant_choice`  |
| `POST /renders` with `settings.variantsToRender`                         | `render` with `variantIds`    |
| `GET /models/:modelId/decal-slots`                                       | `get_decal_slots`             |
| `PUT /models/:modelId/variants/:variantId/decal-slots/:slotId`           | `set_decal_assignment`        |
| `PUT /models/:modelId/variants/:variantId/decal-slots/:slotId/logo-size` | `set_decal_logo_size`         |
| `PUT /models/:modelId/variants/:variantId/number`                        | `set_decal_number`            |
| `PUT /models/:modelId/decal-slots/:slotId/allowed-sizes`                 | `set_decal_slot_sizes`        |
| `POST /models/:modelId/logo-set-match`                                   | `preview_logo_set_on_model`   |
| `POST /models/:modelId/variants/:variantId/logo-set`                     | `apply_logo_set`              |
| `GET /models/:modelId/variants/:variantId/logo-set`                      | `get_variant_logo_set`        |

## List a model's variants

```bash
curl 'https://api.glossi.io/api/v1/models/MODEL_ID/variants?limit=50' \
  -H "X-API-Key: $GLOSSI_API_KEY"
```

| Query     | Default |                                                                                    |
| --------- | ------- | ---------------------------------------------------------------------------------- |
| `limit`   | `50`    | 1 to 100.                                                                          |
| `after`   |         | `nextCursor` from the previous page.                                               |
| `search`  |         | Matches the variant's name, tags, and property values. Up to 200 characters.       |
| `purpose` |         | `PREPARED_STYLE`, `STANDARD_COLORWAY` or `TEAM_DESIGN`: only that kind of variant. |

```json
{
  "materialSlots": ["Body", "Trim"],
  "variants": [
    {
      "id": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f",
      "modelId": "MODEL_ID",
      "name": "Home Red",
      "source": "web",
      "purpose": null,
      "sourceVariantId": null,
      "sourceVariantName": null,
      "styleVariantId": null,
      "styleVariantName": null,
      "materialAssignments": [{ "groupName": "Body", "materialId": "MATERIAL_ID" }],
      "tags": [],
      "previewStatus": "READY",
      "createdAt": "2026-09-29T10:12:00.000Z",
      "updatedAt": "2026-09-29T10:12:00.000Z"
    }
  ],
  "total": 1,
  "hasMore": false,
  "nextCursor": null
}
```

`materialSlots` lists the model's material slots: the names a new variant can assign a material to. It is empty for a model processed before slots were recorded.

`source` is `web` for variants defined on the model page or through the API, and `studio` for variants made in the Studio, which are edited there. A `studio` variant's `materialAssignments` is empty; its materials live in the Studio.

`purpose` places a variant in a catalogue of styles, colorways and team designs, and is `null` for an ordinary variant. `sourceVariantId` and `sourceVariantName` name the variant it was copied from, and `styleVariantId` and `styleVariantName` the style it descends from. Both are fixed when the variant is created.

`previewStatus` is where the variant's 3D preview stands. See [Variant previews](https://docs.glossi.io/api/variants.md#variant-previews).

## Create a variant

A variant is a name plus which library material each of the model's material slots wears. `groupName` is one of the model's `materialSlots`. When the model has slots listed, a name that is not one of them is refused, and a name that differs only in letter case is saved in the listed spelling.

```bash
curl -X POST 'https://api.glossi.io/api/v1/models/MODEL_ID/variants' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Home Red",
    "materialAssignments": [
      { "groupName": "Body", "materialId": "MATERIAL_ID" },
      { "groupName": "Trim", "materialId": "OTHER_MATERIAL_ID" }
    ]
  }'
```

| Field                    | Required       |                                                                                                                                                                                             |
| ------------------------ | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                   | yes            | Up to 80 characters.                                                                                                                                                                        |
| `materialAssignments`    | unless copying | One entry per slot to set, up to 200. Slots you leave out keep the model's own material.                                                                                                    |
| `copyFromVariantId`      | no             | Start from what another variant of the same model wears, and its logos. `materialAssignments` override those slots.                                                                         |
| `replaceCopyAssignments` | no             | With `copyFromVariantId`, `materialAssignments` is the complete list: slots it leaves out go back to the model's own material instead of keeping the source's. Needs `materialAssignments`. |
| `purpose`                | no             | `PREPARED_STYLE`, `STANDARD_COLORWAY` or `TEAM_DESIGN`. A team design is copied from a `STANDARD_COLORWAY` and wears its materials.                                                         |
| `tagIds`                 | no             | Workspace tag IDs, up to 50.                                                                                                                                                                |

### Tiling, fur and tint

An assignment can also set values on top of its material, so the variant looks the way it was tuned in the Studio. Each entry in `parameters` names a material value and gives a number (`value`) or a color (`hex`):

```json
{
  "groupName": "Suede overlays",
  "materialId": "MATERIAL_ID",
  "parameters": [
    { "name": "UvScale", "value": 6 },
    { "name": "FurLength", "value": 0.4 },
    { "name": "BaseColor", "hex": "#6B4A2E" }
  ]
}
```

`UvScale` is how many times the texture repeats across the part, and `UvRotation` turns it. `FurLength`, `FurThickness`, `FurSheen`, `FurFineness`, `FurTipHighlight` and `FurDepth` make napped fabrics like suede read as fabric. `BaseColor` tints the material's texture. `Roughness`, `Metallic`, `Specular`, `Opacity`, `NormalStrength` and the clear coat and sheen values work the same way. A name that can't be set this way is refused, and the error lists the ones that can. Leave `parameters` out and the slot wears its material's own values.

The response is the new variant, `201`. A new variant starts with the base variant's logos in every decal slot, or the source variant's when you copy. Its 3D preview starts building straight away, so `previewStatus` is usually `PENDING`.

A copy keeps everything else about its source's look too, including finishes and colors adjusted in the Studio, and only the slots you list change. Until the copy is opened in the Studio, it picks up later Studio changes to its source. Changing a variant's materials later changes only the slots you change; slots adjusted in the Studio keep their adjustments.

## Variant previews

A variant created or changed through the API or on the model page gets a 3D preview of its own, built on a render server from its materials and logos. Creating a variant, changing its `materialAssignments`, and setting, sizing or clearing one of its logos each start a new preview. Changes made within a few seconds of each other share one build. Studio variants get their preview when you leave the Studio.

| `previewStatus` |                                                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------------- |
| `PENDING`       | Being built. Usually a few minutes; poll the variants list until it changes.                               |
| `READY`         | The preview matches the variant.                                                                           |
| `FAILED`        | The last build failed. Request it again.                                                                   |
| `NEEDS_PROJECT` | The model is in no project yet, so it cannot be loaded. Open it in the Studio once, then request it again. |
| `NONE`          | No preview yet, for example a variant made before previews were automatic.                                 |

### Request a preview

```bash
curl -X POST 'https://api.glossi.io/api/v1/models/MODEL_ID/variants/VARIANT_ID/preview' \
  -H "X-API-Key: $GLOSSI_API_KEY"
```

Builds the variant's preview again: to retry a `FAILED` one, or to make one for a variant from before previews were automatic. The response is `202` while it builds and `200` when it cannot start:

```json
{ "modelId": "MODEL_ID", "variantId": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f", "previewStatus": "PENDING" }
```

`previewStatus` is `PENDING`, or `NEEDS_PROJECT` when the model is in no project. A Studio variant is a `400`: its preview is made when you leave the Studio.

## Add variants to a project

A project keeps a list of the variants it works with. A project with no list works with every variant of its model, so adding the first one narrows the project to the variants listed.

```bash
curl -X POST 'https://api.glossi.io/api/v1/projects/PROJECT_ID/variants' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "variantIds": ["8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f"] }'
```

Up to 50 per request. Each variant must belong to a model already in the project. Adding one that is already there changes nothing. The response lists every variant the project now has.

## Choose the variant a model wears

A project can hold several models. Each one wears a variant, and the choice belongs to the project: the same model can wear a different variant in another project.

```bash
curl -X PUT 'https://api.glossi.io/api/v1/projects/PROJECT_ID/variant-choices/MODEL_ID' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "variantId": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f" }'
```

`MODEL_ID` must be a model in the project, and `variantId` one of that model's variants. Send `null`, or the model's `baseVariantId`, to clear the choice. Setting the same choice again changes nothing. If the project keeps a list of that model's variants, the chosen variant is added to it.

The response, and `GET /projects/PROJECT_ID/variant-choices`, list every model in the project in order:

```json
{
  "projectId": "PROJECT_ID",
  "choices": [
    { "modelId": "FIRST_MODEL_ID", "variantId": null },
    { "modelId": "MODEL_ID", "variantId": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f" }
  ]
}
```

`variantId` is `null` for a model with no choice. Removing a model from the project, or deleting the variant, clears its choice.

Use this for what a model wears while the project renders. To render several variants of the project's first model in one request, use `variantsToRender` below.

## Render only some variants

`POST /renders` renders every variant the project works with. Narrow it with `settings.variantsToRender`, up to 50:

```bash
curl -X POST 'https://api.glossi.io/api/v1/renders' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "projectIds": ["PROJECT_ID"],
    "settings": { "variantsToRender": ["8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f"] }
  }'
```

Every ID must be a variant each listed project can render, otherwise the request fails with a `400` naming the IDs and nothing starts. Add the variant to the project first. Only variants of a project's first model can be rendered. The MCP `render` tool takes the same list as `variantIds`.

## Decal slots

A decal slot is a place on the model that takes a logo: a chest, a sleeve, a back number. Slots are created in the [Studio](https://docs.glossi.io/set-up-the-product/decal-slots.md). Which logo sits in a slot is set per variant, from the [decal library](https://docs.glossi.io/api/library-import.md).

### List slots and logos

```bash
curl 'https://api.glossi.io/api/v1/models/MODEL_ID/decal-slots' \
  -H "X-API-Key: $GLOSSI_API_KEY"
```

```json
{
  "modelId": "MODEL_ID",
  "baseVariantId": "11111111-1111-4111-8111-111111111111",
  "slots": [{ "slotId": "22222222-2222-4222-8222-222222222222", "name": "Chest", "widthCm": 10, "heightCm": 8 }],
  "assignments": [
    {
      "variantId": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f",
      "slotId": "22222222-2222-4222-8222-222222222222",
      "decalId": "DECAL_ID",
      "imageKey": "workspaces/.../DECALS/DECAL_ID/source.png",
      "width": 800,
      "height": 600,
      "logoWidthCm": null,
      "logoHeightCm": null,
      "decorationMethod": "Screen print"
    }
  ]
}
```

`baseVariantId` is the model's original look. It is `null` for a model that has never been opened in the Studio.

### Set or clear a logo

```bash
curl -X PUT 'https://api.glossi.io/api/v1/models/MODEL_ID/variants/VARIANT_ID/decal-slots/SLOT_ID' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "decalId": "DECAL_ID" }'
```

`decalId` is a decal from your library whose upload is confirmed (`READY`). Send `null` to clear the slot. `VARIANT_ID` is a variant of the model or its `baseVariantId`. A variant shows at most 6 logos. Putting a logo in an empty slot of a variant that already has 6 answers `409 DECAL_LOGO_LIMIT` (over MCP, the error starts with `DECAL_LOGO_LIMIT:`); clear another slot first. Replacing a logo in a filled slot and clearing are always allowed.

```json
{
  "cleared": false,
  "assignment": {
    "variantId": "8f0c2d1e-5b7a-4c3e-9f21-0a6b3c4d5e6f",
    "slotId": "22222222-2222-4222-8222-222222222222",
    "decalId": "DECAL_ID",
    "imageKey": "workspaces/.../DECALS/DECAL_ID/source.png",
    "width": 800,
    "height": 600,
    "logoWidthCm": null,
    "logoHeightCm": null,
    "decorationMethod": null
  }
}
```

### Size a logo

By default a logo is fitted to its slot. To print it at a set size on one variant, give the full artwork canvas in centimeters, transparent padding included:

```bash
curl -X PUT 'https://api.glossi.io/api/v1/models/MODEL_ID/variants/VARIANT_ID/decal-slots/SLOT_ID/logo-size' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "logoWidthCm": 8, "logoHeightCm": 6 }'
```

Both sides must keep the artwork's proportions and fit inside the slot. Send both as `null` to go back to fitting the slot. The size belongs to that variant and slot only, and swapping the logo keeps its width while following the new artwork's proportions. The response is the assignment with its `logoWidthCm` and `logoHeightCm`.

When the slot offers a [short list of sizes](https://docs.glossi.io/api/variants.md#offer-a-short-list-of-sizes), `logoHeightCm` must be one of them. Any other height is refused with `400 SIZE_NOT_OFFERED`; the message names the heights the slot offers and `allowedHeightsCm` lists them:

```json
{
  "error": {
    "code": "SIZE_NOT_OFFERED",
    "message": "This placement offers only these logo heights: 6 cm, 8.89 cm",
    "allowedHeightsCm": [6, 8.89]
  }
}
```

MCP `set_decal_logo_size` fails with `SIZE_NOT_OFFERED: ` and the same message. A logo fitted to the slot (both `null`) is not governed by the list. A logo put in a slot that held a number fits the slot; it does not take the number's size.

### Put a number in a slot

A slot can hold a number, such as a jersey number, drawn in a font from your workspace font library:

```bash
curl -X PUT 'https://api.glossi.io/api/v1/models/MODEL_ID/variants/VARIANT_ID/number' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "placement": "Back Number",
    "number": "23",
    "style": { "fontId": "FONT_ID", "fill": "#FFFFFF", "stroke": { "color": "#C2002B", "width": 0.05 } },
    "heightCm": 25.4
  }'
```

| Field       |                                                                                                                                                                                                                                                  |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `slotId`    | The slot, from the slot list. Or name it with `placement`.                                                                                                                                                                                       |
| `placement` | The slot's name, matched ignoring case, spacing and punctuation. Slots without a name are never matched.                                                                                                                                         |
| `number`    | A string of up to three digits, `"0"` to `"999"`. `"00"` is its own number. `"07"`, `"007"` and four digits are refused. `null` removes a number from the slot and leaves a logo alone.                                                          |
| `style`     | `fontId` (a ready font), `fill`, and optional `stroke`. A color is a hex such as `#FFFFFF` or a color id from your workspace colors.                                                                                                             |
| `stroke`    | `{ color, width }`: one outline. `width` is its thickness as a share of the digit height, above 0 and at most 0.25.                                                                                                                              |
| `heightCm`  | Optional. The height of the whole number image in centimeters, outline and a thin margin included. It is **not** the height of the digits. It must fit the slot and be on the slot's list of sizes when it has one, else `400 SIZE_NOT_OFFERED`. |

**`heightCm` is the image height, not the digit height.** The digits are the image height divided by `1.02 + 2 × outline width`: about 98% of it with no outline, 89% with an outline of `0.05`, 82% with `0.1`. For digits 20 cm tall with an outline of `0.05`, send `heightCm: 22.4`.

Every one- and two-digit number in one style comes out the same image size, so they print at the same height, centered. A three-digit number has the same digit height on a wider image: with `heightCm` it is that much wider, and without it the number is scaled down to fit the slot's width. A number counts toward the 6 logos a variant shows: a number in an empty slot of a full variant answers `409 DECAL_LOGO_LIMIT`. Sending the same number and style again changes nothing.

Without `heightCm`:

* If the slot already holds a number with a size, the new number keeps that **height**. Its width follows the new image, which changes when the font or outline changes. If that height no longer fits the slot the call is refused with `400 VALIDATION_ERROR`, and if it is no longer on the slot's list of sizes with `400 SIZE_NOT_OFFERED`; send `heightCm` to choose a size.
* If the slot holds a logo, or a number with no size, or nothing, the number fits the slot, which the slot's list of sizes does not govern. A logo's size is never carried over to a number.

The response names the slot and returns its assignment. A slot holding a number has `decalId` starting with `number:` and a `number` field with what was drawn:

```json
{
  "slot": { "slotId": "44444444-4444-4444-8444-444444444444", "name": "Back Number" },
  "cleared": false,
  "assignment": {
    "decalId": "number:5d41402abc4b2a76b9719d911017c592",
    "width": 1210,
    "height": 1024,
    "logoWidthCm": 30.01,
    "logoHeightCm": 25.4,
    "number": {
      "text": "23",
      "fontId": "FONT_ID",
      "fill": { "hex": "#FFFFFF", "colorId": null, "name": null, "pantoneCode": null },
      "stroke": { "hex": "#C2002B", "colorId": null, "name": null, "pantoneCode": null, "width": 0.05 },
      "rendererVersion": 1
    }
  }
}
```

A number is not a library logo: it does not appear in the decal library and cannot be put in another slot by its `decalId`. Applying a logo set leaves numbers in place, even with `clearUnmentioned`, and lists them as `numberSlots`; a set row for the number's placement puts its logo there instead, with a `REPLACES_NUMBER` warning. Clearing the slot with the logo call above also removes a number.

### Offer a short list of sizes

A slot can offer a list of logo heights instead of any size that fits. Heights are in centimeters, at most 20, each no taller than the slot; an empty list removes the limit:

```bash
curl -X PUT 'https://api.glossi.io/api/v1/models/MODEL_ID/decal-slots/SLOT_ID/allowed-sizes' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "heightsCm": [8.89, 10.16] }'
```

The slot list returns each slot's `allowedHeightsCm`. The list governs every size you set, not only logo sets:

* Applying a logo set refuses a row whose height is not on the list, naming the heights the slot offers.
* Sizing a logo or a number by hand refuses a height not on the list with `400 SIZE_NOT_OFFERED`.
* A logo or number fitted to the slot (no size) is not governed by the list.
* A size carried onto new artwork (a logo swap or a new logo version) that lands off the list falls back to fitting the slot.
* Sizes already saved are not checked again when the list is set or shortened.

A height matches a listed one when it is within 0.005 cm, so a height converted from inches and rounded to 0.01 cm either way still matches (2.75 in is 6.985 cm: 6.98 and 6.99 both match). Heights are stored to 0.0001 cm, and a listed height sent back exactly as `allowedHeightsCm` or an error message shows it always matches. Setting the list again replaces it.

### Put a logo set on a variant

A logo set lists a customer's logos by placement. Name each slot for its placement ("Left Chest") and a set can be put on a variant in one call: each row's logo goes in the slot with that name (case, spacing and punctuation ignored), at the row's height.

Preview first. Nothing is written:

```bash
curl -X POST 'https://api.glossi.io/api/v1/models/MODEL_ID/logo-set-match' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "logoSetId": "LOGO_SET_ID", "variantId": "VARIANT_ID" }'
```

Each row comes back with its slot, its print size, and any `problems`: no slot with that name, a logo that is not ready or belongs to another customer, a size larger than the slot or not one it offers. Two rows naming the same placement is a problem on the whole set. `canApply` says whether applying would go through.

Then apply:

```bash
curl -X POST 'https://api.glossi.io/api/v1/models/MODEL_ID/variants/VARIANT_ID/logo-set' \
  -H "X-API-Key: $GLOSSI_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{ "logoSetId": "LOGO_SET_ID" }'
```

Name each slot in the Studio: an unnamed slot is never matched. A variant shows at most 6 logos, so a set that would take it past 6 (counting the logos in slots the set does not name, unless you clear them) is refused before anything changes with `409 DECAL_LOGO_LIMIT`; send `"clearUnmentioned": true` to the preview to check the count with those slots cleared. A production order's own copy of a variant cannot take a set. Any problem refuses the whole apply. Rows whose placement the model has no slot for also refuse it, unless you send `"applyMatchedOnly": true`. Slots the set does not name keep their logos unless you send `"clearUnmentioned": true`. Color changes on a row are not shown on the model yet; those rows come back in `warnings`. If a write fails part way, the answer is `409 PARTIALLY_APPLIED` with the rows already `written` and the row that `failed` (its message, and a `code` such as `SIZE_NOT_OFFERED` when the cause has one). The message says whether something must be fixed first; otherwise sending the same request again finishes the rest.

`GET /models/MODEL_ID/variants/VARIANT_ID/logo-set` returns the set the variant wears, when it was applied, whether it was a draft then, and `outOfDate` with `reasons` when the set, a logo's version, or a slot has changed since.

## A variant from start to finish

1. `GET /models/:modelId/decal-slots` to learn the slots.
2. `POST /models/:modelId/variants` with `copyFromVariantId` to start from an existing look.
3. `PUT /models/:modelId/variants/:variantId/decal-slots/:slotId` to swap a logo.
4. `POST /projects/:projectId/variants`, then `POST /renders` with `variantsToRender` to render it.
   For a second or third model in the project, `PUT /projects/:projectId/variant-choices/:modelId` sets the variant it wears in those renders.