Read an upstream's macro documentation into preset fields
Reads an upstream's macro documentation (an SSAI stitcher's macro list, a publisher's notes, or a VAST tag URL with the upstream's macros in it; a PDF, an image of it, a link to its page, or its text) with one AI model call and answers which of the upstream's macros fills each of our tag parameters,
https://YOUR-NETWORK-DOMAIN/rest-api/upstream-macro-presets/from-document.do Reads an upstream's macro documentation (an SSAI stitcher's macro list, a publisher's notes, or a VAST tag URL with the upstream's macros in it; a PDF, an image of it, a link to its page, or its text) with one AI model call and answers which of the upstream's macros fills each of our tag parameters, one entry for each upstream the document tells apart - 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 entry you pick with upstream-macro-presets (code is made from the name). 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. Only our own tag parameters are filled and each macro passed what a saved preset accepts; a key the model answered that is not one of them is not filled and is listed in notApplied with the reason, and quotes gives the passage each macro came from. Check them against the document before saving. The call is billed like an AI assistant call. Requires the UPSTREAM_MACRO_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
url string
A public http(s) link to the documentation: its page or its PDF
https://docs.aws.amazon.com/mediatailor/latest/ug/variables.html text string
The documentation's text, pasted (a macro list, or a VAST tag URL with the macros in it); up to 150,000 characters are read
https://ads.example/vast?ip={{IP}}&ua={{USER_AGENT}}&ifa={{DEVICE_ID}}&us_privacy={{US_PRIVACY}} Body
A multipart form: file (file).
Responses
200
{upstreams: [{name, code, source, asOf, notes, playerParamPrefix, macros, 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 macros for our tag parameters, 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