Rerank
POST /<lane>/v1/rerank — Cohere/Jina-style reranking. Given a query and a list
of documents, returns documents ordered by relevance.
Request
Section titled “Request”curl "https://api.opengateway.one/oss/v1/rerank" \ -H "Authorization: Bearer $OPENGATEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "BAAI/bge-reranker-v2-m3", "query": "how do I set the base URL?", "documents": [ "Set OPENGATEWAY_API_KEY in your shell.", "The OpenAI SDK base URL includes /v1.", "Lanes are path prefixes like /oss." ], "top_n": 2 }'Response
Section titled “Response”{ "results": [ { "index": 1, "relevance_score": 0.92 }, { "index": 2, "relevance_score": 0.41 } ]} OpenGateway Guide
Ask about configuring OpenGateway — lanes, base URLs, client setup, model choice, or an error you hit. Answers are grounded in the docs.