# get-inference-key

Free; owner only. The result is generated for each request and never stored in an order or action record.

Input: `keyId`.

Returns `status`, `keyStatus`, `keyPrefix`, `grantedUsd` (all credit bought), `balanceUsd` with `balanceAsOf` and `balanceProvisional` (provisional when NEAR could not be read just now), `pendingOperations` (paid orders not yet complete), `inferenceOrigin`, and `apiKey`: the secret, while it can still be delivered, with `apiKeyAvailableUntil` (7 days after issue by default). Store it securely: anyone holding it can spend the key's credit.

After that window `apiKey` is null and only the prefix is kept; use `rotate-inference-key` with `keyPrefix` to receive a new secret. After a revocation or an ownership change, `keyPrefix` is the stopped secret's prefix, which rotation confirms.
