---
title: "Read a publisher's video spec document into preset fields"
type: reference
method: POST
path: /rest-api/video-requirements/preset-from-document.do
tag: "Sites"
---

# Read a publisher's video spec document into preset fields

`POST https://YOUR-NETWORK-DOMAIN/rest-api/video-requirements/preset-from-document.do`

Reads a publisher's video ad spec (a PDF, an image of it, a link to its page, or its text) with one AI model call and answers the preset fields it states, one profile for each set of requirements the document tells apart (site-served and VAST, mezzanine and programmatic) - at most 10, with 'total' the number the document has and 'more' true when some were left out. Nothing is saved: create the preset from the profile you pick with video-requirements/presets. Send exactly one of file, url or text. A link is downloaded from the public internet only; a page that builds its content in the browser has no text to read, so send its PDF or its text instead. Each profile's requirements passed the constraints a saved preset is held to; a value the model answered that failed them is not filled and is listed in notApplied with the reason, and quotes gives the passage each filled field came from. Check them against the document before saving. The call is billed like an AI assistant call. Requires the VIDEO_REQUIREMENT_PRESETS admin permission and an Anthropic key: the user's own, the network's, or Epom's while the network's plan includes it.

## Query params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `url` | string | no | `https://help.ads.roku.com/en/articles/7154647-creative-guidelines` | A public http(s) link to the spec: its page or its PDF |
| `text` | string | no | `Duration: 15 or 30 seconds. Resolution: 1920x1080. Bitrate: 15-30 Mbps CBR.` | The spec's text, pasted; up to 150,000 characters are read |

## Body

A multipart form: `file` (file).

## Responses

- `200` — {profiles: [{name, profile, source, asOf, notes, requirements, quotes, notApplied}], total, more, document: {kind, origin}}
- `400` — Field errors under 'errors': none or several of file, url and text; the document empty, too large, of a type that cannot be read, without readable text, not downloadable, without a video ad spec, too long to read in one answer, or declined by the model (errors.document)
- `401` — Authentication error
- `403` — Insufficient permissions, naming the missing one
- `429` — This month's AI budget is spent
- `503` — No Anthropic key is set up, or the model could not be reached or answered something that cannot be read; try again

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/video-requirements/preset-from-document.do?url=https%3A%2F%2Fhelp.ads.roku.com%2Fen%2Farticles%2F7154647-creative-guidelines&text=Duration%3A%2015%20or%2030%20seconds.%20Resolution%3A%201920x1080.%20Bitrate%3A%2015-30%20Mbps%20CBR.' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --form 'file=@data.csv'
```

Source: https://epom.com/ad-server/docs/api/sites/post-video-requirements-preset-from-document