Configure the API key
Enter your Convai API key in the SDK settings to authenticate your project and enable character communication.
Last updated
Was this helpful?
Enter your Convai API key in the SDK settings to authenticate your project and enable character communication.
The Convai SDK for Unity authenticates every session using an API key tied to your Convai account. You enter this key once in the Unity Editor — it is stored in your project and used automatically at runtime.
Log in to your Convai dashboard at convai.com, navigate to Account Settings, and copy your API key.
Assets/Resources/ConvaiSettings.asset stores the API key in plain text. If your project uses source control, decide whether to commit this file based on your team's security policy.
The SDK reads the key from ConvaiSettings via the ICredentialProvider interface before initiating any connection to Convai. You do not need to pass the key manually in code — the SDK resolves it automatically on startup.
For production deployments where storing the key in source control is not acceptable, implement a custom ICredentialProvider that reads the key from a secure source.
With your API key in place, import a sample scene to verify the SDK is working before you build your own scene.
Import and run sample scenesLast updated
Was this helpful?
Was this helpful?