A
?
← Handbook

Content library

An ever-growing reference pool of real creative — ads and organic — that the system tags automatically and learns from. Status: designed, not built.

The point is not to train a model. It is to accumulate a large, well-tagged body of real work so that generation has genuine exemplars to reason from instead of producing from first principles every time. Quality here compounds: the library is worth more at ten thousand items than at ten.

The binding constraint is cost

High volume is the whole point, so per-item cost decides whether this is viable. The design is therefore mostly about not calling a model.

1. Deduplicate before anything. Perceptual hash on stills, and on a keyframe for video. The same creative arrives repeatedly from different sources; it is analysed once, ever.

2. Extract everything free first. Most static ads are largely text. OCR costs nothing and gives the copy verbatim. For video, ffmpeg gives keyframes at scene changes and the audio track; captions and transcripts come from the platform where present. None of this needs a model.

3. Downscale before any vision call. Vision cost scales with resolution, and format recognition does not need full resolution — the longest edge at ~512px is ample. This alone is a large multiple on cost.

4. Classify against a closed vocabulary. The 42-format catalogue and a fixed attribute set, not open-ended description. Output tokens are where spend concentrates, and choosing from a known list keeps them small.

5. Use the cheap model. Haiku for tagging. This is recognition, not judgment — the expensive model belongs in synthesis, not in a pipeline that runs thousands of times.

6. Batch. A library is not latency-sensitive, so the Batch API's discount applies with no downside.

Rough expectation on that shape: order of $1 per thousand statics, with video meaningfully higher because of frames plus transcript. To be measured rather than trusted — the ingest cost estimate was out by ten times when it was finally measured.

What gets extracted

Tagging is only as useful as the questions it answers. For each item:

Formatwhich of the catalogue, or none-of-these
Claim typeproof, offer, problem, comparison, authority, curiosity
Awarenesswho it is pitched at
Hook mechanismhow the first second or first line earns attention
Visual devicewhat the imagery is doing, and why that choice
Text weighthow much of the work the words do
Industry and marketso retrieval can stay in-sector and in-locale

none-of-these is a feature. When the tagger repeatedly cannot place something, that is a format the catalogue is missing — and proposing it is how the library teaches the system rather than merely storing things. creative_formats already carries proposed_by and rationale for exactly this.

For video, the transcript gives the script and the keyframes give the visual hooks. Both matter: knowing what was said without knowing what was shown misses half of why it worked.

How it makes creative better

Three routes, in increasing value:

  1. Retrieval at generation. Pull the most relevant references for this insight, format and industry, and put them in context as exemplars. This is the immediate win.
  2. Format discovery. Unplaceable items become proposed formats, so the catalogue grows from what is actually running rather than from a list someone wrote once.
  3. Performance weighting. Once ad results flow in, references that demonstrably worked outweigh references that merely exist. Until then the library is inspiration, not evidence — and should say so rather than implying authority it has not earned.

Sourcing — honestly

Alex wants real ads that are actually running, ideally Singapore, and explicitly not the output of generic AI ad tools.

  • Manual upload is the reliable baseline and should be built first, because it works regardless of what any third party permits. Drag in what the team finds; the pipeline does the rest.
  • Meta Ad Library shows commercial ads publicly, but programmatic bulk access is materially narrower than the public UI suggests and varies by region and ad category. To be verified before it is promised, not assumed.
  • TikTok Creative Center publishes top-performing ads by region, including Singapore, and is free.
  • Paid swipe-file tools exist for precisely this and some expose APIs. Worth pricing against the labour they replace.

Build the pipeline against manual upload first. Every source added afterwards is then a feeder into something that already works, rather than a dependency the whole feature waits on.