RAG and data · 2026-10-06
400 Bad Request: embeddinggemma Does Not Support Chat
Fix the 400 Bad Request: embeddinggemma does not support chat by using /api/embed on Ollama or /v1/embeddings through LLMTR.
Short answer: use the embeddings endpoint
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. Send embeddings to /v1/embeddings at https://llmtr.com/v1; on Ollama, use POST /api/embed for EmbeddingGemma. On LLMTR, llmtr/embeddinggemma-300m was retired on 14 October 2026; select llmtr/embeddingmagibu-200m instead, a model distilled from EmbeddingGemma for Turkish text. It accepts 8,192 tokens per text; it is free until 20 October 2026, 23:59 Turkey time, and then costs $0.01 per 1M input tokens.
A chat endpoint expects a text-generation model, while EmbeddingGemma converts text into numeric vectors and does not generate text. On LLMTR, llmtr/embeddingmagibu-200m serves only /v1/embeddings. The chat endpoint /v1/chat/completions is the wrong operation for this model, and a request sent there returns HTTP 400.
400 Bad Request: "embeddinggemma" does not support chat
Send embeddinggemma to POST /api/embed on Ollama; on LLMTR, send its successor llmtr/embeddingmagibu-200m to POST https://llmtr.com/v1/embeddings. EmbeddingGemma is a 300M parameter open embedding model with a 2K context on Ollama, available from Ollama v0.11.10; it does not generate text or answer chat requests in Ollama.
The exact wording of this Ollama error message does not appear on the Ollama library page or the API reference, so it could not be verified there. The fix does not depend on the wording: send embedding models to the embedding endpoint. On LLMTR, this unsupported endpoint returns HTTP 400 with error type unsupported_operation; the body lists supported_endpoints and suggested_endpoint.
Mapping the call to the right endpoint: Ollama /api/embed vs /api/chat, LLMTR /v1/embeddings vs /v1/chat/completions
Choose the endpoint by operation: embeddings turn text into numeric vectors, while chat and generation endpoints are for text generation. On Ollama, embeddinggemma is a 300M parameter open embedding model with a 2K context, and POST /api/embed generates embeddings separately from /api/chat and /api/generate.
| Task | Ollama | LLMTR |
|---|---|---|
| Create embeddings | POST /api/embed | POST https://llmtr.com/v1/embeddings |
| Chat with a text model | POST /api/chat | POST https://llmtr.com/v1/chat/completions |
| Model name | embeddinggemma | llmtr/embeddingmagibu-200m (successor distilled from EmbeddingGemma) |
| Context per input | 2K tokens | 8,192 tokens |
| Vector size | — | 768 (512, 256 or 128 with dimensions) |
The working request on LLMTR: curl example; response shape: data[] with one 768-number embedding per input; batch input as an array
The bash request below sends a batch array as input to POST https://llmtr.com/v1/embeddings. Each item in data[] contains one 768-number embedding for each input. With an OpenAI-compatible SDK, use client.embeddings.create(model="llmtr/embeddingmagibu-200m", input=[...], extra_body={"prompt_name": "document"}) with base_url https://llmtr.com/v1; client.chat.completions.create with that model returns HTTP 400 unsupported_operation. Send documents with prompt_name document and search queries with prompt_name query; the dimensions field can request 512, 256 or 128 instead of 768.
Bash request showing the chat mistake and the correct LLMTR embeddings call.
# Wrong: an embedding model on the chat endpoint returns 400 unsupported_operation.
# Right: send it to /v1/embeddings.
curl https://llmtr.com/v1/embeddings \
-H "Authorization: Bearer $LLMTR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "llmtr/embeddingmagibu-200m",
"input": ["İade süresi teslimattan itibaren 14 gündür.", "Kargo 500 TL üzeri siparişlerde ücretsizdir."],
"prompt_name": "document"
}'
# Each item in data[] carries an embedding of 768 numbers.
Common causes and fixes: a RAG framework configured with the embedding model in its chat/LLM slot, an OpenAI-compatible client calling chat.completions with an embedding model, mixing vectors from different models in one index
In a RAG framework, the embedding model name is placed in the LLM/chat model setting instead of the embedding model setting. Put a chat model in the chat slot and llmtr/embeddingmagibu-200m in the embedding slot. On Ollama, use embeddinggemma with POST /api/embed rather than a chat endpoint.
An OpenAI-compatible client can produce this error when code calls client.chat.completions.create with an embedding model. Use client.embeddings.create(model="llmtr/embeddingmagibu-200m", input=[...]) with base_url https://llmtr.com/v1 instead. LLMTR serves llmtr/embeddingmagibu-200m only through /v1/embeddings; calling the chat method with that model returns HTTP 400 unsupported_operation for this model.
Vectors from different embedding models are not comparable, so do not mix them between index creation and querying. Build the index and query it with the same embedding model. On LLMTR, keep llmtr/embeddingmagibu-200m selected for both operations, and rebuild any index created with llmtr/embeddinggemma-300m, because the two models produce incompatible vectors.
Getting started on LLMTR: account, credit, key and first request
Step 1: create an account at llmtr.com and verify your email. Step 2: top up credit from the Dashboard through the secure checkout. An 8% platform margin is added once, on top of the requested top-up amount; for example, $10.00 credit is charged $10.80. The platform margin is not added to model prices, and every API call is deducted at the model's catalog price.
Step 3: create an API key under Dashboard > API Keys. The raw key is shown only once, so store it as an environment variable such as LLMTR_API_KEY. Step 4: send the first request to https://llmtr.com/v1 with any OpenAI-compatible SDK by changing only base_url and api_key. Usage and spend per key are visible on the Dashboard usage page. The same key and the same credit balance work for every model in the catalog; switching models means changing the model string.
Send your first embedding request on LLMTR
Create an account, add credit, create an API key, and send an embedding request to the LLMTR endpoint.
- Account. Create an account at llmtr.com and verify your email.
- Credit top-up. Top up credit from the Dashboard through the secure checkout. An 8% platform margin is added once, on top of the requested top-up amount; $10.00 credit is charged $10.80. The margin is not added to model prices, and every API call is deducted at the model's catalog price.
- API key. Create an API key under Dashboard > API Keys. The raw key is shown only once; store it as an environment variable such as LLMTR_API_KEY.
- First request. Set base_url to https://llmtr.com/v1 and api_key to your LLMTR key, then send the first request with llmtr/embeddingmagibu-200m to https://llmtr.com/v1/embeddings with an OpenAI-compatible SDK. Usage and spend per key are visible on the Dashboard usage page. The same key and credit balance work for every model; switch models by changing the model string.
Frequently asked questions
Why does embeddinggemma say it does not support chat?
It is an embedding model: it returns numeric vectors, not text. Send it to POST /api/embed on Ollama; on LLMTR, use its successor llmtr/embeddingmagibu-200m on POST https://llmtr.com/v1/embeddings.
Which endpoint do I call for embeddinggemma?
Use POST /api/embed on Ollama or POST https://llmtr.com/v1/embeddings on LLMTR. The LLMTR model string is llmtr/embeddingmagibu-200m; llmtr/embeddinggemma-300m was retired on 14 October 2026.
How many dimensions does llmtr/embeddingmagibu-200m return?
It returns normalized 768-dimensional vectors. The dimensions field can request 512, 256 or 128.