Embeddings & Reranking API
Embeddings
Section titled “Embeddings”POST /v1/embeddingsConverts text into numerical vectors so semantic similarity becomes measurable. A typical use case is populating and searching a vector database.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
model | string | Model ID, e.g. vllm/release/harrier-oss-v1-0.6b |
input | string/array | Text or list of texts |
curl -X POST https://ai.noris.de/v1/embeddings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "vllm/release/harrier-oss-v1-0.6b", "input": "AI infrastructure from Germany" }'Response
Section titled “Response”The response contains an embedding array with the vector for each input element:
{ "object": "list", "data": [ { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, "..."] } ], "model": "vllm/release/harrier-oss-v1-0.6b", "usage": { "prompt_tokens": 5, "total_tokens": 5 }}Use Case
Section titled “Use Case”Store the vectors alongside metadata in your vector database. At search time, the query is embedded as well and compared against the stored vectors via similarity search (e.g. cosine).
Reranking
Section titled “Reranking”POST /v1/rerankA reranker scores query and documents pairwise, producing a more precise ranking than embedding search alone. A typical use case is the second stage of a RAG pipeline.
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
model | string | Model ID, e.g. vllm/release/bge-reranker-v2-m3 |
query | string | Search query |
documents | array | List of candidate documents |
top_n | integer | Number of top results to return |
return_documents | boolean | Include document text in the response |
curl -X POST https://ai.noris.de/v1/rerank \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_API_KEY" \ -d '{ "model": "vllm/release/bge-reranker-v2-m3", "query": "How does zero-data-retention work?", "documents": [ "noris does not persist prompts.", "The weather in Nuremberg is sunny." ], "top_n": 2, "return_documents": true }'Response
Section titled “Response”The response contains a results array, sorted by relevance:
{ "id": "rerank-...", "results": [ { "index": 0, "relevance_score": 0.98, "document": {"text": "noris does not persist prompts."} }, { "index": 1, "relevance_score": 0.03, "document": {"text": "The weather in Nuremberg is sunny."} } ], "model": "vllm/release/bge-reranker-v2-m3"}Use Case
Section titled “Use Case”In a RAG pipeline, vector search returns a rough candidate set; the reranker refines this ordering before the top documents are passed to the LLM.
