Embeddings API
Multilingual text embeddings and a cross-encoder reranker, the two halves of retrieval for RAG. Indonesian and English embed into the same space. Pay per call, no account.
2 endpoints
embed
$0.0020 per callTurn text into 1024-d vectors for semantic search, clustering or RAG.
rerank
$0.0020 per callOrder candidate documents by how relevant each is to a query, using a cross-encoder that reads the query and each document together.
Call it
The first response is 402 with the exact price and every way to pay. Pay,
repeat the request with the proof, and you get the result.
curl -X POST https://api.glianalabs.com/v1/tools/embed \
-H 'content-type: application/json' \
-d '{"texts":["harga tiket kereta ke Bandung","train ticket price to Bandung"]}'How it works
embed turns up to 100 texts into 1024-dimension vectors for your own index. rerank reads a query together with each candidate document and orders them by relevance: embeddings find candidates, the reranker picks the best few for the prompt.
Limits worth knowing
We keep no vector store: the vectors are returned to you to index. Each text is limited to 32,000 characters.
Questions
Which embedding model is it?
A multilingual 1024-dimension model; the response names the model id and dimensions.
Does it support Indonesian?
Yes. Indonesian and English share one vector space, so a query in one finds documents in the other.
Why rerank after embeddings?
Vector search is fast but approximate. A cross-encoder reads the query and each document together and is more accurate at choosing the final few.
Is there a free tier?
No. Every call is paid individually, with no plan or minimum. A request that fails validation is refused before it runs, so it is never charged.
Do I need an account or an API key?
No. The first response is HTTP 402 with the exact price; pay it with USDC from your own wallet and repeat the request. To prepay instead, top up a balance in rupiah and send a gk_ key.