# Glyph (`glyph-1`): Emoji suggestions

The right emoji for a message, out of 1,800.

Glyph suggests emoji that match a message, a channel name or a reaction. It searches every standard emoji (smileys, people, animals, food, travel, objects, symbols) by meaning, not by keyword, so a message doesn't need to name the thing to find it.

- **Price:** $0.01 per 1,000 texts. One unit per text.
- **Languages:** ~100 languages
- **Input:** A short text (string or array of up to 64). The first 1,000 characters are read.
- **Batch:** yes, up to 64 inputs per call
- **Status:** live
- **Built on:** [intfloat/multilingual-e5-small + Emojibase](https://emojibase.dev), MIT, 118M

## Request

```bash
curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glyph-1","input":"we finally shipped the new release"}'
```

## Options

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `input` | string or string[] | yes | | A short text (string or array of up to 64). The first 1,000 characters are read. |
| `top_k` | integer | no | `5` | How many emoji to return. |

## Output

| Field | Type | Description |
|---|---|---|
| `emojis` | object[] | `emoji`, `name`, `score`, best first. |

The response envelope is always `{"id", "object": "run", "model", "created", "output", "usage": {"units", "unit", "cost_usd", "cost_micros"}, "latency_ms"}`. With an array input, `output` is an array in the same order.

## Examples (real outputs from our servers)

### Shipped

```json
{
  "model": "glyph-1",
  "input": "we finally shipped the new release"
}
```

```json
{
  "emojis": [
    {
      "emoji": "📦",
      "name": "package",
      "score": 0.8204
    },
    {
      "emoji": "📒",
      "name": "ledger",
      "score": 0.8192
    },
    {
      "emoji": "🆕",
      "name": "NEW button",
      "score": 0.8156
    },
    {
      "emoji": "🚈",
      "name": "light rail",
      "score": 0.8137
    },
    {
      "emoji": "ℹ️",
      "name": "information",
      "score": 0.8124
    }
  ]
}
```

22 ms, $0.00001.

### Coffee

```json
{
  "model": "glyph-1",
  "input": "need coffee before this meeting",
  "top_k": 3
}
```

```json
{
  "emojis": [
    {
      "emoji": "☕",
      "name": "hot beverage",
      "score": 0.834
    },
    {
      "emoji": "🤝",
      "name": "handshake",
      "score": 0.8268
    },
    {
      "emoji": "🍵",
      "name": "teacup without handle",
      "score": 0.8253
    }
  ]
}
```

18 ms, $0.00001.

### Batch

```json
{
  "model": "glyph-1",
  "input": [
    "happy birthday!",
    "the build is broken again",
    "pizza party friday"
  ],
  "top_k": 3
}
```

```json
[
  {
    "emojis": [
      {
        "emoji": "🎈",
        "name": "balloon",
        "score": 0.8613
      },
      {
        "emoji": "🎀",
        "name": "ribbon",
        "score": 0.8529
      },
      {
        "emoji": "🎂",
        "name": "birthday cake",
        "score": 0.8457
      }
    ]
  },
  {
    "emojis": [
      {
        "emoji": "🚧",
        "name": "construction",
        "score": 0.8345
      },
      {
        "emoji": "🏭",
        "name": "factory",
        "score": 0.8267
      },
      {
        "emoji": "🔨",
        "name": "hammer",
        "score": 0.8255
      }
    ]
  },
  {
    "emojis": [
      {
        "emoji": "🍕",
        "name": "pizza",
        "score": 0.8396
      },
      {
        "emoji": "🍤",
        "name": "fried shrimp",
        "score": 0.812
      },
      {
        "emoji": "🍥",
        "name": "fish cake with swirl",
        "score": 0.81
      }
    ]
  }
]
```

37 ms, $0.00003.

## Good for

- Suggest reactions in a chat app
- Pick an icon for a new channel or project
- Add emoji to notification titles
- Decorate generated social posts

## Limits and caveats

- No flags or skin-tone variants; pick a skin tone in your UI.
