Buy an AI API key
Instead of a separate key from every company, one ir- key reaches every model. You create it in the dashboard, set its limits, and its cost comes out of a Rial wallet.
What an ir- key is
It is your account's key on IranRouter and takes the place of an OpenAI or Anthropic key in your code. One key for every model, working from inside Iran, billed in Rial. Nobody else holds it.
How to get one
- Sign up with your mobile number.
- Top up the wallet or take a plan.
- Create a key in the dashboard.
- Put it in your app's environment and change base_url.
What you can control per key
- Monthly and daily Rial budgets and a daily token cap.
- Requests per minute.
- An expiry date for temporary keys.
- Which workspace it belongs to.
Keep it safe
The key can spend from your wallet, so keep it server side. If one leaks, revoke it in the dashboard and create a new one.
How the connection looks
from openai import OpenAI client = OpenAI( api_key="ir-...", base_url="https://iranrouter.com/v1", )
Frequently asked questions
Do I need one key per model?
No. One ir- key reaches every model your plan or wallet allows; you choose the model per request.
Does a key expire?
Only if you set an expiry date when you create it.