Skip to content
INRENT
Platform

API keys

Create, scope, limit, rotate and revoke keys.

Create a key

Dashboard → API Keys → Create key. Choose:

  • Project. AI usage and budgets roll up to it. Cloud VPS servers belong to the whole workspace, not to a project.
  • Environment. Development, staging or production, reflected in the prefix (sk-inrent-dev-, -stg-, -prod-).
  • Permissions. inference by default. Management permissions are keys:read, keys:write, usage:read and logs:read. Cloud VPS permissions are compute:read and compute:write; Cloud VPS requests act as the person who created the key (see Cloud VPS keys).
  • Model allowlist. Optional. Restricts which models the key can call.
  • Spend limit. Optional lifetime cap in rupees on the key's AI requests. It does not cover Cloud VPS, so a key with a spend limit cannot order servers, resize them or turn on backups (see Cloud VPS keys).
  • Rate limits. Optional requests and tokens per minute, below your plan's limits.
  • Expiration. Optional.

The secret is shown once. INRENT stores only a keyed hash.

Edit a key

Edit changes a key's name, permissions, model allowlist, limits and expiry, effective on the next request. Its project and environment are fixed. Because Cloud VPS requests act as the key's creator, only the person who created a key can add compute:read or compute:write to it; anyone with keys:write can remove them.

Rotate and revoke

  • Rotate creates a new key with the same settings and immediately revokes the old one. You become the new key's creator.
  • Revoke disables a key instantly. Gateway caches are invalidated at revocation.
  • Delete revokes the key and hides it from lists. Historical usage stays attributed to it.

Management API

Keys with management permissions can automate key lifecycle:

curl https://api.inrent.ai/v1/keys \
  -H "Authorization: Bearer $INRENT_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"ci-runner","environment":"staging","permissions":["inference"],"spend_limit_inr":"25"}'

A key can never create a key with permissions it doesn't have itself.

Keys created through the API cannot have compute:read or compute:write: Cloud VPS requests act as a person, and a key created by a key has none. Create Cloud VPS keys in the dashboard.

Cloud VPS keys

Give the key Cloud VPS: read (compute:read) or Cloud VPS: manage servers (compute:write, which includes read) when you create it under Dashboard → API Keys. Existing keys keep their permissions; create a new key to add Cloud VPS access.

Cloud VPS requests act as the person who created the key. Every request checks that this person is still a member of the workspace and that their role allows the action (Owner, Admin and Developer can manage servers; every role can read). If they leave the workspace or their role changes, their keys stop working for Cloud VPS straight away, with one of these 403 codes:

CodeMeaning
insufficient_key_permissionsThe key does not have compute:read or compute:write.
key_creator_not_memberThe person who created the key is no longer in the workspace.
key_creator_forbiddenTheir role no longer allows this action, for example a Viewer making a change.
key_has_no_userThe key was created through the API by another key. Create Cloud VPS keys in the dashboard.

Billing and limits

Cloud VPS charges are billed hourly to the workspace wallet, the same wallet as AI requests. A key's spend limit, its model allowlist and its project's budget apply only to AI requests and cannot cap server charges. So that a spend limit is never mistaken for a cap on servers, a key with a spend limit cannot add Cloud VPS charges: ordering a server, resizing one and turning backups on are refused with 403 key_spend_limit_not_supported. Everything else still works with that key, including reading, power actions, reinstall, firewall, snapshots, turning backups off and deleting servers. To order servers through the API, use a key without a spend limit, and keep it as safe as a payment card.

Rotating a key makes you its creator. Changes made through the API are recorded in the audit log as made by the key's creator.

See the API reference for every Cloud VPS endpoint.

Inspect the current key

curl https://api.inrent.ai/v1/key -H "Authorization: Bearer $INRENT_API_KEY"

This returns the key's name, environment, permissions, limits, lifetime spend and the organization's balance.

Edit this page