Docs
Rerank & moderations
Three small surfaces with one shape: rerank, moderations and legacy completions.
Three small surfaces with one shape: request in, answer out, no streaming. Same key, same wallet, same usage page.
Rerank
POST
https://iranrouter.com/v1/rerankbash
curl https://iranrouter.com/v1/rerank \
-H "Authorization: Bearer ir-..." \
-H "Content-Type: application/json" \
-d '{
"model": "cohere/rerank-v3.5",
"query": "بهترین رستوران تهران",
"documents": ["رستوران الف …", "کافه ب …"],
"top_n": 2
}'Nothing is generated, so you are billed on input only — the query plus every document.
Moderations
POST
https://iranrouter.com/v1/moderationsbash
curl https://iranrouter.com/v1/moderations \
-H "Authorization: Bearer ir-..." \
-H "Content-Type: application/json" \
-d '{"model": "openai/omni-moderation-latest", "input": "متن مورد بررسی"}'Most providers charge nothing here and report no usage at all; the usage row then records zero, which is the honest record of that.
Completions (legacy)
POST
https://iranrouter.com/v1/completionsIf the choice is yours, chat/completions is better. This exists for older tools that still speak nothing else.