Environment Variables
This page lists only the settings meaningful to external developers — the ones you can set in your own service that actually change behaviour. Platform-internal service configuration (database connections, object storage credentials, model keys) is not listed; Profy operates those and you neither see nor need them.SDK configuration
Auth and address
Resolution order puts constructor arguments ahead of environment variables:
PROFY_API_KEY raises at construction rather than degrading to anonymous:
A trailing slash on
PROFY_BASE_URL is stripped automatically, so https://api.profy.cn/ and https://api.profy.cn behave identically. For private deployments or local development this is the only setting you change; nothing else in the SDK differs.OAuth applications
Third-party apps acting on behalf of many Profy users use application credentials rather than an API key:
Missing either one raises:
events:write.
Deliberately not environment variables
A few settings are intentionally excluded, and the reasons matter:End-user identity is the one most often misread. It looks “fixed per deployment,” but one API key fronting many users is the normal case — so it has to vary per request, and an environment variable would freeze it. A single-user script can set
end_user_id once on the client; a server-side integration passes it per call.Proxies and networking
The SDK’s internal HTTP client setstrust_env=False explicitly, which means:
HTTP_PROXY/HTTPS_PROXY/ALL_PROXYare not readNO_PROXYlikewise has no effect- System CA bundles and
.netrcdo not participate
MCP integration
The remote MCP server needs no environment variables at all — only a config file:.mcp.json
Full example
Boundaries and failure modes
The fourth row is especially common: many
.env loaders inject variables at import time, after a module-level client has already been constructed. Create clients inside a function rather than at module top level.Verify your configuration
Related pages
Authentication
API keys versus OAuth
Endpoint Reference
Every
/v1/* endpointError Codes
Codes returned by configuration errors
MCP Tools
IDE integration
Verified 2026-08-11. Sources:
sdk/python/profy/client.py (DEFAULT_BASE_URL, _DEFAULT_TIMEOUT, trust_env=False, _end_user_headers), sdk/python/profy/app.py (PROFY_APP_ID / PROFY_APP_SECRET / DEFAULT_SCOPE), services/core/src/routes/platform-api/caller.ts (end-user header gate).
