Connection & Authentication
Setup workflows for connecting to managed Reflexio Enterprise and a self-hosted open-source server.
Connection & Authentication
Setup workflows for the two supported deployment modes: Managed Reflexio Enterprise (hosted at https://www.reflexio.ai) and self-hosted open source (the FastAPI server you run yourself). For initialization details, see the Client Initialization Reference.
Managed Enterprise Authentication
Enterprise
API key authentication and the hosted endpoint at https://www.reflexio.ai require a Reflexio Enterprise account.
Managed Enterprise is invite-gated. Join the waitlist first; after approval, use the invitation email and invitation code to create your account. Then create your first API key from the Account page in the web portal — new accounts do not come with one. API keys are shown only once at creation time, so store the value securely; afterward the portal displays only the saved prefix, which you use to identify and delete old keys.

Environment Variable (Recommended)
import reflexio
# export REFLEXIO_API_KEY="your-api-key"
client = reflexio.ReflexioClient()
response = client.whoami()
print("Client connected to Enterprise")curl -X GET "${REFLEXIO_URL:-https://www.reflexio.ai}/api/whoami" \
-H "User-Agent: my-agent-reflexio" \
-H "Authorization: Bearer $REFLEXIO_API_KEY"Direct API Key
import reflexio
client = reflexio.ReflexioClient(api_key="your-api-key")Local / Self-Hosted
Direct URL
import reflexio
client = reflexio.ReflexioClient(url_endpoint="http://localhost:8081")
response = client.get_config()
print("Client connected to local server")curl -X GET "http://localhost:8081/api/get_config" \
-H "User-Agent: my-agent-reflexio" \
-H "Authorization: Bearer $REFLEXIO_API_KEY"Environment Variable
import reflexio
# export REFLEXIO_URL="http://localhost:8081"
client = reflexio.ReflexioClient()
response = client.get_config()
print("Client connected via environment variable")curl -X GET "${REFLEXIO_URL:-https://www.reflexio.ai}/api/get_config" \
-H "User-Agent: my-agent-reflexio" \
-H "Authorization: Bearer $REFLEXIO_API_KEY"