cohere/rerank-v3.5Rerank v3.5 is designed to reorder search results for improved relevance. It supports multi-aspect and semi-structured data reranking over 100+ languages. Ideal for refining results from semantic or keyword search...
Billing follows the provider's own reported cost. The unit prices here are for reference; a model marked "billed at actual usage" has no reliable pre-call price, so your usage page is the record of what you paid.
Rerank models are served on POST /v1/rerank. Send a query and a list of documents and get them back ranked by relevance; top_n limits how many come back. Billing follows the provider's reported cost.
curl https://macdecloud.com/v1/rerank \
-H "Authorization: Bearer dcld-sk-..." \
-H "Content-Type: application/json" \
-d '{"model":"cohere/rerank-v3.5","query":"What is the capital of France?","documents":["Paris is the capital of France.","Berlin is the capital of Germany."],"top_n":1}'The OpenAI SDK has no rerank method; POST with httpx, which the SDK already depends on.
import httpx
resp = httpx.post(
"https://macdecloud.com/v1/rerank",
headers={"Authorization": "Bearer dcld-sk-..."},
json={
"model": "cohere/rerank-v3.5",
"query": "What is the capital of France?",
"documents": ["Paris is the capital of France.", "Berlin is the capital of Germany."],
"top_n": 1,
},
)
for r in resp.json()["results"]:
print(r["index"], r["relevance_score"])