IranRouter
Docs contents

Docs

IranRouter docs

Everything about calling IranRouter — from your first request to production agents.

IranRouter speaks the OpenAI API. Any SDK, library or tool that works with OpenAI connects here by changing two values — the base URL and the key. Nothing in your code needs rewriting.

python
client = OpenAI(
    api_key="ir-...",                    # ← your IranRouter key
    base_url="https://iranrouter.com/v1",   # ← instead of api.openai.com
)

Billing is in Rial, an official invoice is issued, and no foreign card is required. You are charged for tokens actually consumed, not a monthly subscription.

Where to start

What is supported

CapabilityStatus
POST /v1/chat/completionsFully supported, streaming and non-streaming
POST /v1/messagesAnthropic-format compatible
Tools / function callingOn both surfaces
Vision / image inputOn models that support it
Prompt cachingSupported and priced separately
GET /v1/models · /v1/key · /v1/creditsSupported

What we do not have yet

Stated plainly so nobody buys on a wrong assumption:

  • /v1/embeddings, /v1/images, /v1/audio, /v1/responses not offered yet.
  • /v1/messages/count_tokensnot implemented.
If you depend on one of these, talk to us before you buy — we would rather you knew first.