Integration guides · 2026-10-17
Turkish embedding API: a guide to EmbeddingMagibu 200M
Embed Turkish text with llmtr/embeddingmagibu-200m on the OpenAI-compatible /v1/embeddings endpoint: 768 dimensions, 8,192 tokens and dated pricing.
Short answer: send llmtr/embeddingmagibu-200m to /v1/embeddings
LLMTR (llmtr.com) is a gateway that gives access to language models hosted in Türkiye and at global providers through one OpenAI-compatible API. To turn Turkish text into vectors, you send llmtr/embeddingmagibu-200m as the model to the POST /v1/embeddings endpoint at https://llmtr.com/v1; in the OpenAI Python SDK that call is client.embeddings.create.
EmbeddingMagibu 200M is an embedding model trained for Turkish text and hosted in Turkey. It turns text into a normalized 768-dimensional vector for semantic search, RAG, similarity and clustering, and it accepts up to 8,192 tokens per text. Because every vector has a length of 1, the dot product of two vectors equals their cosine similarity. The model is published on Hugging Face as alibayram/embeddingmagibu-200m under the MIT licence; its model card describes it as a Turkish model of about 200 million parameters, distilled from Google's EmbeddingGemma-300m.
How do you use an embedding API for Turkish text?
Create an API key on LLMTR, put it in the LLMTR_API_KEY environment variable and set the OpenAI client's base_url to https://llmtr.com/v1. The example below embeds two Turkish sentences in one request. The input field takes a single text or a list of texts; the response holds one item per text, and you match the order with the index field.
prompt_name is not one of the OpenAI SDK's own parameters, so it goes in extra_body. The response follows the OpenAI format: each item in the data array carries the object, index and embedding fields, and model and usage sit at the top level. usage.prompt_tokens is the number of tokens billed; embedding models have no output tokens.
An OpenAI Python SDK call that embeds two Turkish sentences with prompt_name document and prints each vector's position, length and the token usage.
import os
from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key=os.environ["LLMTR_API_KEY"])
response = client.embeddings.create(
model="llmtr/embeddingmagibu-200m",
input=[
"Faturalar her ayın ilk iş günü kesilir.",
"Kargo takip numarası sipariş özetinde yer alır.",
],
extra_body={"prompt_name": "document"},
)
for item in response.data:
print(item.index, len(item.embedding), item.embedding[:3])
print(response.usage.prompt_tokens)
prompt_name and dimensions: the kind of text and the vector size
EmbeddingMagibu reads the kind of text from the prompt_name field. Use document for the documents and chunks you add to an index, query for a user's search query, and STS on both sides when you compare how similar two texts are. When the field is omitted, document applies. For example, to measure how similar two product descriptions are, you send both texts with STS and compare their vectors. Task names such as QuestionAnswering, FactChecking, Classification, Clustering and CodeRetrieval are accepted as well; an invalid value returns 400 invalid_request with the list of accepted values. The input_type field is not read by this model.
The dimensions field selects 512, 256 or 128 dimensions instead of 768; a value other than these four returns 400 invalid_request. The curl request below embeds a search query at 256 dimensions. Build an index with one model, the same prompt_name scheme and the same dimensions value, send queries at the same size as the index, and do not mix it with vectors from another model.
A curl request that embeds a search query with prompt_name query and dimensions 256.
curl https://llmtr.com/v1/embeddings \
-H "Authorization: Bearer $LLMTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llmtr/embeddingmagibu-200m",
"input": "Fatura ne zaman kesilir?",
"prompt_name": "query",
"dimensions": 256
}'
Pricing: $0 until 20 October 2026, 23:59 (Turkey time), then $0.01 per 1M tokens
The price is dated and the switch is automatic: the price in effect when the request arrives applies. From 15 October 2026, 00:00 to 20 October 2026, 23:59 (Turkey time), 1M input tokens cost $0. During this free period, which ends on 20 October 2026, each account has a daily allowance of 500,000 input tokens, renewed every day at 00:00 Turkey time; all of the account's keys count toward it, and the key's request limit has nothing to do with it. Once the day's usage has reached it, further requests return HTTP 429 with details.reason set to free_quota_exhausted; wait for the Retry-After time in the response. From 21 October 2026, 00:00 (Turkey time), 1M input tokens cost $0.01.
A worked example: a corpus of 100,000 chunks averaging 400 tokens is about 40 million tokens, so embedding it once after 21 October 2026 costs 40 x $0.01 = $0.40. Until 20 October 2026, the daily allowance of 500,000 tokens covers about 1,250 chunks of that size per day. The exact token count is in the usage.prompt_tokens field of each response.
| Property | Value |
|---|---|
| Model id | llmtr/embeddingmagibu-200m |
| Endpoint | POST /v1/embeddings |
| Vector size | 768 dimensions (512, 256 or 128 dimensions with dimensions) |
| Context per text | 8,192 tokens |
| Limit per request | 256 texts and 16,384 tokens in total |
| 15 October 2026, 00:00 to 20 October 2026, 23:59 (Turkey time) | $0 per 1M input tokens; 500,000 input tokens per account per day |
| From 21 October 2026, 00:00 (Turkey time) | $0.01 per 1M input tokens |
Limits, errors and bulk indexing
Send at most 8,192 tokens per text. A text over that limit is not truncated; the request is rejected with 400 provider_error, so you need to split the text into chunks. One request carries up to 256 texts and 16,384 tokens in total: over 256 texts returns 400 invalid_request, and a request over the token limit returns 400 provider_error.
For bulk indexing, split documents into chunks of 256 to 512 tokens and send requests one after another, not in parallel. At busy times a request may return HTTP 503 with the model_busy type; nothing in your request needs to change, so wait for the Retry-After time and send the same request again. For large requests, set your client's read timeout to at least 300 seconds.
The EmbeddingGemma 300M row on LLMTR was retired on 14 October 2026, and this model replaced it. The vectors of the two models are not compatible; rebuild your existing index with EmbeddingMagibu from scratch. The format of an error response is described on the LLMTR error codes page.
Getting started on LLMTR: account, key and first request
Step 1: create an account at llmtr.com; for paid usage, top up your balance under Dashboard > Billing. Step 2: create a key under Dashboard > API Keys; the raw key is shown only once, so store it in the LLMTR_API_KEY environment variable. Step 3: in your OpenAI-compatible SDK, set base_url to https://llmtr.com/v1 and pass llmtr/embeddingmagibu-200m as the model in the embeddings.create call.
The same key works for the other models in the catalog. A step-by-step setup of semantic search over Turkish documents is covered in a separate article of this series.
Turn Turkish text into vectors with EmbeddingMagibu 200M
Create an account, create an API key and send the first request to https://llmtr.com/v1/embeddings with llmtr/embeddingmagibu-200m.
- Account. Create an account at llmtr.com; for paid usage, top up your balance under Dashboard > Billing.
- API key. Create a key under Dashboard > API Keys. The raw key is shown once; store it as the LLMTR_API_KEY environment variable.
- First request. In an OpenAI-compatible SDK, set base_url to https://llmtr.com/v1 and send an embeddings.create call with the model llmtr/embeddingmagibu-200m and prompt_name document.
Frequently asked questions
How much does EmbeddingMagibu 200M cost?
$0 from 15 October 2026, 00:00 to 20 October 2026, 23:59 (Turkey time), with a daily allowance of 500,000 input tokens per account during that period. From 21 October 2026, 00:00 (Turkey time), 1M input tokens cost $0.01. Embedding models have no output tokens.
How many dimensions does EmbeddingMagibu return?
By default it returns a normalized 768-dimensional vector. With the dimensions field you can choose 512, 256 or 128; build the index and the queries at the same size.
Can I use EmbeddingMagibu with the OpenAI SDK?
Yes. Set base_url to https://llmtr.com/v1, pass llmtr/embeddingmagibu-200m as the model in client.embeddings.create and send the prompt_name field through extra_body. The request goes to the POST /v1/embeddings endpoint.