LibreTime Radio Automation


An open source radio automation server made for (and made by) low-power FM stations and the rest of us.

View the Project on GitHub LibreTime/libretime

About LibreTime
Contribute to LibreTime

Quick Install
  -- Host Configuration
  -- Setting the Server Time
  -- Configuring Track Types
  -- Setting up SSL

Using LibreTime
Preparing Media
Scheduling Shows
Broadcasting Live
Adding Users
  -- More Tutorials

Radio Broadcasting 101
UNESCO Public Radio Guide

HD Audio Modules
Rights and Royalties
Media Folders used by LibreTime

LibreTime API Usage

The LibreTime API enables many types of information about the broadcast schedule and configuration to be retrieved from the LibreTime server. Other than the live-info and week-info data fetched by website widgets (see the chapter Exporting the schedule), all API requests must be authenticated using the secret API key stored in the file /etc/airtime/api_client.cfg on the LibreTime server. This key is autogenerated during LibreTime installation and should be unique for each server.

If you intend to use the LibreTime API across a public network, for security reasons it is highly recommended that all API requests are sent over encrypted https: and that the web server is configured to accept requests to the api/ directory from specific host names or IP addresses only.

The format of API requests is:

where api-action is the type of request and XXXXXX is the secret API key. Available actions include:

For example, using the action get-stream-setting returns the following output for the first configured stream:






{"keyname":"s1_description","value":"Airtime Radio! Stream


which is enough information to construct a player widget dynamically. (s1_url is the station’s homepage, not the stream URL). The same information is provided with an s2_ prefix for the second stream, and s3_ prefix for the third stream.

Some API requests require the directory ID number to be specified as dir_id including:

For example, using a request such as:

returns the full path to each media file in the LibreTime storage directory:

"imported\/1\/Mark Ronson feat. Saigon\/Here Comes the Fuzz\/7-Diduntdidunt-unknown.flac",
"imported\/1\/Jimi Tenor & Tony Allen\/Inspiration Information\/3-Selfish Gene-128kbps.mp3",