As mentioned here, the Flex system rapidly detects and imports the episode, minimising the time from publishing to delivery of audio files through the Acast system.

To make this integration tighter and maximise ad delivery on all download requests from the first listen, a Flex partner can implement a pre-heating endpoint to import episodes into the Flex system before they have been published to the RSS feed.

Technical requirements

The preheating endpoint requires the correct source URL of the audio file to be known at the time of the episode is sent to the Flex system via the endpoint.

The source URL is sent in a GET call, triggering the import mechanism ahead of the episode being published, so the file is ready for stitching from the first download request.

The request is to be made to:

https://flex-api.acast.com/preheat?url=<sourceUrl>

Where sourceUrl is the original file url that would be in the RSS without the flex prepend.

Example episode URL with Flex prepend

https://flex2.acast.com/s/myshow/u/myserver.company.com/examplefile.mp3 

Example expected pre-heating call

https://flex-api.acast.com/preheat?url=<url>https://myserver.company.com/examplefile.mp3

This will either queue the file on the Flex system, or return the status information if it's already there.

A header x-api-key will be needed to access the endpoint, with one API per provider. Please reach out to your Acast technical account manager to generate the key value.

Rate-limiting on the pre-heating endpoint is by default limited to1 call per minute - this can be adjusted at your request.


Example responses of Preheating API Calls

Once a GET call is sent to the preheating endpoint, the calls also return information about the encoded file for use in de-bugging, such as the ID3 tags and the readiness of the file. We also include information on completed files of whether suitable silences have been detected in the audio, that could be used to place ad marker points.

Returned responses

The file has been added to the processing queue and it's waiting for an available slot to be processed. This is the initial state once the preheating endpoint is called:

{
"status": "queued",
"sourceUrl": "https://audio.medianews.com/2019/11/04-53847-medianews.dailyshow.20191105.EOG.episodename.mp3",
"modified": "2020-04-09T10:35:42.975Z",
"created": "2020-04-09T10:35:42.975Z"
}

There was an error communicating with the flex system:

{
"status": "api-error",
"sourceUrl": "https://audio.medianews.com/2019/11/04-53847-medianews.dailyshow.20191105.EOG.episodename.mp3",
"message": "Error description",
}

There was an error processing -encoding or copying- the file:

{
"status": "error",
"sourceUrl": "https://audio.medianews.com/2019/11/04-53847-medianews.dailyshow.20191105.EOG.episodename.mp3",
"modified": "2020-04-09T10:35:42.975Z",
"created": "2020-04-09T10:35:42.975Z"
"message": "Error description",
}

The file is currently being processed:

{
"status": "processing",
"sourceUrl": "https://audio.medianews.com/2019/11/04-53847-medianews.dailyshow.20191105.EOG.episodename.mp3",
"modified": "2020-04-09T10:35:43.099Z",
"created": "2020-04-09T10:35:42.975Z"
}

The file was processed correctly and the flex system is fully ready:

{
"bitrate": 128,
"channelCount": 2,
"contentLength": 161608,
"offsetToAudio": 148,
"samplingRate": 44100,
"id3": {
"date": "2019-12-12T22:07:57+01:00",
"Software": "Adobe Audition 12.1 (Macintosh)",
"title": "EPISODE TITLE",
"TYER": "2019-12-12T22:07:57+01:00"
},
"duration": 10.05,
"key": "0dc5278221a02a48f47c4ea8c8a64364/128-2.mp3",
"silenceDetected": [
{
"duration": 0.296,
"end": 1.75298
},
{
"duration": 0.2,
"end": 4.51298
},
{
"duration": 0.2,
"end": 6.36098
}
],
"modified": "2020-03-30T16:56:55.580Z",
"sourceUrl": "https://audio.medianews.com/2019/11/04-53847-medianews.dailyshow.20191105.EOG.episodename.mp3"
}

Did this answer your question?