OpenrouterSdk.Api.Embeddings (OpenRouter SDK v0.1.0)

Copy Markdown View Source

POST /embeddings — convert text (or multimodal content) to vectors.

OpenrouterSdk.Api.Embeddings.create(%{
  model: "openai/text-embedding-3-small",
  input: ["hello world", "another sentence"]
})

Summary

Functions

create(payload, opts \\ [])

@spec create(
  map(),
  keyword()
) :: {:ok, map()} | {:error, OpenrouterSdk.Error.t()}