Secret profiles¶
A secret profile stores one secret, typically an API key for a model provider,
encrypted on the platform. You create it once and from then on refer to it by
its profile_id. Later stages take a profile ID rather than the key itself:
AutoGraph asks for one profile for the chat model and one for the embedding
model. The key never leaves the platform again.
The secret profiles area is the secret_profile namespace on the client:
profile = client.secret_profile.create(name="openai-prod", secret="sk-...", provider="openai")
print(profile.profile_id)
Available operations¶
Operation |
Status |
Page |
|---|---|---|
Create a secret profile |
Available |
|
Get a secret profile by ID |
Available |
|
List, update or delete a secret profile |
Not yet available |
Arrives in a later release. |
The returned profile¶
Operations that return a profile return a
Profile with these attributes:
profile_idThe ID later stages use to refer to the secret. This is the value to keep.
nameThe name you gave the profile.
profile_typeA
ProfileType.ProfileType.LLMfor model provider keys, which is the default at creation.descriptionThe description, or
Noneif none was given.metadataNon-sensitive key-value pairs the platform keeps with the profile. The
provideryou passed at creation is stored here.secret_dataNever the secret itself. The platform returns an obfuscated copy that keeps the first two and the last two characters and replaces the rest with dots, so you can recognise a key without exposing it.
version,created_at,updated_atBookkeeping set by the platform.
Note
The secret is sent exactly once, in the create call. It is never logged by the SDK and never appears in an exception message.