Management keys, webhooks and your own keys

When the work grows, the panel can be driven from code too.

5 minLesson 8 of 90 of 3 steps

When the work grows, some of it can move from the panel into code: making a key for each customer, hearing about events, and using your own key with a model's maker.

Management keys

A management key differs from an API key: it can't call models, but it can make keys, read usage and see the balance. Under Management keys in Profile & security there are two levels:

LevelCan do
Read onlyUsage reports, key and workspace lists, balance
Manage keysPlus creating, changing, rotating and disabling keys
A management key is a secret too and is shown only once. Always make it with the least access needed.

Webhooks

Instead of asking every few minutes whether something happened, let us tell you. Webhooks are defined per workspace, from that workspace's menu on the API keys page. The address must be https, and deliveries are signed with HMAC-SHA256.

  • Payment verified
  • Key suspended
  • Plan expiring
  • Low balance or budget
  • A model retired, or its price dropped
  • Every request, metadata only (model, tokens, cost and latency)

After 25 failed deliveries in a row a webhook turns off until you fix the problem and turn it back on. To see requests in your own monitoring tool, there's an OTLP/HTTP format too.

Your own keys (BYOK)

If you have an account with a model's maker, you can add its key. Routing and usage reporting come from us, and the model's cost comes off your own account with the maker. Your IranRouter wallet pays only the platform fee on those requests.

This is enabled per account. If the Your own keys page is locked for you, open a ticket.

If your key is invalid or used up, the request fails and we don't spend from your credit instead, because that's a decision you didn't make.

A read-only management key0 of 3 steps

  1. Make a key at the Read only level and name it "reporting".
  2. Keep the key somewhere safe.
Management keys

What you learned

  • Management keys automate your work and can't call models.
  • Webhooks send events to your server.
  • BYOK brings your own key onto our infrastructure.
The go-live checklistTen minutes of checks before launch saves you a bad night.Done, next lesson