> For the complete documentation index, see [llms.txt](https://developer.nexx360.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.nexx360.io/miscellaneous/prebid-video-cache.md).

# Prebid Video Cache

Nexx360 operates a hosted, [Prebid Cache](https://github.com/prebid/prebid-cache)-compatible service that stores winning VAST creatives at auction time and serves them back to video players via a short URL. The public endpoint is `https://fast.nexx360.io/pb/cache`.

It is a drop-in replacement for the legacy AppNexus Prebid Cache (`https://prebid.adnxs.com/pbc/v1/cache`) — only the `cache.url` value in your Prebid.js configuration changes.

## Why a video cache?

Most ad servers (Google Ad Manager in particular) and most video players accept a VAST **URL**, not raw VAST XML. Header bidding produces VAST creatives at auction time, so Prebid.js needs somewhere addressable to park them before passing a reference to the ad server.

The end-to-end flow:

1. A bidder returns a VAST XML payload to Prebid.js.
2. Prebid.js `POST`s the VAST to `https://fast.nexx360.io/pb/cache` and receives a UUID.
3. The UUID is written into GAM key-values (`hb_uuid`, `hb_cache_id`, `hb_cache_host`, `hb_cache_path`).
4. The GAM video creative builds a cache URL (`https://fast.nexx360.io/pb/cache/XXXX?uuid=…`) and serves it to the player.
5. The player issues a `GET` on the cache URL to retrieve the VAST XML and start playback.

See the [Prebid video overview](https://docs.prebid.org/prebid-video/video-overview.html) for the canonical explanation.

{% hint style="info" %}
If a bidder caches its own creative and returns `bidResponse.videoCacheKey`, Prebid skips the cache step for that bid. The cache is only used for bidders that hand back raw VAST.
{% endhint %}

## Configure Prebid.js

Set the cache URL in `pbjs.setConfig`:

```javascript
pbjs.setConfig({
    cache: {
        url: 'https://fast.nexx360.io/pb/cache/XXXX'
    }
});
```

Replace `XXXX` with your Nexx360 account ID.

{% hint style="info" %}
Pass your account ID as a **path segment** (`/pb/cache/XXXX`), not as a query parameter. Prebid.js appends `?uuid=…` to `cache.url` when it builds the retrieval URL, so a query-string form such as `?account_id=XXXX` would produce an invalid double-query URL (`…?account_id=XXXX?uuid=…`). The path form keeps the appended `?uuid=…` valid.

`account_id` is a tagging convention used for log correlation across the Nexx360 stack. The cache service itself does not validate it, but you should still include it so support can trace your traffic.
{% endhint %}

Other useful options on the `cache` config object:

| Option                 | Description                                                                       |
| ---------------------- | --------------------------------------------------------------------------------- |
| `ignoreBidderCacheKey` | Force re-wrapping of bidder-supplied keys so every VAST sits behind one cache URL |
| `useLocal`             | Store VAST as a browser blob instead of calling the remote cache                  |
| `batchSize`            | Batch multiple puts into a single POST                                            |
| `batchTimeout`         | Maximum wait time in ms before flushing a batch                                   |
| `timeout`              | Request timeout in ms                                                             |

Full reference: [Prebid.js `setConfig`](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-vast-cache).

## Retrieving cached VAST in GAM creatives

The cache URL pattern used in GAM creatives (`hb_cache_host` + `hb_cache_path` + `hb_cache_id`) is documented in the GAM setup pages alongside the full creative snippet:

{% content-ref url="/pages/qK2DpS7MrAHHnXkMq8i6" %}
[Google Ad Manager Setup](/integration-methods/direct-inapp-sdkless/google-ad-manager-setup.md)
{% endcontent-ref %}

For questions about cache configuration or migration from AppNexus, contact <tech@nexx360.io>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nexx360.io/miscellaneous/prebid-video-cache.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
