IranRouter
Docs contents

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

POSThttps://iranrouter.com/v1/rerank
bash
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

POSThttps://iranrouter.com/v1/moderations
bash
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)

POSThttps://iranrouter.com/v1/completions

If the choice is yours, chat/completions is better. This exists for older tools that still speak nothing else.