Skip to main content
VRINEnterpriseClient extends VRINClient with enterprise portal management methods. All standard methods (query, insert, upload, conversations) are inherited and work identically.

Constructor

from vrin import VRINEnterpriseClient

client = VRINEnterpriseClient(api_key="vrin_ent_your_key")
The API key must start with vrin_ent_. A ValueError is raised otherwise.

Parameters

Same as VRINClientapi_key, timeout, max_retries.

Auto-detection

If you handle both standard and enterprise keys, use the factory helper:
from vrin import get_enterprise_client

# Returns VRINEnterpriseClient for vrin_ent_* keys, VRINClient otherwise
client = get_enterprise_client(api_key=my_key)

Portal methods

get_organization()

Get organization details.
org = client.get_organization()
print(org["name"])
print(org["stytch_organization_id"])

list_users()

List users in the enterprise organization.
users = client.list_users()
for user in users.get("users", []):
    print(f"{user['email']} -- {user.get('role', 'member')}")

list_enterprise_api_keys()

List enterprise API keys for the organization.
keys = client.list_enterprise_api_keys()

create_enterprise_api_key()

Create a new enterprise API key.
new_key = client.create_enterprise_api_key(name="Production")

get_configuration()

Get the enterprise infrastructure configuration.
config = client.get_configuration()
print(config.get("database"))      # Neptune config
print(config.get("vector_store"))  # OpenSearch config
print(config.get("storage"))       # S3 config

save_configuration()

Save or update the infrastructure configuration.
client.save_configuration({
    "database": {
        "provider": "neptune",
        "endpoint": "your-neptune-cluster.us-east-1.neptune.amazonaws.com",
        "port": 8182
    },
    "vector_store": {
        "provider": "opensearch",
        "endpoint": "https://your-opensearch-domain.us-east-1.es.amazonaws.com"
    },
    "storage": {
        "provider": "s3",
        "bucket": "your-vrin-documents-bucket"
    },
    "iam": {
        "role_arn": "arn:aws:iam::123456789012:role/VRINDataAccessRole",
        "external_id": "your-external-id"
    }
})

validate_connectivity()

Test connectivity to all configured enterprise infrastructure services.
result = client.validate_connectivity()
print(result)
# {
#   "neptune": {"status": "connected", "latency_ms": 45},
#   "opensearch": {"status": "connected", "latency_ms": 30},
#   "s3": {"status": "connected"},
#   "bedrock": {"status": "connected"}
# }
Run this after saving configuration to verify everything is reachable.

Full example

from vrin import VRINEnterpriseClient

client = VRINEnterpriseClient(api_key="vrin_ent_abc123")

# Verify infrastructure
connectivity = client.validate_connectivity()
assert all(
    svc["status"] == "connected"
    for svc in connectivity.values()
)

# Standard operations -- routed to your infrastructure
client.insert(
    "Q4 revenue was $50M, up 23% YoY.",
    title="Q4 Earnings"
)

result = client.query("What was Q4 revenue?")
print(result["summary"])

# Upload files to your S3 bucket
client.upload_file("confidential_report.pdf")