> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.formantai.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.formantai.com/_mcp/server.

# Submit an episode from text

POST https://api.voice.formantai.com/v1/podcast/jobs
Content-Type: application/json

Queues a multi-speaker audio episode rendered from the text you supply. Returns as soon as the episode is accepted — poll `GET /v1/podcast/jobs/{podcast_id}` for the audio. Rendering spends LLM and text-to-speech credits, so treat a submission as a billed operation.

Reference: https://docs.formantai.com/api-reference/formant-ai-voice-api/podcast/submit-podcast

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.voice.formantai.com` (Global production, default)
- `https://api.in.voice.formantai.com` (India production)

## Request

### Body (application/json)

This endpoint expects a CreatePodcastRequest.

- `content` (string, required) — Source material for the episode.
- `briefing` (string, required) — Instructions or angle for the episode.
- `speakers` (list of PodcastSpeaker, required) — One to four voices.
- `num_segments` (integer, optional, default: 2) — Number of outline segments.
- `episode_name` (string, optional, default: episode) — Output filename stem.
- `language` (string, optional, nullable) — Language name (`Hindi`, `english`) or locale code (`hi-IN`, `en-IN`), any case. Normalized to the locale code the voice providers expect; an unrecognized value is rejected with `400`.
- `output_format` (enum, optional, default: mp3) — Container of the finished episode. `mp3` is audio only. `mp4` carries the same audio (AAC) with a still black H.264 video track cut to the audio's length, for platforms that only ingest video, such as Cloudflare Stream.
  - Allowed values: `mp3`, `mp4`
- `tts_provider` (enum, optional) — Text-to-speech provider that voices the episode. `elevenlabs` renders the voices on the ElevenLabs account behind your workspace's connection. `sarvam` renders 37 `bulbul:v3` speakers and 222 `bulbul:v4-flash` persona voices across eleven Indic languages plus Indian English. `smallest` renders 249 voices across 30+ languages. `vakyam` renders Vakyam's Indic voices and speaks Hindi unless `language` is set. The connection behind the provider is resolved server-side from your own workspace, so no connection id is accepted. Omit it to use your deployment's default provider.
  - Allowed values: `sarvam`, `smallest`, `vakyam`, `elevenlabs`
- `tts_model` (enum, optional) — Text-to-speech model. Must be selectable for `tts_provider`: `eleven_multilingual_v2` (default), `eleven_flash_v2_5`, `eleven_turbo_v2_5`, `eleven_v4` or `eleven_v4_turbo` for `elevenlabs`; `bulbul:v3` (default) or `bulbul:v4-flash` for `sarvam`; `lightning_v3.1_pro` for `smallest`; `raaga-v1` for `vakyam`. Omit it and the provider's default (its first model) is used. A model that does not belong to the chosen provider is rejected at submit with 400 invalid_request; nothing is rendered or billed.
  - Allowed values: `bulbul:v3`, `bulbul:v4-flash`, `lightning_v3.1_pro`, `raaga-v1`, `eleven_multilingual_v2`, `eleven_flash_v2_5`, `eleven_turbo_v2_5`, `eleven_v4`, `eleven_v4_turbo`

## Response

### 200

Episode accepted and queued

- `id` (integer, required) — Episode id. Poll it to collect the audio.
- `status` (enum, required) — Always `pending` on submit — rendering runs asynchronously.
  - Allowed values: `pending`

## Errors

### 400 Bad Request Error

Invalid request

- `error` (ErrorResponseError, optional)

### 401 Unauthorized Error

Invalid or missing API key

- `error` (ErrorResponseError, optional)

### 402 Payment Required Error

The workspace balance cannot cover the operation

- `error` (ErrorResponseError, optional)

### 404 Not Found Error

Resource not found

- `error` (ErrorResponseError, optional)

### 413 Content Too Large Error

Request body exceeds the 32 MB upload limit

- `error` (ErrorResponseError, optional)

### 422 Unprocessable Entity Error

A form field is missing or cannot be parsed. Uses FastAPI's validation envelope, not the standard error envelope.

- `detail` (list of ValidationErrorResponseDetailItems, optional)

### 429 Too Many Requests Error

Rate limit exceeded

- `error` (ErrorResponseError, optional)

## Types

### PodcastSpeaker

