Skip to main content
You can generate embeddings with the same OpenAI-compatible API across providers. Common use cases include semantic search, RAG retrieval, clustering, and deduplication.
Vercel AI SDK
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { embed } from "ai";

const hebo = createOpenAICompatible({
  apiKey: process.env.HEBO_API_KEY,
  baseURL: "https://gateway.hebo.ai/v1",
});

const { embedding } = await embed({
  model: hebo.embedding("voyage-3"),
  value: "Tell me a joke about monkeys",
});

console.log(embedding.length);