Sentence Transformers: all-MiniLM-L12-v2: AI model
all-MiniLM-L12-v2 is a text-embedding model that turns English text into 384-dimensional dense vectors. For semantic search, RAG and clustering, reachable from inside Iran through Hormouz.
- Context window:
- 512 tokens
- Input:
- $0.01/1M tokens
- Output:
- $0/1M tokens
- Type:
- embedding
- Embeddings
The all-MiniLM-L12-v2 model encodes sentences and short paragraphs into a 384-dimensional dense vector. Its deeper twelve-layer encoder trades a little speed for stronger semantic quality on search, clustering and similarity tasks. It produces 384-dimensional dense embedding vectors well suited to retrieval, semantic search, clustering and ranking.
The model handles up to 8192 tokens of input per request. Through Hormouz it is served behind an OpenAI-compatible embeddings API. Point your base URL at Hormouz, drop in a Hormouz key and send requests to /embeddings. Pricing is usage-based at $0.005 per million input tokens.
Hormouz provides stable access to the model from inside Iran, with no foreign credit card or circumvention tooling required.
The all-MiniLM-L12-v2 embedding model maps sentences and short paragraphs into a 384-dimensional dense vector space, producing efficient and high-quality semantic embeddings optimized for tasks such as semantic search, clustering, and...
Quickstart
curl https://api.hormouz.net/v1/embeddings \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"sentence-transformers/all-minilm-l12-v2","input":"The quick brown fox"}'Specs
| Vendor | Sentence Transformers |
|---|---|
| Type | Embedding |
| Context window | 512 tokens |
| Pricing | $0.01/M in · $0.00/M out |
| API | embeddings |
Code example
curl https://api.hormouz.net/v1/embeddings \
-H "Authorization: Bearer ng-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"sentence-transformers/all-minilm-l12-v2","input":"The quick brown fox"}'from openai import OpenAI client = OpenAI(api_key="ng-YOUR_API_KEY", base_url="https://api.hormouz.net/v1") resp = client.embeddings.create(model="sentence-transformers/all-minilm-l12-v2", input="The quick brown fox") print(resp.data[0].embedding)
import OpenAI from "openai";
const client = new OpenAI({ apiKey: "ng-YOUR_API_KEY", baseURL: "https://api.hormouz.net/v1" });
const resp = await client.embeddings.create({
model: "sentence-transformers/all-minilm-l12-v2",
input: "The quick brown fox",
});
console.log(resp.data[0].embedding);Buy the Sentence Transformers: all-MiniLM-L12-v2 API, paid in rial
- Buy credit with an Iranian bank card; no foreign card or account needed.
- One Hormouz key reaches Sentence Transformers: all-MiniLM-L12-v2 and 600+ other models, and you pay only for what you use.
- No VPN and no risk of a banned account; just change the base URL to api.hormouz.net/v1.
Use via Hormouz
Connect to this model and 600+ others with one API key, then see usage down to each request.
Request company accessFAQ
- What is all-MiniLM-L12-v2 and what is it good for?
- all-MiniLM-L12-v2 is a text-embedding model that turns text into 384-dimensional dense vectors. Common uses are semantic search, retrieval for RAG, clustering and similarity scoring.
- What are the embedding dimension and maximum input length of all-MiniLM-L12-v2?
- Each output vector has 384 dimensions, and the model accepts up to 8192 tokens of input per request.
- How do I call all-MiniLM-L12-v2 through Hormouz?
- Send your input text to the /embeddings endpoint with the model id "sentence-transformers/all-minilm-l12-v2". Because the API is OpenAI-compatible, just point the base URL at Hormouz and swap in your Hormouz key. The same OpenAI embeddings client code works unchanged.
- How much does all-MiniLM-L12-v2 cost?
- Pricing is usage-based at $0.005 per million input tokens. There is no fixed monthly fee. You pay only for what you use.
- How do I access all-MiniLM-L12-v2 from inside Iran?
- Create an account on Hormouz and generate an API key. Hormouz provides a stable path to the model from inside Iran, with no foreign credit card required.
Updated 2026-10-13