- `name` (string, required) — Display name used in the transcript.
- `voice_id` (string, required) — Voice this speaker is synthesized with, passed to the provider unchanged. It must belong to the provider selected by `tts_provider` - a Sarvam speaker is not valid on a Smallest episode, and vice versa. Sarvam voices are also tied to the model: `bulbul:v3` speakers such as `priya`, `bulbul:v4-flash` personas such as `ritu_hi_customer`. An invalid id is not caught at submit: the provider rejects it mid-render, so the episode returns a failed status after the script has already been written and billed. **Sarvam - `bulbul:v3` (37 speakers, each covering bn-IN, en-IN, gu-IN, hi-IN, kn-IN, ml-IN, mr-IN, od-IN, pa-IN, ta-IN, te-IN)** - Female (14): `ritu`, `priya`, `neha`, `pooja`, `simran`, `kavya`, `ishita`, `shreya`, `roopa`, `tanya`, `shruti`, `suhani`, `kavitha`, `rupali` - Male (23): `aditya`, `ashutosh`, `rahul`, `rohan`, `amit`, `dev`, `ratan`, `varun`, `manan`, `sumit`, `kabir`, `aayan`, `shubh`, `advait`, `anand`, `tarun`, `sunny`, `mani`, `gokul`, `vijay`, `mohit`, `rehan`, `soham` **Smallest - `lightning_v3.1_pro` (249 voices, grouped by the language Smallest recommends them for; most are multilingual)** - English (52): `amelia`, `arabella`, `asher`, `austin`, `autumn`, `benedict`, `bethany`, `blake`, `brooks`, `callum`, `caspian`, `chelsea`, `colton`, `cormac`, `cressida`, `ellie`, `elowen`, `everett`, `finley`, `fiona`, `henry`, `hunter`, `jack`, `jenna`, `kaitlyn`, `kate`, `kelsey`, `kennedy`, `kimberly`, `leah`, `leo`, `luke`, `maverick`, `molly`, `nolan`, `ottilie`, `owen`, `reagan`, `ruby`, `rupert`, `sam`, `savannah`, `seraphina`, `sierra`, `skylar`, `sophie`, `spencer`, `tabitha`, `wesley`, `willow`, `winston`, `zoe` - Multilingual (no recommended language) (23): `aashi`, `aayan`, `ansh`, `aryan`, `atharva`, `candela`, `carla`, `dante`, `gael`, `irene`, `ishaan`, `ishita`, `kian`, `marco`, `misha`, `pablo`, `pari`, `reeva`, `shaan`, `suri`, `tanya`, `valeria`, `ximena` - Hindi (14): `aarini`, `ahan`, `aviraj`, `inaaya`, `kareena`, `meher`, `mishka`, `mrunal`, `reyansh`, `rhea`, `saira`, `vyom`, `zariya`, `zoravar` - Tamil (12): `barath`, `dinesh`, `ezhil`, `kavin`, `malar`, `mathan`, `murugan`, `nila`, `prabhu`, `sakthi`, `tamilselvi`, `tamizh` - Kannada (10): `basava`, `gowtham`, `kishore`, `rakshith`, `rashmi`, `sahana`, `shankar`, `spoorthi`, `varsha`, `yogesh` - French (9): `amelie`, `elise`, `juliette`, `louis`, `lucie`, `manon`, `maxime`, `nicolas`, `raphael` - Odia (8): `ankita`, `debasish`, `pratik`, `rakesh`, `sambit`, `sasmita`, `smruti`, `subrat` - Telugu (8): `bhaskar`, `charan`, `gopal`, `manohar`, `naveen`, `sasank`, `sravani`, `swathi` - Dutch (7): `bram`, `daan`, `femke`, `fenna`, `lars`, `sanne`, `stijn` - German (7): `ben`, `finn`, `hanna`, `lea`, `markus`, `max`, `petra` - Portuguese (7): `bruno`, `catarina`, `francisco`, `gustavo`, `juliana`, `leticia`, `thiago` - Punjabi (7): `amrit`, `gagandeep`, `jasleen`, `manmeet`, `rajdeep`, `sukhdeep`, `tejinder` - Russian (7): `anastasia`, `andrei`, `ekaterina`, `irina`, `maksim`, `nikolai`, `olga` - Swedish (7): `alva`, `anton`, `astrid`, `ebba`, `erik`, `nils`, `saga` - Finnish (6): `aino`, `helmi`, `matti`, `mika`, `timo`, `venla` - Italian (6): `arianna`, `concetta`, `davide`, `leonardo`, `luca`, `silvia` - Malayalam (6): `aravindan`, `lakshmi`, `parvathy`, `sreenath`, `unni`, `vishnu` - Bengali (5): `arghya`, `indranil`, `rajib`, `subhro`, `tanmoy` - Chinese (5): `dylan`, `eli`, `hazel`, `silas`, `vivian` - Greek (5): `athina`, `dimitra`, `dimitris`, `katerina`, `vasilis` - Gujarati (5): `jignesh`, `keval`, `krupa`, `mit`, `riddhi` - Marathi (5): `ketaki`, `manasi`, `mandar`, `tejaswini`, `tushar` - Indonesian (4): `bryce`, `cole`, `miles`, `nora` - Japanese (4): `aria`, `daisy`, `jasper`, `mila` - Norwegian (4): `espen`, `kristian`, `marit`, `solveig` - Polish (4): `ewa`, `jakub`, `joanna`, `tomasz` - Spanish (4): `claudia`, `gabriel`, `martina`, `mateo` - Arabic (2): `adam`, `layla` - Malay (2): `roman`, `sasha` - Turkish (2): `beau`, `wes` - Korean (1): `june` - Vietnamese (1): `kai` Custom or cloned ids are not accepted: Sarvam has a fixed roster with no cloning, and a Smallest clone only works if it was created on the account behind your workspace's synthesizer connection.
- `backstory` (string, optional, nullable) — Background and expertise of the speaker.
- `persona` (string, optional, nullable) — Speaking style and personality.

