{"info":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","description":"<html><head></head><body><h1 id=\"authentication\">Authentication</h1>\n<p>The Swell API uses API Keys to authenticate requests. You can view and manage your API keys in your project’s API Source.</p>\n<p>Test mode secret keys have the prefix <code>sk_test_</code> and live mode secret keys have the prefix <code>sk_live_</code>.</p>\n<p>Authentication to the API is performed via bearer auth, ex: <code>\"Authorization: Bearer sk_test_your_key\"</code> instead of <code>-u sk_test_your_key</code>.</p>\n<p>All API requests must be made over <a href=\"http://en.wikipedia.org/wiki/HTTP_Secure\">HTTPS</a>. Calls made over plain HTTP will fail. API requests without authentication will also fail.</p>\n<p>The base url for all requests is <code>https://api.swellai.com/v2</code>.</p>\n<h1 id=\"pagination\">Pagination</h1>\n<p>This API supports pagination to help you efficiently retrieve a list of resources associated with the API Key's project. You can control the number of results per page and navigate through the result pages using the <code>page</code> and <code>size</code> query parameters.</p>\n<h3 id=\"query-parameters\">Query Parameters</h3>\n<ul>\n<li><code>page</code> (integer, optional, default: <code>1</code>): The page number you want to retrieve. The default value is 1, which returns the first page of results.</li>\n<li><code>size</code> (integer, optional, default: <code>10</code>): The number of results per page. The default value is 10.</li>\n</ul>\n<h3 id=\"example-request\">Example Request</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>GET /v2/resources?page=2&amp;size=20\nAuthorization: Bearer your_api_key\n\n</code></pre><h3 id=\"response-structure\">Response Structure</h3>\n<p>The response will include the following fields:</p>\n<ul>\n<li><code>count</code> (integer): The total number of results matching your query.</li>\n<li><code>next</code> (string, nullable): The URL for the next page of results, or <code>null</code> if there are no more pages.</li>\n<li><code>previous</code> (string, nullable): The URL for the previous page of results, or <code>null</code> if you are on the first page.</li>\n<li><code>results</code> (array): An array of objects containing the content for the current page.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"count\": 50,\n  \"next\": \"/v2/resources?page=3&amp;size=20\",\n  \"previous\": \"/v2/resources?page=1&amp;size=20\",\n  \"results\": [...]\n}\n\n</code></pre>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Authentication","slug":"authentication"},{"content":"Pagination","slug":"pagination"}],"owner":"2959711","collectionId":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","publishedId":"2s93eYUXn3","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-05-08T06:19:59.000Z"},"item":[{"name":"Episodes","item":[{"name":"List Episodes","id":"5a47c2f5-7cbb-4f21-a242-0be889d1cad0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.swellai.com/v2/episodes/","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["episodes",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"5a47c2f5-7cbb-4f21-a242-0be889d1cad0"},{"name":"Create Episode","id":"9eaa3b6d-b740-4bbd-8103-5c48ae34c9bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"A test episode\",\n    \"file\": \"https://media.bcast.fm/84vp0n68.mp3\",\n    \"applied_templates\": [\"tmpl_01GZCJ9PFG2GEAZ39DA32JB2R8\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.swellai.com/v2/episodes/","description":"<p>To create an episode, you must provide</p>\n<ul>\n<li>An Episode name</li>\n<li>A Url which Swell AI can download the resource from</li>\n<li>A list of Template IDs which will be applied on the episode</li>\n</ul>\n<p>Upon creation, the Episode will move to a <code>processing</code> state until it's the file is download and transcribed. If there are any errors, the Episode will be moved to a <code>failed</code> state.</p>\n<p>Once the Episode is downloaded and transcribed it will be moved to a <code>ready</code> state. This will indicate that the applied Templates will generate Content.</p>\n<p>For the <code>test</code> environment, the Episode will move immediately into a <code>ready</code> state. Note that it usually takes 10 minutes per hour of content to download &amp; transcribe. So this will not be instantaneous in production.</p>\n<p>In addition, Content will immediately be produced but with fixture data.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["episodes",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"9eaa3b6d-b740-4bbd-8103-5c48ae34c9bd"},{"name":"Retrieve Episode","id":"3b85a469-ac41-4e60-9c5b-cea57f8f0d13","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"A test episode\",\n    \"file\": \"https://media.bcast.fm/84vp0n68.mp3\",\n    \"applied_templates\": [\"tmpl_01GZA6816QG9B9ZV8KPK0WSWGV\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.swellai.com/v2/episodes//","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["episodes","",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"3b85a469-ac41-4e60-9c5b-cea57f8f0d13"},{"name":"Retrieve Episode Transcript","id":"44ccacd2-3f3f-42fb-b838-0a02433584bf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"A test episode\",\n    \"file\": \"https://media.bcast.fm/84vp0n68.mp3\",\n    \"applied_templates\": [\"tmpl_01GZA6816QG9B9ZV8KPK0WSWGV\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.swellai.com/v2/episodes//transcript/","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["episodes","","transcript",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"44ccacd2-3f3f-42fb-b838-0a02433584bf"}],"id":"0c57cdd8-52ea-445c-81ca-1a71114e319e","description":"<p>In the context of the Swell API, an Episode is a resource that represents an audio or video file. It is important to note that Episodes are not limited to traditional podcast episodes. They can also represent other types of audio or video files such as audiobooks, lectures, or music albums. The flexibility of the Episode resource in the Swell API allows for a wide range of use cases and enables developers to create unique and innovative applications that leverage Swell's audio processing capabilities.</p>\n<h2 id=\"episode-status\">Episode Status</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Processing</td>\n<td>The episode is downloading and transcribing.</td>\n</tr>\n<tr>\n<td>Ready</td>\n<td>The episode has downloaded and transcribed successfully and can now generate content</td>\n</tr>\n<tr>\n<td>Failed</td>\n<td>The episode failed to download or transcribe.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"properties\">Properties</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>A unique primary key</td>\n</tr>\n<tr>\n<td>environment</td>\n<td>Either test or production</td>\n</tr>\n<tr>\n<td>name</td>\n<td>A string representing the name of the episode</td>\n</tr>\n<tr>\n<td>file</td>\n<td>An signed S3 url to access the media file</td>\n</tr>\n<tr>\n<td>project</td>\n<td>A foreign reference to a project</td>\n</tr>\n<tr>\n<td>status</td>\n<td><code>processing</code>, <code>ready</code>, <code>failed</code></td>\n</tr>\n<tr>\n<td>applied_templates</td>\n<td>An array of Template IDs. Up to 10 templates can be added to an episode. Once created, this property is immutable. We will most likely create a way to apply templates to Episodes after creation.</td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"0c57cdd8-52ea-445c-81ca-1a71114e319e","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}}},{"name":"Content","item":[{"name":"List Content","id":"037d3f28-58e9-44ce-85be-01f8595078f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.swellai.com/v2/contents/?episode_id=","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["contents",""],"host":["https://api.swellai.com/v2"],"query":[{"key":"episode_id","value":""}],"variable":[]}},"response":[],"_postman_id":"037d3f28-58e9-44ce-85be-01f8595078f2"},{"name":"Retrieve Content","id":"b11ff126-e5cf-47ea-9b97-b63b7ad54d32","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"A test episode\",\n    \"file\": \"https://media.bcast.fm/84vp0n68.mp3\",\n    \"applied_templates\": [\"tmpl_01GZA6816QG9B9ZV8KPK0WSWGV\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.swellai.com/v2/contents//","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["contents","",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"b11ff126-e5cf-47ea-9b97-b63b7ad54d32"},{"name":"Retrieve Content Markdown","id":"ea5b46bc-2575-4a2d-9ac2-f89485de742d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"A test episode\",\n    \"file\": \"https://media.bcast.fm/84vp0n68.mp3\",\n    \"applied_templates\": [\"tmpl_01GZA6816QG9B9ZV8KPK0WSWGV\"]\n}","options":{"raw":{"language":"json"}}},"url":"https://api.swellai.com/v2/contents//markdown/","description":"<p>If the Content’s status is <code>ready</code> we will return the markdown value in plain text. Otherwise we will return a 400 status code.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["contents","","markdown",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"ea5b46bc-2575-4a2d-9ac2-f89485de742d"}],"id":"50a0235e-27dc-4679-85d0-aecae6999daf","description":"<h1 id=\"content\">Content</h1>\n<p>This resource represents generated content from a template that is applied to an episode. Content is stored in a portable markdown format. In later versions it may be possible to see individual blocks which compose a Content resource.</p>\n<h2 id=\"content-status\">Content Status</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Processing</td>\n<td>The content is processing</td>\n</tr>\n<tr>\n<td>Ready</td>\n<td>The content has been processed and can be accessed.</td>\n</tr>\n<tr>\n<td>Failed</td>\n<td>The content failed process.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"properties\">Properties</h2>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Name</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td>A unique primary key</td>\n</tr>\n<tr>\n<td>environment</td>\n<td>Either test or production</td>\n</tr>\n<tr>\n<td>episode</td>\n<td>A foreign reference to an episode</td>\n</tr>\n<tr>\n<td>template</td>\n<td>A foreign reference to a template</td>\n</tr>\n<tr>\n<td>status</td>\n<td><code>processing</code>, <code>ready</code>, <code>failed</code></td>\n</tr>\n</tbody>\n</table>\n</div>","_postman_id":"50a0235e-27dc-4679-85d0-aecae6999daf","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}}},{"name":"Key","id":"77f9c818-873b-4b4c-bee6-671916176487","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.swellai.com/v2/key/","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":true,"source":{"_postman_id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","id":"9e9fcb28-aa59-4f1a-9515-9aceb3d6f4e2","name":"Swell AI API V2","type":"collection"}},"urlObject":{"path":["key",""],"host":["https://api.swellai.com/v2"],"query":[],"variable":[]}},"response":[],"_postman_id":"77f9c818-873b-4b4c-bee6-671916176487"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]}},"event":[{"listen":"prerequest","script":{"id":"5db98b7f-48ab-4383-b4da-c3c006608194","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"0522ed2f-af03-4a95-8bf0-fe5b8f200c7d","type":"text/javascript","exec":[""]}}],"variable":[{"key":"episode_id","value":""},{"key":"content_id","value":""},{"key":"base_url","value":"https://api.swellai.com/v2","type":"string"}]}