Hey @jinsley8! 👋
AI Engine doesn’t have a built-in feature to obfuscate API keys. It’s recommended to limit admin access to trusted users only.
Even if you have the option to hide or show the key in the interface, anyone with admin access would still be able to retrieve it elsewhere — whether from the database, PHP files, or environment variables. So there’s no true way to conceal it from an admin.
That said, you can use filters like mwai_ai_query to dynamically set the API key at the query level instead of storing it in the plugin settings:
$query->set_api_key( $key );
This way, the key is injected only when a request is made. But again, an admin could still access your codebase or configuration and find it.