### ErrorResponseError

- `message` (string, optional)
- `type` (string, optional)

### ValidationErrorResponseDetailItems

- `type` (string, optional)
- `loc` (list of string, optional)
- `msg` (string, optional)

## Examples

### Sarvam bulbul:v3

**Request**

```json
{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "priya",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "aditya",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v3"
}
```

**Response**

```json
{
  "id": 4821,
  "status": "pending"
}
```

**SDK Code**

```python Sarvam bulbul:v3
import requests

url = "https://api.voice.formantai.com/v1/podcast/jobs"

payload = {
    "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
    "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
    "speakers": [
        {
            "name": "Asha",
            "voice_id": "priya",
            "backstory": "Equity analyst covering consumer tech.",
            "persona": "Precise, asks the sharp follow-up."
        },
        {
            "name": "Ravi",
            "voice_id": "aditya",
            "persona": "Curious generalist, keeps it plain-spoken."
        }
    ],
    "num_segments": 2,
    "episode_name": "q3-recap",
    "tts_provider": "sarvam",
    "tts_model": "bulbul:v3"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Sarvam bulbul:v3
const url = 'https://api.voice.formantai.com/v1/podcast/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"content":"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...","briefing":"A two-host recap for non-finance listeners. Warm, concrete, no jargon.","speakers":[{"name":"Asha","voice_id":"priya","backstory":"Equity analyst covering consumer tech.","persona":"Precise, asks the sharp follow-up."},{"name":"Ravi","voice_id":"aditya","persona":"Curious generalist, keeps it plain-spoken."}],"num_segments":2,"episode_name":"q3-recap","tts_provider":"sarvam","tts_model":"bulbul:v3"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Sarvam bulbul:v3
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voice.formantai.com/v1/podcast/jobs"

	payload := strings.NewReader("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"priya\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aditya\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v3\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Sarvam bulbul:v3
require 'uri'
require 'net/http'

url = URI("https://api.voice.formantai.com/v1/podcast/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"priya\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aditya\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v3\"\n}"

response = http.request(request)
puts response.read_body
```

```java Sarvam bulbul:v3
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voice.formantai.com/v1/podcast/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"priya\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aditya\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v3\"\n}")
  .asString();
```

```php Sarvam bulbul:v3
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voice.formantai.com/v1/podcast/jobs', [
  'body' => '{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "priya",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "aditya",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v3"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Sarvam bulbul:v3
using RestSharp;

var client = new RestClient("https://api.voice.formantai.com/v1/podcast/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"priya\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aditya\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Sarvam bulbul:v3
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    [
      "name": "Asha",
      "voice_id": "priya",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    ],
    [
      "name": "Ravi",
      "voice_id": "aditya",
      "persona": "Curious generalist, keeps it plain-spoken."
    ]
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v3"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voice.formantai.com/v1/podcast/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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()
```

