# Granite Embedding

> IBM's Granite Embedding is an open text embedding family (30M and 278M cuts) for retrieval, clustering, and semantic search. Apache-2.0 licensed. Dimensions vary by tag (278M returns 768 dims; 30M fewer). AnyRouter exposes the text path via /embeddings on the user's own paired device running Ollama.

**ID**: `ibm-granite/granite-embedding`  
**Creator**: ibm-granite  
**Category**: embedding  
**Context**: Not published  
**Input**: $0  
**Output**: $0  
**Released**: 2024-07-16  
**Web page**: https://anyrouter.dev/model/ibm-granite/granite-embedding

**Input modalities**: text  
**Output modalities**: embeddings  

**Tokenizer**: Other

**Capabilities**: embedding

**Supported parameters**: input, model, dimensions, encoding_format

## Usage

**Endpoint**: `POST https://anyrouter.dev/api/v1/embeddings`

```bash
curl https://anyrouter.dev/api/v1/embeddings \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "ibm-granite/granite-embedding",
  "input": "The quick brown fox jumps over the lazy dog"
}'
```

Pass `input` as a string or an array of strings to embed a batch in one call.

## Providers

| Provider | Input | Output |
| --- | --- | --- |
| ollama-anyr-relay | $0 | $0 |

## Source

- Upstream docs: https://huggingface.co/ibm-granite/granite-embedding-30m-english
