Create a secret set
Updated
Creates a named set of secrets in your project.
Preview documentation
https://preview.ai.agora.io/conversational-ai/v1/projects/{appid}/secretsUse secret sets to keep provider API keys out of your agent configurations. To use a secret, pass $secrets.<set_name>.<key> in an agent's credential.fields, for example in credential.fields.api_key. Agora resolves references when each session starts.
If a set with the same name exists, the request fails with SecretSetAlreadyExists. To change values, update the set or set a key.
appidstringThe App ID of your project.
namestringA name for the secret set, unique in the project. Use 1 to 64 characters from A-Z, a-z, 0-9, and _. Names are case-sensitive.
secretsobjectThe secrets, as key-value pairs. Each key is 1 to 64 characters from A-Z, a-z, 0-9, and _, and must be unique within the set. Values are write-only and are never returned. A set can hold at most 64 KiB, measured as the UTF-8 size of its keys and values encoded as a JSON object. A larger set is rejected with 400.
[key: string]stringResponse Body
The secret set was created. The response body lists its keys.
Response Headers
namestringThe name of the secret set.
keysarray<string>The names of the keys in the set. Values are never returned.
create_tsintegerThe time the set was created, as a Unix timestamp in seconds.
update_tsintegerThe time the set was last updated, as a Unix timestamp in seconds.
Request examples
curl -X POST 'https://preview.ai.agora.io/conversational-ai/v1/projects/string/secrets' \ -H 'Content-Type: application/json' \ -d '{ "name": "support_prod", "secrets": { "asr": "<your_asr_api_key>", "llm": "<your_llm_api_key>", "tts": "<your_tts_api_key>" }}'Response example
{ "name": "support_prod", "keys": [ "asr", "llm", "tts" ], "create_ts": 1789898400, "update_ts": 1789898400}