embed
Generate vector embeddings for text input using OpenRouter embedding models. Supports custom models and output formats.
Instructions
Generate embeddings for text input using an OpenRouter embedding model.
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": {
"input": "<input>"
},
"name": "embed"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | Text string or list of strings to embed | |
| model | No | Embedding model (e.g., "mistralai/mistral-embed-2312"). If not specified, uses DEFAULT_EMBEDDING_MODEL environment variable. | |
| dimensions | No | Custom embedding dimensions (model-dependent) | |
| encoding_format | No | Output format: "float" or "base64" (default: float) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||