Rerank
Order 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 rail you can
pay with. Pay, repeat the request with the proof, and you get the result.
curl -X POST https://api.glianalabs.com/v1/tools/rerank \
-H 'content-type: application/json' \
-d '{"query":"How do I get a refund?","documents":["Our office is open Monday to Friday.","Refunds are issued to the original payment method within 5 business days."]}'When to use it
Use after a vector search or keyword search, before putting the best few passages into a prompt: embeddings find candidates, this ranks them. documents is up to 100 strings (or { text } objects), each up to 4,000 characters; top_k keeps only the best N. Returns results[] { index, score, document }, most relevant first, where index is the position in your input. Rely on the order; scores are only comparable within one call.
What it costs
$0.0010 per successful call — flat, with no plan, minimum or monthly fee. A call that fails validation is refused before it runs, so it is never charged.
Not sure this is the right endpoint? GET /v1/consult?intent=… is
free and answers that.
Often used with this
Embed
$0.0010Turn text into 1024-d vectors for semantic search, clustering or RAG.
Face Detect
$0.0030Find faces in an image. Use when an agent counts people, checks a photo contains exactly one face before a match, or estimates age and gender.
Face Embed
$0.0060Turn every face in an image into a 512-d ArcFace vector.