> ## Documentation Index
> Fetch the complete documentation index at: https://jdev-e8db0569.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# initialize()

> Initialize the SEON SDK with your configuration.

Initializes the SEON SDK with the provided configuration. Must be called before [`startVerification()`](/api-reference/start-verification). The SDK remains initialized until [`dispose()`](/api-reference/dispose) is called.

## Signature

```dart theme={null}
// On SeonOrchestration
static Future<void> initialize(SeonConfig config)
```

## Parameters

<ParamField body="config" type="SeonConfig" required>
  Configuration object for the SEON SDK. See [SeonConfig](/api-reference/types#seonconfig) for full details.

  <Expandable title="SeonConfig properties">
    <ParamField body="baseUrl" type="String" required>
      The base URL for your SEON API endpoint. Use the URL for your region: `https://api.seon.io/orchestration-api` (EU), `https://api.us-east-1-main.seon.io/orchestration-api` (US), or `https://api.ap-southeast-1-main.seon.io/orchestration-api` (APAC).
    </ParamField>

    <ParamField body="token" type="String" required>
      Session token provided by your backend for this verification session.
    </ParamField>

    <ParamField body="language" type="String?">
      Language code for the SDK UI (e.g., `'en'`, `'es'`, `'de'`). Defaults to device language.
    </ParamField>

    <ParamField body="theme" type="Map<String, dynamic>?">
      Theme configuration map for UI customization (colors, fonts). Automatically JSON-encoded before passing to the native SDK. See [Theme Configuration](/api-reference/types#theme-configuration) for the full schema. Omit to use the default theme.
    </ParamField>
  </Expandable>
</ParamField>

## Returns

`Future<void>` — Completes when initialization is successful.

## Errors

Throws `SeonException` on failure.

| Error Code                            | Raw String                | Description                                                 |
| ------------------------------------- | ------------------------- | ----------------------------------------------------------- |
| `SeonErrorCode.eInitializationFailed` | `E_INITIALIZATION_FAILED` | SDK initialization failed. Check your configuration values. |
| `SeonErrorCode.eInvalidArgs`          | `E_INVALID_ARGS`          | Missing required `baseUrl` or `token` arguments.            |

## Example

```dart theme={null}
import 'package:seon_orchestration_flutter/seon_orchestration_flutter.dart';

try {
  await SeonOrchestration.initialize(const SeonConfig(
    baseUrl: 'https://api.seon.io/orchestration-api', // EU region
    token: 'your-session-token',
    language: 'en',
  ));
  print('SEON SDK initialized');
} on SeonException catch (e) {
  print('Initialization failed: $e');
}
```

## Platform Behavior

<Tabs>
  <Tab title="iOS">
    * SDK is initialized with configuration and holds state in a Swift singleton (`SeonOrchestrationImpl`)
    * All calls are dispatched to the main thread automatically
  </Tab>

  <Tab title="Android">
    * Configuration is passed directly to `OrchestrationService.instance.initialize()` in the Kotlin plugin
    * Activity lifecycle ensures operations run on the UI thread
  </Tab>
</Tabs>
