# Create Podcast POST /api/v1/podcasts/ Content-Type: multipart/form-data Create a new podcast with optional file uploads for RAG documents. Supports multipart/form-data for file uploads. When creating a podcast, the script will be automatically generated for preview. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/podcasts/create ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/podcasts/: post: operationId: create summary: Create Podcast description: >- Create a new podcast with optional file uploads for RAG documents. Supports multipart/form-data for file uploads. When creating a podcast, the script will be automatically generated for preview. tags: - subpackage_podcasts responses: '201': description: Podcast created successfully content: application/json: schema: $ref: '#/components/schemas/PodcastDetail' '400': description: Invalid input data content: application/json: schema: description: Any type requestBody: content: multipart/form-data: schema: type: object properties: title: type: string description: type: string voice_type: oneOf: - $ref: >- #/components/schemas/ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaVoiceType - type: 'null' description: >- Voice preset to use for the podcast (interview, panel, educational, narrative, debate) * `interview` - Interview * `panel` - Panel * `educational` - Educational * `narrative` - Narrative * `debate` - Debate language: oneOf: - $ref: >- #/components/schemas/ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaLanguage - type: 'null' description: |- Language for the podcast content (for future use) * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `it` - Italian * `pt` - Portuguese * `zh` - Chinese * `ja` - Japanese * `ko` - Korean * `ar` - Arabic * `ru` - Russian * `hi` - Hindi length: type: - integer - 'null' knowledge_level: $ref: '#/components/schemas/KnowledgeLevelEnum' llm_prompt: type: string logo: type: - string - 'null' format: uri cover_image: type: - string - 'null' format: uri category: type: string subcategory: type: string focus_area: type: string tags: type: array items: type: string rag_files: type: array items: type: string format: uri description: List of files to upload as RAG documents for podcast content existing_rag_document_ids: type: array items: type: integer description: List of existing RAG document IDs to link to this podcast visibility: $ref: '#/components/schemas/GlobalVisibilityEnum' is_draft: type: boolean description: Whether this podcast is a draft workspace_id: type: integer required: - title - workspace_id components: schemas: VoiceTypeEnum: type: string enum: - interview - panel - educational - narrative - debate description: |- * `interview` - Interview * `panel` - Panel * `educational` - Educational * `narrative` - Narrative * `debate` - Debate title: VoiceTypeEnum BlankEnum: type: string enum: - '' title: BlankEnum NullEnum: description: Any type title: NullEnum ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaVoiceType: oneOf: - $ref: '#/components/schemas/VoiceTypeEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' description: >- Voice preset to use for the podcast (interview, panel, educational, narrative, debate) * `interview` - Interview * `panel` - Panel * `educational` - Educational * `narrative` - Narrative * `debate` - Debate title: ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaVoiceType LanguageEnum: type: string enum: - en - es - fr - de - it - pt - zh - ja - ko - ar - ru - hi description: |- * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `it` - Italian * `pt` - Portuguese * `zh` - Chinese * `ja` - Japanese * `ko` - Korean * `ar` - Arabic * `ru` - Russian * `hi` - Hindi title: LanguageEnum ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaLanguage: oneOf: - $ref: '#/components/schemas/LanguageEnum' - $ref: '#/components/schemas/NullEnum' description: |- Language for the podcast content (for future use) * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `it` - Italian * `pt` - Portuguese * `zh` - Chinese * `ja` - Japanese * `ko` - Korean * `ar` - Arabic * `ru` - Russian * `hi` - Hindi title: ApiV1PodcastsPostRequestBodyContentMultipartFormDataSchemaLanguage KnowledgeLevelEnum: type: string enum: - beginner - intermediate - advanced - expert description: |- * `beginner` - Beginner * `intermediate` - Intermediate * `advanced` - Advanced * `expert` - Expert title: KnowledgeLevelEnum GlobalVisibilityEnum: type: string enum: - public - private - team - org description: |- * `public` - Public * `private` - Private * `team` - Team * `org` - Organization title: GlobalVisibilityEnum PodcastDetailLanguage: oneOf: - $ref: '#/components/schemas/LanguageEnum' - $ref: '#/components/schemas/BlankEnum' - $ref: '#/components/schemas/NullEnum' description: |- Language for the podcast content (for future use) * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `it` - Italian * `pt` - Portuguese * `zh` - Chinese * `ja` - Japanese * `ko` - Korean * `ar` - Arabic * `ru` - Russian * `hi` - Hindi title: PodcastDetailLanguage GenerationStatusEnum: type: string enum: - not_started - generating_script - script_generated - generating_audio - completed - failed description: |- * `not_started` - Not Started * `generating_script` - Generating Script * `script_generated` - Script Generated * `generating_audio` - Generating Audio * `completed` - Completed * `failed` - Failed title: GenerationStatusEnum GlobalCreationStatusEnum: type: string enum: - not_started - in_progress - completed - failed description: |- * `not_started` - Not Started * `in_progress` - In Progress * `completed` - Completed * `failed` - Failed title: GlobalCreationStatusEnum SimpleUser: type: object properties: id: type: integer email: type: string format: email full_name: type: string username: type: string description: >- Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. is_verified: type: boolean profile_picture: type: string format: uri description: |- Convert ImageFieldFile to URL string for JSON serialization. Args: obj: The model instance being serialized (typically IAMUser) Returns: str | None: The URL of the profile picture, or None if not available required: - id - email - full_name - username - is_verified - profile_picture description: >- Simple user serializer with profile picture from associated IAMUserDetail. Fields: - id, email, full_name, username, is_verified (from IAMUser) - profile_picture (from first related IAMUserDetail if present) title: SimpleUser PodcastDetail: type: object properties: id: type: integer uid: type: string format: uuid title: type: string description: type: - string - 'null' voice_type: type: - string - 'null' description: Voice type from Hume AI (voice ID or clone settings) language: oneOf: - $ref: '#/components/schemas/PodcastDetailLanguage' - type: 'null' description: |- Language for the podcast content (for future use) * `en` - English * `es` - Spanish * `fr` - French * `de` - German * `it` - Italian * `pt` - Portuguese * `zh` - Chinese * `ja` - Japanese * `ko` - Korean * `ar` - Arabic * `ru` - Russian * `hi` - Hindi length: type: - integer - 'null' description: Target podcast length in minutes knowledge_level: $ref: '#/components/schemas/KnowledgeLevelEnum' description: |- Target knowledge level for the podcast audience * `beginner` - Beginner * `intermediate` - Intermediate * `advanced` - Advanced * `expert` - Expert llm_prompt: type: - string - 'null' description: Optional custom prompt for the podcast script generation LLM logo: type: - string - 'null' format: uri description: Logo image for the podcast (copied from experience) generated_script: type: - string - 'null' description: LLM-generated podcast script audio_file: type: - string - 'null' format: uri description: Generated podcast audio file audio_url: type: - string - 'null' format: uri description: URL to the generated podcast audio generation_status: $ref: '#/components/schemas/GenerationStatusEnum' description: |- Current status of podcast generation process * `not_started` - Not Started * `generating_script` - Generating Script * `script_generated` - Script Generated * `generating_audio` - Generating Audio * `completed` - Completed * `failed` - Failed estimated_duration: type: - integer - 'null' description: Estimated duration of the podcast in seconds actual_duration: type: - integer - 'null' description: Actual duration of the generated podcast in seconds cover_image: type: - string - 'null' format: uri description: Cover image for the podcast focus_area: type: - string - 'null' visibility: $ref: '#/components/schemas/GlobalVisibilityEnum' is_draft: type: boolean description: Whether this podcast is a draft creation_status: $ref: '#/components/schemas/GlobalCreationStatusEnum' generation_metadata: oneOf: - description: Any type - type: 'null' description: Metadata about the generation process (model used, parameters, etc.) created_at: type: string format: date-time updated_at: type: string format: date-time duration_display: type: string can_generate_script: type: string can_generate_audio: type: string category_name: type: string subcategory_name: type: string tag_names: type: array items: type: string owner: $ref: '#/components/schemas/SimpleUser' owner_username: type: string publications: type: string source_experience_uid: type: string source_experience_title: type: string rag_document_count: type: string rag_documents: type: string metrics: type: string workspace_id: type: integer required: - id - uid - title - created_at - updated_at - duration_display - can_generate_script - can_generate_audio - category_name - subcategory_name - tag_names - owner - owner_username - publications - source_experience_uid - source_experience_title - rag_document_count - rag_documents - metrics - workspace_id description: Detailed serializer for podcast responses. title: PodcastDetail ``` ## SDK Code Examples ```python Create a podcast with basic information import requests url = "https://api.example.com/api/v1/podcasts/" payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nThe Future of Renewable Energy\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_type\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"length\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_level\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"llm_prompt\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"cover_image\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"category\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subcategory\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"focus_area\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"tags\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"rag_files\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"existing_rag_document_ids\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_draft\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"workspace_id\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" headers = {"Content-Type": "multipart/form-data; boundary=---011000010111000001101001"} response = requests.post(url, data=payload, headers=headers) print(response.json()) ``` ```javascript Create a podcast with basic information const url = 'https://api.example.com/api/v1/podcasts/'; const form = new FormData(); form.append('title', 'The Future of Renewable Energy'); form.append('description', ''); form.append('voice_type', ''); form.append('language', ''); form.append('length', ''); form.append('knowledge_level', ''); form.append('llm_prompt', ''); form.append('logo', ''); form.append('cover_image', ''); form.append('category', ''); form.append('subcategory', ''); form.append('focus_area', ''); form.append('tags', ''); form.append('rag_files', ''); form.append('existing_rag_document_ids', ''); form.append('visibility', ''); form.append('is_draft', ''); form.append('workspace_id', ''); const options = {method: 'POST'}; options.body = form; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Create a podcast with basic information package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/podcasts/" payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nThe Future of Renewable Energy\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_type\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"length\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_level\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"llm_prompt\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"cover_image\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"category\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subcategory\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"focus_area\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"tags\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"rag_files\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"existing_rag_document_ids\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_draft\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"workspace_id\"\r\n\r\n\r\n-----011000010111000001101001--\r\n") req, _ := http.NewRequest("POST", url, payload) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Create a podcast with basic information require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/podcasts/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nThe Future of Renewable Energy\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_type\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"length\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_level\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"llm_prompt\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"cover_image\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"category\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subcategory\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"focus_area\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"tags\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"rag_files\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"existing_rag_document_ids\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_draft\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"workspace_id\"\r\n\r\n\r\n-----011000010111000001101001--\r\n" response = http.request(request) puts response.read_body ``` ```java Create a podcast with basic information import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/podcasts/") .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nThe Future of Renewable Energy\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_type\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"length\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_level\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"llm_prompt\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"cover_image\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"category\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subcategory\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"focus_area\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"tags\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"rag_files\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"existing_rag_document_ids\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_draft\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"workspace_id\"\r\n\r\n\r\n-----011000010111000001101001--\r\n") .asString(); ``` ```php Create a podcast with basic information request('POST', 'https://api.example.com/api/v1/podcasts/', [ 'multipart' => [ [ 'name' => 'title', 'contents' => 'The Future of Renewable Energy' ] ] ]); echo $response->getBody(); ``` ```csharp Create a podcast with basic information using RestSharp; var client = new RestClient("https://api.example.com/api/v1/podcasts/"); var request = new RestRequest(Method.POST); request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\nThe Future of Renewable Energy\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"description\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"voice_type\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"language\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"length\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"knowledge_level\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"llm_prompt\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"cover_image\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"category\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"subcategory\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"focus_area\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"tags\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"rag_files\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"existing_rag_document_ids\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"is_draft\"\r\n\r\n\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"workspace_id\"\r\n\r\n\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create a podcast with basic information import Foundation let parameters = [ [ "name": "title", "value": "The Future of Renewable Energy" ], [ "name": "description", "value": ], [ "name": "voice_type", "value": ], [ "name": "language", "value": ], [ "name": "length", "value": ], [ "name": "knowledge_level", "value": ], [ "name": "llm_prompt", "value": ], [ "name": "logo", "value": ], [ "name": "cover_image", "value": ], [ "name": "category", "value": ], [ "name": "subcategory", "value": ], [ "name": "focus_area", "value": ], [ "name": "tags", "value": ], [ "name": "rag_files", "value": ], [ "name": "existing_rag_document_ids", "value": ], [ "name": "visibility", "value": ], [ "name": "is_draft", "value": ], [ "name": "workspace_id", "value": ] ] let boundary = "---011000010111000001101001" var body = "" var error: NSError? = nil for param in parameters { let paramName = param["name"]! body += "--\(boundary)\r\n" body += "Content-Disposition:form-data; name=\"\(paramName)\"" if let filename = param["fileName"] { let contentType = param["content-type"]! let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8) if (error != nil) { print(error as Any) } body += "; filename=\"\(filename)\"\r\n" body += "Content-Type: \(contentType)\r\n\r\n" body += fileContent } else if let paramValue = param["value"] { body += "\r\n\r\n\(paramValue)" } } let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/podcasts/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```