module aixplain.factories.api_key_factory
class APIKeyFactory
classmethod create
create(
name: str,
budget: int,
global_limits: Union[Dict, APIKeyLimits],
asset_limits: List[Union[Dict, APIKeyLimits]],
expires_at: datetime
) → APIKey
Create a new API key
classmethod get
get(api_key: str) → APIKey
Get an API key
classmethod get_usage_limits
get_usage_limits(
api_key: str = 'd0d1ea8a13cfe80dbb34378c3941e5df13d724e1059fa065d1a802dacd4ade15',
asset_id: Optional[str] = None
) → List[APIKeyUsageLimit]
Get API key usage limits
classmethod list
list() → List[APIKey]
List all API keys
classmethod update
update(api_key: APIKey) → APIKey
Update an existing API key