IBM Granite Embed ($0.005)
ibm_granite_embedGenerate IBM Granite embedding vectors for one or more texts to index documents and compare meaning for semantic search, RAG retrieval, and similarity scoring.
Instructions
Generate embedding vectors for one or more texts using IBM Granite (default: ibm/granite-embedding-278m-multilingual). Returns one float array per input, suitable for semantic search, RAG retrieval, and similarity scoring. Use this to index documents or compare texts by meaning; it returns vectors, not prose, so call ibm_granite_chat when you need a written answer. Up to 64 texts per call. No IBM Cloud account required — pay $0.005 USDC per call via x402.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputs": "<inputs>"
},
"name": "ibm_granite_embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Override the embedding model id (e.g. ibm/granite-embedding-125m-english). Defaults to ibm/granite-embedding-278m-multilingual. | |
| inputs | Yes | Texts to embed. 1–64 strings per call, up to 8,000 characters each. |