I wonder if API key and convai character can be created and changed by the player, so that player can upload their own 3d model and attach their own convai character ID to it in the game itself (outside of Unity engine). Can this be done or the developer is limited to implementing only their convai character with their own account? If it’s possible will interactions be spent on player’s convai account (who created convai character) instead of on dev’s account?
Hello @ru.t.ht.om.a.sj,
Welcome to the Convai Developer Forum!
Yes, in your application, players can enter their own Convai API key. The quotas of the API key that is used will be consumed. You’re free to use any character ID.
That means that I have to remove own api from the convai tab before building the game itself, am I right? And what is the string variable for api to let players put their own apis?
You’re correct. If you want players to use their own API keys, you should remove your own key before building.
You can check this script for the API key logic:
Assets/Convai/Scripts/Runtime/Utils/ConvaiAPIKeySetup.cs
And the key itself is stored in this Scriptable Object:
Assets/Resources/ConvaiAPIKey.asset
You can directly access and update this at runtime to let players enter their own API keys.
Oh wow, thanks!