OpenRouter Smart Embed
AI-generatedSummary
Generate text embeddings using OpenRouter's API with automatic or manual model selection based on content analysis and customizable filters.
Inputs
- Input Field (required) — The JSON field name containing the text to be embedded (default: 'query'). The text string at this field in each input item will be embedded.
- Selection Mode (required) — Determines whether to automatically select the best embedding model by analyzing the content ('auto') or manually specify the embedding task type ('manual').
- Task — Specifies the embedding task type (e.g., 'rag', 'code_search', 'multilingual', 'classification', 'clustering') used for model selection when Selection Mode is 'manual'.
- Budget (required) — Sets the cost-quality tradeoff to select among embedding models: 'cheap' (lowest cost), 'balanced' (good value), or 'premium' (best quality).
- Model Override — Optionally override automatic model selection by explicitly specifying a model ID from the dynamic model list.
- Filters — Optional filters to narrow down embedding model candidates by minimum context length, maximum price per million tokens, required output embedding dimensions, and allowed providers.
- Options — Additional options such as showing detailed model selection info in the output and forcing specific embedding dimensions for Matryoshka models.
Output shape
a list of JSON objects matching input items, each containing an OpenAI-compatible embedding structure: { data: [{ embedding, index }], model, usage }. Optionally includes a _smart field with detailed model selection metadata if enabled.
Embeddings are generated per input item by reading the specified Input Field text. If the text is missing or empty, the node throws an error unless configured to continue on failure. Model selection uses MTEB benchmark data and content analysis to automatically choose a suitable model unless overridden manually. The result format matches OpenAI embedding API responses for compatibility. Pagination or batch processing is handled internally but not exposed. Errors are reported per item.