### Sarvam bulbul:v4-flash

**Request**

```json
{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "ritu_hi_customer",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "aayan_hi_conversational",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "language": "hi-IN",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v4-flash"
}
```

**Response**

```json
{
  "id": 4821,
  "status": "pending"
}
```

**SDK Code**

```python Sarvam bulbul:v4-flash
import requests

url = "https://api.voice.formantai.com/v1/podcast/jobs"

payload = {
    "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
    "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
    "speakers": [
        {
            "name": "Asha",
            "voice_id": "ritu_hi_customer",
            "backstory": "Equity analyst covering consumer tech.",
            "persona": "Precise, asks the sharp follow-up."
        },
        {
            "name": "Ravi",
            "voice_id": "aayan_hi_conversational",
            "persona": "Curious generalist, keeps it plain-spoken."
        }
    ],
    "num_segments": 2,
    "episode_name": "q3-recap",
    "language": "hi-IN",
    "tts_provider": "sarvam",
    "tts_model": "bulbul:v4-flash"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Sarvam bulbul:v4-flash
const url = 'https://api.voice.formantai.com/v1/podcast/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"content":"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...","briefing":"A two-host recap for non-finance listeners. Warm, concrete, no jargon.","speakers":[{"name":"Asha","voice_id":"ritu_hi_customer","backstory":"Equity analyst covering consumer tech.","persona":"Precise, asks the sharp follow-up."},{"name":"Ravi","voice_id":"aayan_hi_conversational","persona":"Curious generalist, keeps it plain-spoken."}],"num_segments":2,"episode_name":"q3-recap","language":"hi-IN","tts_provider":"sarvam","tts_model":"bulbul:v4-flash"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Sarvam bulbul:v4-flash
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voice.formantai.com/v1/podcast/jobs"

	payload := strings.NewReader("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"ritu_hi_customer\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aayan_hi_conversational\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"language\": \"hi-IN\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v4-flash\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Sarvam bulbul:v4-flash
require 'uri'
require 'net/http'

url = URI("https://api.voice.formantai.com/v1/podcast/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"ritu_hi_customer\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aayan_hi_conversational\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"language\": \"hi-IN\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v4-flash\"\n}"

response = http.request(request)
puts response.read_body
```

```java Sarvam bulbul:v4-flash
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voice.formantai.com/v1/podcast/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"ritu_hi_customer\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aayan_hi_conversational\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"language\": \"hi-IN\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v4-flash\"\n}")
  .asString();
```

```php Sarvam bulbul:v4-flash
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voice.formantai.com/v1/podcast/jobs', [
  'body' => '{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "ritu_hi_customer",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "aayan_hi_conversational",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "language": "hi-IN",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v4-flash"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Sarvam bulbul:v4-flash
using RestSharp;

var client = new RestClient("https://api.voice.formantai.com/v1/podcast/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"ritu_hi_customer\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"aayan_hi_conversational\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"language\": \"hi-IN\",\n  \"tts_provider\": \"sarvam\",\n  \"tts_model\": \"bulbul:v4-flash\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Sarvam bulbul:v4-flash
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    [
      "name": "Asha",
      "voice_id": "ritu_hi_customer",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    ],
    [
      "name": "Ravi",
      "voice_id": "aayan_hi_conversational",
      "persona": "Curious generalist, keeps it plain-spoken."
    ]
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "language": "hi-IN",
  "tts_provider": "sarvam",
  "tts_model": "bulbul:v4-flash"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voice.formantai.com/v1/podcast/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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()
```

### ElevenLabs

**Request**

```json
{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "pNInz6obpgDQGcFmaJgB",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "elevenlabs",
  "tts_model": "eleven_multilingual_v2"
}
```

**Response**

```json
{
  "id": 4821,
  "status": "pending"
}
```

**SDK Code**

