Skip to main content

Enabling & Configuring

ExpressAI needs two brand-specific values before it can be used:

KeyDescription
origin_idThe allow-listed origin identifier for your brand. It is sent as the x-origin-id header on every ExpressAI request.
attestation_root_ca_pemThe ExpressAI root CA (PEM). The SDK verifies the enclave attestation against this certificate before sending any prompt.

Both values are provisioned per brand — request them from the CoreServices team. They are deployment configuration, not user secrets, but treat them like the rest of your tenant configuration: keep them in your config delivery mechanism, and never copy real values into documentation or public repositories.

If ExpressAI is not configured, startChatCompletion and fetchChatCredits fail with an InvalidConfiguration error ("missing express_ai config block").

Via the configuration YAML​

Add the express_ai block to the YAML you already pass to Configuration.loadFromYaml:

express_ai:
origin_id: "<your-allow-listed-origin-id>"
attestation_root_ca_pem: |
-----BEGIN CERTIFICATE-----
<provided by the CoreServices team>
-----END CERTIFICATE-----

The API endpoint has a built-in production default. It can be overridden — e.g. to point a QA build at staging — via the usual domains block:

domains:
express_ai_api_domain: "<staging endpoint URL>"

Programmatically​

The same configuration can be applied at runtime on the Configuration object. The PEM is validated on set; an invalid or empty certificate is rejected with a configuration error.

let config = sdkManager.getConfiguration()

try config.setExpressAiConfig(config: ExpressAiConfigInput(
originId: originId,
attestationRootCaPem: attestationRootCaPem
))

// Optional: point at a different environment
try config.setExpressAiApiDomain(url: expressAiApiDomain)

// Clear the configuration (disables ExpressAI calls)
try config.setExpressAiConfig(config: nil)

Licensing​

Access to the module itself is gated by the SDK license: sdkManager.expressAi() validates the ExpressAI license category and throws if your license does not include it. There is nothing to configure here — if you believe your brand should have access, contact the CoreServices team.