% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_openrouter.R
\name{openrouter_embedding}
\alias{openrouter_embedding}
\title{Generate Embeddings Using the OpenRouter API}
\usage{
openrouter_embedding(
  .input,
  .model = "openai/text-embedding-3-small",
  .timeout = 120,
  .dry_run = FALSE,
  .max_tries = 3
)
}
\arguments{
\item{.input}{An \code{LLMMessage} object or a character vector of texts to embed.}

\item{.model}{The embedding model ID (default: \code{"openai/text-embedding-3-small"}).}

\item{.timeout}{Request timeout in seconds (default: 120).}

\item{.dry_run}{If TRUE, returns the request object without executing it (default: FALSE).}

\item{.max_tries}{Maximum retries (default: 3).}
}
\value{
A tibble with columns \code{input} (text) and \code{embeddings} (list of numeric vectors).
}
\description{
Sends text to an embedding model accessible via OpenRouter and returns
embedding vectors. Note that embedding models are not listed in
\code{list_models(openrouter())} — specify the model ID directly.
Known supported models include \code{"openai/text-embedding-3-small"},
\code{"openai/text-embedding-3-large"}, and \code{"mistralai/mistral-embed"}.
}
