Configuration reference

The reference below documents the released constructor and payload fields that are safe to explain publicly today.

CslClientOptions

Released package surface

Every SDK HTTP request sends x-csl-wrapper-version: <wrapper_version>. decisionDelivery defaults to "auto", and timing values are clamped to safe ranges.

FieldTypeRequiredDefaultDescription
baseUrlstringyesnoneBase CSL URL. A trailing slash is normalized away.
getApiKey() => string | Promise<string>yesnoneFunction called immediately before each SDK HTTP request to resolve the bearer token.
decisionDelivery"auto" | "websocket" | "polling" | "callback"no"auto"Decision delivery strategy for the client.
options.timeout_msnumberno2000Base request timeout. Values are clamped to the documented safe range.
options.decision_timeout_msnumberno30000Decision wait budget. Values are clamped to the documented safe range.
options.long_poll_wait_msnumberno1500Long-poll wait_ms used by decision reads.
options.short_poll_interval_msnumberno250Short-poll interval used after long-poll attempts are exhausted.
options.onError(error: CslSdkError) => voidnononeObservation hook for structured SDK errors surfaced through onError rather than thrown as hard failures.
options.wrapper_versionstringno"sdk"Optional wrapper version label. Sent as x-csl-wrapper-version on every SDK request.

JobRequest

Released public types

Prompt text must resolve to non-empty content and slots_requested must be an integer >= 1. When decisionDelivery: "callback" is used without callback_url, createJob() returns null and onError receives CslSdkError with code sdk_internal.

FieldTypeRequiredDefaultDescription
job_typestringyesnoneApp job type.
model_idstringyesnoneModel identifier for the job.
localestringyesnoneApp locale.
predicted_latency_msnumbernononeOptional latency hint.
client_idstringnoruntime-derived if omittedOptional client id.
chat_session_idstringnononeOptional chat session id.
consentConsentFlagsyesnoneConsent flags for the app.
prompt{ text: string; token_count_estimate?: number } | stringyesnonePrompt payload. Sent to the CSL for topic extraction. The data firewall reduces this to an abstract category and language before any signal reaches the ad market. Raw text is never forwarded.
slots_requestednumberyesnoneNumber of requested slots.
ssp_partner_idstringnononeLegacy single-partner selector for advanced routing cases.
routing.preferred_partner_idstringnononePreferred routing hint for new integrations.
routing.candidate_partner_idsstring[]nononeOptional routing hint list for candidate partners.
callback_urlstringnononeCallback target for callback delivery.

GenerationRequest

Released public types

FieldTypeRequiredDefaultDescription
generation_idstringnononeIdentifier for the model generation.
model_idstringnononeReported model identifier.
usage_jsonunknownnononeUsage payload for finished or failed.
errorstringnononeFailure detail for the failed path.

BeaconRequest

Released public types

FieldTypeRequiredDefaultDescription
beacon_idstringyesnoneIdempotency input for the beacon.
asset_tokenstringyesnoneAsset authenticator for fill beacons.
beacon_type"rendered" | "visible_started" | "visible_ended" | "heartbeat" | "play_started" | "play_completed" | "clicked"yesnoneBeacon type for render, visibility, playback, or click events.
occurred_at_ms_clientnumberyesnoneClient timestamp for the event.
measurementsRecord<string, unknown>nononeOptional measurements bag.

Ask about integration

Ask about integration

Start with Node direct for the recommended production-ready integration path.