Expiry is not a spending policy
A valid credential can still spend within its model scopes and monthly cap until it expires or is revoked. A one-day key is not automatically safe to publish, and a year-long key is not inherently unlimited. Select expiry, permission and spending ceiling as complementary controls rather than substitutes for private storage.
What to do next
- 01
Match the deployment purpose
Use a short-lived evaluation key for a bounded integration exercise. For production, choose a supported interval with an owner and a scheduled operational replacement process.
- 02
Record the expiration time
Store the public expires_at value with the deployment inventory. Alert before that date without copying the secret into a calendar, ticket or shared document.
- 03
Verify the replacement early
Deploy the new credential and make a read-only authenticated call. Preserve existing task identifiers so an expiry event does not force you to recreate paid work.
A concrete example
Illustrative plan: a team selects a 30-day key and records a rotation owner one week before expiry. It confirms the new environment value with /models, then retires the previous credential after checking which workers still use it.
Before you call it ready
- The expiry is one of the supported choices.
- A replacement owner is assigned.
- Expiry does not erase the job recovery plan.
When to stop or choose another method
If your application cannot update credentials without losing jobs, fix that operational coupling before shortening the interval aggressively. Do not solve it by embedding a permanent key in clients.
