# Atlas (`atlas-1`): Text embeddings

384-dimension embeddings in 100 languages, OpenAI-compatible.

Atlas turns text into 384-number vectors for semantic search, clustering, deduplication and recommendations. Similar meanings land close together across languages, so an English query finds a German document.

Set `kind: "query"` for search queries and leave the default `passage` for the documents you index. It also answers OpenAI-style requests at `/v1/embeddings`.

- **Price:** $0.005 per 1,000 texts. One unit per text up to 2,000 characters; longer texts are truncated, and billed one unit per started 2,000 characters.
- **Languages:** ~100 languages
- **Input:** A string, or an array of up to 128 strings. Texts over about 2,000 characters are truncated: split long documents first.
- **Batch:** yes, up to 128 inputs per call
- **Status:** live
- **Built on:** [intfloat/multilingual-e5-small](https://huggingface.co/intfloat/multilingual-e5-small), MIT, 118M
- **Compatible endpoints:** POST /v1/embeddings (OpenAI)

## Request

```bash
curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"atlas-1","input":["How do I reset my password?","Où puis-je télécharger ma facture ?","Shipping takes 3 to 5 business days."]}'
```

## Options

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `input` | string or string[] | yes | | A string, or an array of up to 128 strings. Texts over about 2,000 characters are truncated: split long documents first. |
| `kind` | string (passage \| query) | no | `"passage"` | `query` for search queries, `passage` for the documents you search over. |

## Output

| Field | Type | Description |
|---|---|---|
| `embedding` | number[] | 384 floats, L2-normalized (dot product = cosine similarity). |
| `dims` | integer | 384. |

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)

### Index documents

```json
{
  "model": "atlas-1",
  "input": [
    "How do I reset my password?",
    "Où puis-je télécharger ma facture ?",
    "Shipping takes 3 to 5 business days."
  ]
}
```

```json
[
  {
    "embedding": [
      0.074629,
      0.000765,
      -0.006023,
      -0.084802,
      0.053536,
      -0.06474,
      "...378 more"
    ],
    "dims": 384
  },
  {
    "embedding": [
      0.038047,
      -0.003843,
      -0.047707,
      -0.092392,
      0.030254,
      -0.007609,
      "...378 more"
    ],
    "dims": 384
  },
  {
    "embedding": [
      -0.005012,
      -0.005834,
      -0.02256,
      -0.060305,
      0.045396,
      -0.036372,
      "...378 more"
    ],
    "dims": 384
  }
]
```

46 ms, $0.000015.

### Search query

```json
{
  "model": "atlas-1",
  "input": "forgot my login",
  "kind": "query"
}
```

```json
{
  "embedding": [
    0.029984,
    0.001574,
    0.033558,
    -0.072531,
    0.046793,
    -0.034219,
    "...378 more"
  ],
  "dims": 384
}
```

22 ms, $0.000005.

## Good for

- Semantic search over docs and tickets
- Find duplicate questions
- Cluster feedback into themes
- Recommend similar articles

## Limits and caveats

- Reads about the first 512 tokens: chunk long documents.
- For final ranking quality, rerank the top results with Ladder.
