> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interactivelayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integration recipes

> Test live HLS, VOD batch analysis, AdRouter and contextual ad delivery with publisher test inventory.

## Publish signals on a live HLS feed

1. Choose an approved HTTPS test feed with `EXT-X-PROGRAM-DATE-TIME` and a known ad break. With a key that has `sources:read` and `sources:write`, call `POST /v1/sources` with the body below. Replace the sample URL with your origin.
2. Poll `GET /v1/sources/{source_id}` until live. Read `output_hls_url` from the response with the receiving player or stitcher. Treat the URL as a secret when the stream is private.
3. At the known break, compare the output with the original playlist. Check that the media segment URIs are unchanged and that the `com.interactivelayers.signal` date range aligns with program time. Compare its campaign IDs and safety status with `GET /v1/sources/{source_id}/signals`.
4. Stop the test source with `DELETE /v1/sources/{source_id}`.

```json theme={null}
{
  "name": "Test channel",
  "hls_url": "https://media.publisher.example/live.m3u8",
  "mode": "signal",
  "marker_profile": "interactivelayers_cue",
  "break_mode": "origin",
  "output_delay_seconds": 30
}
```

[Live sources](https://docs.interactivelayers.com/realtime.md) · [HLS marker contract](https://docs.interactivelayers.com/markers.md)

## Analyze a VOD asset and verify safety evidence

1. In **Settings → Batch processing**, set up a connection and import a short clip with a known sensitive passage and another with ordinary content. Validate and read the connection status until ready. Select an enabled analysis profile and a policy compatible with its modalities. Choose an audiovisual profile when the policy requires video evidence.
2. From the backend, send `POST /v1/processing-batches` using a scoped Content API Bearer key. Include `Idempotency-Key` and the fields below. Replace the sample IDs. Choose a seconds budget that covers both clips. If a transport failure requires a retry, keep the key and body identical.
3. Follow the returned `Location` after HTTP 202. Check `/items`, then `/results` under the batch resource. Compare segment spans, `safety_assessments`, and coverage against the known passages. Treat `uncertain` or `not_evaluated` as insufficient evidence when checking ad eligibility. If specific items fail, use `POST /v1/processing-batches/{batch_id}/retry-failed`.

```json theme={null}
{
  "connection_id": "con_example01",
  "selection": {"asset_ids": ["ast_example_one", "ast_example_two"]},
  "analysis_profile": "context_av_v1",
  "safety_policy_id": "pol_example01",
  "max_input_seconds": 600
}
```

[Content Safety](https://docs.interactivelayers.com/content-safety.md) · [Batch workflow and evidence](https://github.com/InteractiveLayers/IL-Context-Engine/blob/efd3d7950fce6414e195aff31b52201431851d27/docs/content/README.md)

## Choose the integration with the wizard

1. In **Settings → General**, select **Set up with help** and answer the five questions. Answer **What can you change in your player?** as it really is: it decides what is possible.
2. Read the recommendation and the status of each format: **Available**, **Missing in IL** or **Not compatible**, with the reason. If you see a better option under **What you should change**, select **See how it looks** to compare.
3. Review **What will change** and select **Save this setup**. Campaigns, tags and ad servers in Delivery stay as they are.
4. Follow **Next step**. With ILPlayer and ads, select **Try with real ads** in the ILPlayer preview; the embed code with ads cannot be generated yet. With a web player, install the IL SDK and follow [Product with a Buy button](https://docs.interactivelayers.com/player-sdk.md#product-with-a-buy-button).

[Set up Delivery with help](https://docs.interactivelayers.com/ad-providers.md#set-up-delivery-with-help) · [ILPlayer](https://docs.interactivelayers.com/il-player.md)

## Simulate an AdRouter placement

1. In **Settings → Adservers**, connect a test ad account with compatible video inventory. In **Settings → General → Choose the integration manually**, choose **Apps and TV** or **Player with a VAST URL**. In **Settings → AdRouter**, select **Turn AdRouter on** and confirm, choose an option in **How it picks the ad server** and add the **Content exceptions** you want to test.
2. Simulate two moments with known evidence, one eligible and one blocked. For an API simulation, use `POST /v1/adrouter/routers/{router_id}/simulate` with `asset_id`, `asset_version` and `cue_seconds`, or the stream, epoch and break identifiers for live evidence. Review the simulated destination and exclusions.
3. Publish against the expected revision, attach the tag or SDK path to test inventory, and run an actual playback. Compare the saved decisions and observed impressions with the provider report. Simulation checks routing and the playback checks delivery.

[AdRouter](https://docs.interactivelayers.com/adrouter.md) · [Validation matrix](https://github.com/InteractiveLayers/IL-Context-Engine/blob/efd3d7950fce6414e195aff31b52201431851d27/docs/validation/adrouter.md)

## Ask iADServer first and Google Ad Manager if there is none

1. In **Settings → Adservers**, connect iADServer and Google Ad Manager. In **Settings → General → Choose the integration manually**, choose **ILPlayer**, **My own player** or **Apps and TV**. Check that AdRouter is off in **Settings → AdRouter**.
2. In **At the breaks**, choose iADServer as **First**, with **Contextual** or **Common**. For ILPlayer or the IL SDK, choose its **iADServer video tag** and link the video in the iADServer portal. Then select **+ Add another, in case there is none**, choose Google Ad Manager and **Common**. Do the same in **Before the video** with common steps. Set **Mid-roll every (minutes)** for ILPlayer and the IL SDK, and select **Save**.
3. With ILPlayer or the IL SDK, play a video that has an ad plan. With the SDK, `onEvent` receives `break_request` with `provider: "iadserver"` and `attempt: 1`; if iADServer returns no ad, `break_no_fill` and then `break_request` with `provider: "gam"` and `attempt: 2`.
4. With the IL API, create a playback without a provider or profile and check `"routing": "steps"`. At a break, `/request` answers `step: 0` with `provider: "iadserver"`. Pass its `ad_tag_url` to the player. If it returns no ad, call `/next` with `{"after_step": 0}` and play the Google Ad Manager tag. A further `/next` with `{"after_step": 1}` answers `steps_exhausted`.
5. Repeat with a video that is not linked in iADServer, or with a line that cannot deliver. Expect the Google Ad Manager ad, or the content to continue after about 8 seconds if neither returns an ad.

[Advertising providers](https://docs.interactivelayers.com/ad-providers.md) · [VOD playback](https://docs.interactivelayers.com/vod-operations.md) · [Player SDK](https://docs.interactivelayers.com/player-sdk.md)

## Check delivery and no-fill

1. In **Project Settings → Delivery**, choose the placement and formats for the integration you are testing. For a VOD linear ad, request the break through the playback API and pass the eligible `ad_tag_url` to your VAST/IMA integration. For a graphical cue, attach the player adapter and supply the HLS signal or session feed supported by the integration.
2. Play an eligible opportunity with a known compatible creative. Record the break and cue IDs, provider response, actual display or spot start, and impression event. For a graphical cue, confirm that it disappears at the expected playhead time and that normal layout resumes.
3. Repeat with empty VAST or an incompatible creative. Expect program playback to continue. An excluded or no-fill opportunity should produce no new ad impression. Also confirm that a stale cue does not appear after a seek or session change.
4. Keep the provider report, player observation and any dry-run result identifiable. A successful preview or an HTTP 200 with empty VAST does not establish delivery.

[VOD playback](https://docs.interactivelayers.com/vod-operations.md) · [Player SDK](https://docs.interactivelayers.com/player-sdk.md) · [Te Informás delivery evidence](https://github.com/InteractiveLayers/IL-Context-Engine/blob/efd3d7950fce6414e195aff31b52201431851d27/demos/teinformas/README.md)

## Play the three Office Hours campaigns

1. In **Settings → Adservers**, connect the test GAM network. Create separate inventory for the video break and the display overlay. Ingest the complete videos and review the scene analysis and the publisher's Content Safety decision.
2. In **GAM → Inventory → Key-values**, add `il_oh=1`, `il_scene_topic=robotics`, and `il_suitability=eligible`. In **Delivery → Orders**, open the **300×250** House display line item and require all three values under **Custom targeting** alongside the test display ad unit. GPT sends the signals for the approved scene. [Create GAM key-values](https://support.google.com/admanager/answer/9796369?hl=en)
3. Open **Elephants Dream** in the Te Informás demo and select **Ir antes del mid-roll**. Check that the GAM video ad starts around 5:29, then check that the film resumes. Open **Tears of Steel** and play **Escena neutra** before **Escena aprobada**. The approved robotics scene allows the GAM display request and the overlay closes as the scene ends.
4. In **iADServer → Delivery → Orders → Edit → Campaign context**, select **Enable contextual profile**. Describe the desired scene in **Campaign brief**, select **Scene topic**, and select the **InteractiveLayers integration** that analyzed the video. Add **Travel (653)** under **Included IAB categories** and set the brand's **Excluded IAB categories**. Save the order and test **Sintel** in **Simulate**. At 168 seconds, the category scores 0.81 and clears the 0.70 threshold. At 174 seconds, it scores 0.64 and the topic “viajes” accounts for the match with 0.87. Leave **Topics** empty in a QA copy to test IAB on its own. Check content safety and the line item before setting a **Fixed video and cue** tag.
5. Link **Sintel** and a contextual banner tag in an iADServer test network. Enable **Shopify Shopping** on a campaign for an advertiser that has connected its development store and approved the products. Check the variant handoff to checkout in the browser. On TV, select a variant with the remote and scan the QR code to complete the test checkout on a phone.

[Te Informás demo](https://demo.teinformas.com/office-hours/index.html) · [Player SDK](https://docs.interactivelayers.com/player-sdk.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.