Skip to main content

Command Palette

Search for a command to run...

OpenAI project API keys can expire: set max lifetime and rotate secrets

Updated
1 min readView as Markdown
OpenAI project API keys can expire: set max lifetime and rotate secrets

OpenAI now lets you set an expiration when you create a project API key, and admins can enforce a maximum key lifetime at the organization or project level in Platform settings. That is a real production control — newly issued keys cannot stay valid forever once the policy is on.

This post is the builder checklist: turn on max lifetime, create keys with an expiry, rotate before cutover, and keep secrets out of agent-readable paths. It is not an Agents API, Vercel Sandbox, or Astra walkthrough — for those, see OpenAI Agents API: what you still own when the harness is hosted and OpenAI Agents on Vercel: own the Queue and Sandbox hosting seam.


This is an excerpt. Read the full post at otf-kit.dev/blog/openai-api-key-expiration — full-stack kits your AI coding agent can actually ship to production. Browse the kits →

More from this blog

O

OTF — kits your AI coding agent can ship to production

606 posts

Engineering notes on shipping production apps with AI coding tools — Claude Code, Cursor, Codex, Lovable, Bolt — and the stack underneath: React Native, Expo, Next.js, Supabase. Honest takes on what works, what breaks, and the full-stack kits that get you to production faster. By OTF.