AI Provider Keys
Provider keys hold your upstream vendor credentials (OpenAI, Anthropic, etc.). Create a key here, then link it to a model so inference calls authenticate.
Access it as client.ai.provider_keys on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Quick start
from strongly import Strongly
client = Strongly()
# List (auto-paginates as you iterate) # filters: provider, status, search
for ai in client.ai.provider_keys.list():
print(ai.id)
Methods
Core
list
list(*, provider: str | None = None, status: str | None = None, search: str | None = None, limit: int | None = None) -> SyncPaginator[ProviderKey]
List provider API keys with pagination and filtering.
Parameters
provider(str | None, optional): Filter by provider name.status(str | None, optional): Filter by status ("active"or"inactive").search(str | None, optional): Search by name, description, or provider.limit(int | None, optional): Maximum number of items to return (default: all matching items).
create
create(*, name: str, provider: str, api_key: str, description: str | None = None, provider_organization: str | None = None) -> ProviderKey
Create a new provider API key.
Parameters
name(str): Human-readable name for the key.provider(str): Provider this key authenticates against.api_key(str): The provider's secret API key.description(str | None, optional): Optional description.provider_organization(str | None, optional): Optional provider-side organization id.
retrieve
retrieve(key_id: str) -> ProviderKey
Get a single provider API key by ID.
update
update(key_id: str, *, name: str | None = None, description: str | None = None, api_key: str | None = None, provider_organization: str | None = None) -> ProviderKey
Update a provider API key.
delete
delete(key_id: str) -> None
Delete a provider API key.
Other
test
test(key_id: str) -> ProviderKeyTestResult
Test a provider API key to verify it works.