```python ElevenLabs
import requests

url = "https://api.voice.formantai.com/v1/podcast/jobs"

payload = {
    "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
    "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
    "speakers": [
        {
            "name": "Asha",
            "voice_id": "21m00Tcm4TlvDq8ikWAM",
            "backstory": "Equity analyst covering consumer tech.",
            "persona": "Precise, asks the sharp follow-up."
        },
        {
            "name": "Ravi",
            "voice_id": "pNInz6obpgDQGcFmaJgB",
            "persona": "Curious generalist, keeps it plain-spoken."
        }
    ],
    "num_segments": 2,
    "episode_name": "q3-recap",
    "tts_provider": "elevenlabs",
    "tts_model": "eleven_multilingual_v2"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript ElevenLabs
const url = 'https://api.voice.formantai.com/v1/podcast/jobs';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"content":"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...","briefing":"A two-host recap for non-finance listeners. Warm, concrete, no jargon.","speakers":[{"name":"Asha","voice_id":"21m00Tcm4TlvDq8ikWAM","backstory":"Equity analyst covering consumer tech.","persona":"Precise, asks the sharp follow-up."},{"name":"Ravi","voice_id":"pNInz6obpgDQGcFmaJgB","persona":"Curious generalist, keeps it plain-spoken."}],"num_segments":2,"episode_name":"q3-recap","tts_provider":"elevenlabs","tts_model":"eleven_multilingual_v2"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go ElevenLabs
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.voice.formantai.com/v1/podcast/jobs"

	payload := strings.NewReader("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"21m00Tcm4TlvDq8ikWAM\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"pNInz6obpgDQGcFmaJgB\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"elevenlabs\",\n  \"tts_model\": \"eleven_multilingual_v2\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby ElevenLabs
require 'uri'
require 'net/http'

url = URI("https://api.voice.formantai.com/v1/podcast/jobs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"21m00Tcm4TlvDq8ikWAM\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"pNInz6obpgDQGcFmaJgB\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"elevenlabs\",\n  \"tts_model\": \"eleven_multilingual_v2\"\n}"

response = http.request(request)
puts response.read_body
```

```java ElevenLabs
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.voice.formantai.com/v1/podcast/jobs")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"21m00Tcm4TlvDq8ikWAM\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"pNInz6obpgDQGcFmaJgB\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"elevenlabs\",\n  \"tts_model\": \"eleven_multilingual_v2\"\n}")
  .asString();
```

```php ElevenLabs
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voice.formantai.com/v1/podcast/jobs', [
  'body' => '{
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    {
      "name": "Asha",
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    },
    {
      "name": "Ravi",
      "voice_id": "pNInz6obpgDQGcFmaJgB",
      "persona": "Curious generalist, keeps it plain-spoken."
    }
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "elevenlabs",
  "tts_model": "eleven_multilingual_v2"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp ElevenLabs
using RestSharp;

var client = new RestClient("https://api.voice.formantai.com/v1/podcast/jobs");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"content\": \"Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...\",\n  \"briefing\": \"A two-host recap for non-finance listeners. Warm, concrete, no jargon.\",\n  \"speakers\": [\n    {\n      \"name\": \"Asha\",\n      \"voice_id\": \"21m00Tcm4TlvDq8ikWAM\",\n      \"backstory\": \"Equity analyst covering consumer tech.\",\n      \"persona\": \"Precise, asks the sharp follow-up.\"\n    },\n    {\n      \"name\": \"Ravi\",\n      \"voice_id\": \"pNInz6obpgDQGcFmaJgB\",\n      \"persona\": \"Curious generalist, keeps it plain-spoken.\"\n    }\n  ],\n  \"num_segments\": 2,\n  \"episode_name\": \"q3-recap\",\n  \"tts_provider\": \"elevenlabs\",\n  \"tts_model\": \"eleven_multilingual_v2\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift ElevenLabs
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "content": "Quarterly results: revenue grew 18% year on year, led by the new subscription plans ...",
  "briefing": "A two-host recap for non-finance listeners. Warm, concrete, no jargon.",
  "speakers": [
    [
      "name": "Asha",
      "voice_id": "21m00Tcm4TlvDq8ikWAM",
      "backstory": "Equity analyst covering consumer tech.",
      "persona": "Precise, asks the sharp follow-up."
    ],
    [
      "name": "Ravi",
      "voice_id": "pNInz6obpgDQGcFmaJgB",
      "persona": "Curious generalist, keeps it plain-spoken."
    ]
  ],
  "num_segments": 2,
  "episode_name": "q3-recap",
  "tts_provider": "elevenlabs",
  "tts_model": "eleven_multilingual_v2"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.voice.formantai.com/v1/podcast/jobs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
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()
```