Skip to main content
Performs the one-time setup that must run before any other SDK call. initialize() resolves the Synap API key (from the api_key= constructor kwarg first, then the SYNAP_API_KEY environment variable), establishes the authenticated client identity, sets up the optional local cache, and starts the telemetry collector. Calling it a second time on the same SDK instance is a safe no-op.

Parameters

This method takes no parameters.

Returns

Returns None.

Example

Raises

  • AuthenticationError: when no API key is supplied (neither api_key= nor SYNAP_API_KEY), the key is rejected by the platform, or credential loading otherwise fails.
See Error Codes for the full SDK exception hierarchy.

See also

  • configure: adjust SDK-wide options before initialize().
  • shutdown: flush telemetry and release resources on exit.
  • fetch: the recommended cross-scope context entry point.