We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
amazon/titan-embed-text-v2Runs on your balance at the prices above. New accounts start with free usage.
Settings
Amazon Titan Text Embeddings V2 is a text embedding model from Amazon, listed on api14 under the model id amazon/titan-embed-text-v2. It belongs to the embeddings category, so its job is to turn text into vectors rather than to generate prose or carry on a conversation. If your application needs a numeric representation of text that captures semantic meaning, this is the kind of model you reach for.
The model takes text as its only input and returns embeddings as its output. It accepts up to 8,192 tokens per input, which is enough room for a long document section, a full article, or a sizeable chunk of a knowledge base entry without splitting it first. The vectors it returns are normalized and have 1,024 dimensions, so you can compare them directly with cosine similarity or dot product without extra normalization steps. The maximum output is 7,372.
Those characteristics point to a few practical uses. Retrieval augmented generation is the obvious one: embed your documents once, embed the user query at request time, and fetch the nearest chunks to feed into a generation model. Semantic search over product catalogs, support tickets, or internal documentation works the same way, and it handles paraphrases that keyword search would miss. Clustering and topic discovery benefit from the fixed 1,024 dimension vectors, since you can run k-means or similar algorithms over them directly. Deduplication and near-duplicate detection are also natural fits, as is building a recommendation layer that matches items by meaning rather than by tags.
You call it through api14's OpenAI-compatible API using the model id amazon/titan-embed-text-v2, so any client that already speaks the OpenAI embeddings format will work with minimal changes. Point your base URL at api14, pass your api14 key, and send your text to the embeddings endpoint with that model id. The model supports no additional request parameters beyond what the endpoint requires, so keep your request simple and avoid passing tuning options that will not be honored. Because it is an embedding model, it does not accept chat style messages or return generated text.
One thing to keep in mind is that this model only handles text. If your input includes images, audio, or other modalities, you will need a different model. Likewise, if you need an assistant that writes answers rather than represents text numerically, an embedding model is the wrong tool, and you would pair this one with a generation model instead. Within its scope, though, it covers retrieval, search, and clustering tasks with a context window large enough for most document chunks.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.embeddings.create({
"model": "amazon/titan-embed-text-v2",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
});
console.log(result.data.map((d) => d.embedding.length));
This community has no topics yet. Open the first one about Amazon: Titan Text Embeddings V2.