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.
Sentence Transformers: all-MiniLM-L12-v2
sentence-transformers/all-minilm-l12-v2Try Sentence Transformers: all-MiniLM-L12-v2 now
Runs on your balance at the prices above. New accounts start with free usage.
Results will appear here.
Settings
Sentence Transformers: all-MiniLM-L12-v2 at a glance
- Input price is 75% lower than the median of 34 Embeddings models.
About Sentence Transformers: all-MiniLM-L12-v2
Sentence Transformers: all-MiniLM-L12-v2 is an embedding model from Sentence Transformers, distributed through api14 under the model id sentence-transformers/all-minilm-l12-v2. It belongs to the embeddings category, so its job is not to generate chat replies but to turn text into vectors that you can store, compare and search over. The provider release date listed for it is 2025-11-18.
The model takes text as its only input and returns embeddings as its only output. It maps sentences and short paragraphs into a 384-dimensional dense vector space, which makes the vectors compact enough to store in large numbers while still carrying semantic meaning. The context window is 512 tokens, and the maximum output is 460. Because the input is text and the output is a vector, there is no natural language response to parse; you get numeric representations you can use directly in your own pipeline.
Those characteristics point to a fairly specific set of use cases. Semantic search is the obvious one: embed your documents once, embed the query at request time, and rank by vector similarity. The same approach works for clustering, where you group similar sentences or short paragraphs without hand-written rules. Retrieval augmented generation pipelines also use this kind of model to fetch relevant passages before passing them to a generative model. Deduplication, topic grouping and similarity checks between short texts are other tasks that follow from a 384-dimensional sentence embedding.
Calling it through api14 works the same way as any other OpenAI-compatible endpoint. You send a request to the embeddings route with the model field set to sentence-transformers/all-minilm-l12-v2 and your text in the input field, using the same client libraries and authentication you already use for other models on the gateway. The model supports no additional request parameters, so there is nothing to tune beyond the model id and the input itself. Keep inputs within the 512 token context window, since longer text will not fit.
The main constraint to keep in mind is that this is an embedding model, not a text generator. If you need summaries, answers or any kind of written output, a chat or completion model is the right choice instead. It is also limited to text input and to short passages, so very long documents need to be split into chunks before embedding. Within those bounds it is a practical option for search, clustering and retrieval work where small vectors and fast comparisons matter.
How to call the Sentence Transformers: all-MiniLM-L12-v2 API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "sentence-transformers/all-minilm-l12-v2".
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": "sentence-transformers/all-minilm-l12-v2",
"input": [
"The quick brown fox",
"Lorem ipsum"
]
});
console.log(result.data.map((d) => d.embedding.length));
Specifications
- Context length
- 512
- Max output
- 460
- Input
- text
- Output
- embeddings
Requests on api14 · last 7 days
Sentence Transformers: all-MiniLM-L12-v2: frequently asked questions
- How much does the Sentence Transformers: all-MiniLM-L12-v2 API cost?
- Sentence Transformers: all-MiniLM-L12-v2 costs Input $0.02 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of Sentence Transformers: all-MiniLM-L12-v2?
- Sentence Transformers: all-MiniLM-L12-v2 reads up to 512 tokens per request: prompt, history and documents together. It writes up to 460 output tokens per response.
- What can Sentence Transformers: all-MiniLM-L12-v2 do?
- Sentence Transformers: all-MiniLM-L12-v2 accepts text and returns embeddings.
- How do I call Sentence Transformers: all-MiniLM-L12-v2 from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "sentence-transformers/all-minilm-l12-v2". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to Sentence Transformers: all-MiniLM-L12-v2?
- Comparable Embeddings models at a similar price: Thenlper: GTE-Base, Intfloat: E5-Base-v2, Sentence Transformers: paraphrase-MiniLM-L6-v2. Each runs through the same API key, so switching is one string.
Sentence Transformers: all-MiniLM-L12-v2 community
New topicThis community has no topics yet. Open the first one about Sentence Transformers: all-MiniLM-L12-v2.