Skip to main content
Agents put your images and videos in DATALYR’s ad file library first, then use them in ads. Every file in the library has an asset_id the agent reuses.

Pick how to send a file

import_ad_assets takes 1 to 20 files per call. The agent waits until each file’s status is ready before it makes an ad with it.

Upload from a sandbox

1

Ask for an upload slot

The agent calls create_asset_upload with the file’s type and exact size in bytes. It gets an upload URL and headers, valid for 15 minutes.
2

Upload the file

The agent sends the raw bytes with a PUT to that URL, with exactly those headers.
3

Finish

The agent calls finish_asset_upload. DATALYR checks the real type, size, dimensions and duration.

Library limits

DATALYR reads the type from the file’s bytes, never from its name. A file that doesn’t decode, or a video whose length can’t be read, fails with the reason. Re-export a failing video as MP4 (H.264). Each platform takes a narrower set than the library: Shapes and minimum sizes per format are on Meta, TikTok and Google Ads. Before writing an ad, the agent calls get_ad_requirements for the exact rules of the ad set or ad group.

AI enhancements stay off

Each platform can change your creative with its own AI: crop, expand, add music, translate, or generate new versions. DATALYR sends every enhancement explicitly, and each is off unless you turn it on. The preview’s Enhancements: line names each one that is on. To change the workspace defaults, open Enhancements, pick the platform, and turn each switch on or off. Agents can change these defaults with update_ad_publish_settings.

Verify

  1. Ask the agent: List my ad files.
  2. Confirm your file appears with status ready and the width, height and duration you expect.
  3. Open Settings → Ad publishing → Activity and confirm the Uploaded … entry.

When it does not work

Next