> ## Documentation Index
> Fetch the complete documentation index at: https://magichour-dependabot-github-actions-actions-checkout-7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Voice Generator API Reference - Magic Hour Docs

> Generate speech from text. Each character costs 0.05 credits. The cost is rounded up to the nearest whole number.



## OpenAPI

````yaml post /v1/ai-voice-generator
openapi: 3.0.2
info:
  title: Magic Hour API
  version: beta
  description: >

    Magic Hour provides an API (beta) that can be integrated into your own
    application to generate videos and images using AI. 


    Webhook documentation can be found
    [here](https://magichour.ai/docs/webhook).


    If you have any questions, please reach out to us via
    [discord](https://discord.gg/JX5rgsZaJp).


    # Authentication


    Every request requires an API key.


    To get started, first generate your API key
    [here](https://magichour.ai/settings/developer).


    Then, add the `Authorization` header to the request.


    | Key | Value |

    |-|-|

    | Authorization | Bearer mhk_live_apikey |


    > **Warning**: any API call that renders a video will utilize credits in
    your account.
  termsOfService: https://magichour.ai/terms-of-service
servers:
  - url: https://api.magichour.ai
security: []
tags:
  - name: Files
    description: API related to uploading assets used for video generation
  - name: Image Projects
    description: API related to image projects
  - name: Video Projects
    description: API related to video projects
  - name: Audio Projects
    description: API related to audio projects
paths:
  /v1/ai-voice-generator:
    post:
      tags:
        - Audio Projects
      summary: AI Voice Generator
      description: >-
        Generate speech from text. Each character costs 0.05 credits. The cost
        is rounded up to the nearest whole number.
      operationId: aiVoiceGenerator.createAudio
      parameters: []
      requestBody:
        required: true
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: Give your audio a custom name for easy identification.
                  example: My Voice Generator audio
                  default: Voice Generator - dateTime
                style:
                  type: object
                  properties:
                    prompt:
                      type: string
                      minLength: 1
                      description: >-
                        Text used to generate speech. The character limit is
                        1000 characters.
                      example: Hello, how are you?
                    voice_name:
                      type: string
                      enum:
                        - Elon Musk
                        - Mark Zuckerberg
                        - Joe Rogan
                        - Barack Obama
                        - Morgan Freeman
                        - Kanye West
                        - Donald Trump
                        - Joe Biden
                        - Kim Kardashian
                        - Taylor Swift
                        - James Earl Jones
                        - Samuel L. Jackson
                        - Jeff Goldblum
                        - David Attenborough
                        - Sean Connery
                        - Cillian Murphy
                        - Anne Hathaway
                        - Julia Roberts
                        - Natalie Portman
                        - Steve Carell
                        - Amy Poehler
                        - Stephen Colbert
                        - Jimmy Fallon
                        - David Letterman
                        - Alex Trebek
                        - Katy Perry
                        - Prince
                        - Kevin Bacon
                        - Tom Hiddleston
                        - Adam Driver
                        - Alan Rickman
                        - Alexz Johnson
                        - Ana Gasteyer
                        - Andrew Rannells
                        - Arden Cho
                        - Bear Grylls
                        - Ben McKenzie
                        - Ben Stiller
                        - Ben Whishaw
                        - Billie Joe Armstrong
                        - Bingbing Li
                        - Booboo Stewart
                        - Bradley Steven Perry
                        - Bruno Mars
                        - Caity Lotz
                        - Cameron Boyce
                        - Candice Accola
                        - Carrie Underwood
                        - Casey Affleck
                        - Caterina Scorsone
                        - Cedric the Entertainer
                        - Chace Crawford
                        - Chadwick Boseman
                        - Charlie Day
                        - Chris Hemsworth
                        - Chris Martin
                        - Christopher Mintz-Plasse
                        - Dan Fogler
                        - Dan Stevens
                        - Daniel Dae Kim
                        - Danielle Panabaker
                        - Dave Bautista
                        - David Schwimmer
                        - Denis Leary
                        - Derek Mears
                        - Diego Luna
                        - Donald Glover
                        - Donnie Yen
                        - Doutzen Kroes
                        - Dove Cameron
                        - Dr. Dre
                        - Drake Bell
                        - Elle Fanning
                        - Ernie Hudson
                        - Fergie
                        - Forest Whitaker
                        - Francia Raisa
                        - Freddie Highmore
                        - Gillian Jacobs
                        - Gina Carano
                        - Ginnifer Goodwin
                        - Gordon Ramsay
                        - Guy Pearce
                        - Gwendoline Christie
                        - Hailee Steinfeld
                        - Howie Mandel
                        - Hugh Jackman
                        - Hugh Laurie
                        - J. K. Simmons
                        - Jack Black
                        - Jared Leto
                        - Jennifer Carpenter
                        - Kesha
                        - Kris Jenner
                        - Kristen Bell
                        - Lorde
                        - Matt Smith
                        - Marilyn Monroe
                        - Charlie Chaplin
                        - Albert Einstein
                        - Abraham Lincoln
                        - John F. Kennedy
                        - Lucille Ball
                        - A.R. Rahman
                        - Aamir Khan
                        - Ajay Devgn
                        - Akshay Kumar
                        - Alain Delon
                        - Alan Alda
                        - Alan Cumming
                        - Amitabh Bachchan
                        - Ang Lee
                        - Ansel Elgort
                        - Anthony Anderson
                        - Anthony Mackie
                        - Armie Hammer
                        - Asa Butterfield
                        - B.J. Novak
                        - Barbara Eden
                        - Betty White
                        - Bill Nighy
                        - Bill Pullman
                        - Blake Shelton
                        - Bonnie Wright
                        - Brad Paisley
                        - Brendan Gleeson
                        - Brian Cox
                        - Bruno Ganz
                        - Burt Reynolds
                        - Carrie Fisher
                        - Charles Dance
                        - Chiwetel Ejiofor
                        - Chris Pine
                        - Christina Hendricks
                        - Christina Ricci
                        - Cyndi Lauper
                        - Dakota Fanning
                        - Damian Lewis
                        - Dan Aykroyd
                        - Daniel Craig
                        - David Oyelowo
                        - David Tennant
                        - Diane Keaton
                        - Diane Kruger
                        - Dick Van Dyke
                        - Domhnall Gleeson
                        - Dominic Cooper
                        - Donald Sutherland
                        - Drew Carey
                        - Eartha Kitt
                        - Eddie Izzard
                        - Edward Asner
                        - Eli Roth
                        - Elisabeth Moss
                        - Ellen Burstyn
                        - Emile Hirsch
                        - Ezra Miller
                        - Felicity Jones
                        - Fiona Shaw
                        - Florence Henderson
                        - Freida Pinto
                        - Geena Davis
                        - Gemma Arterton
                        - Geri Halliwell
                        - Glenn Close
                        - Gloria Steinem
                        - Greta Gerwig
                        - Gugu Mbatha-Raw
                        - Hans Zimmer
                        - Harry Connick Jr.
                        - Harvey Keitel
                        - Helena Bonham Carter
                        - Henry Cavill
                        - Hilary Swank
                        - Hugh Bonneville
                        - Idina Menzel
                        - Imelda Staunton
                        - Ingrid Bergman
                        - Irrfan Khan
                        - Isla Fisher
                        - Iwan Rheon
                        - Jack Lemmon
                        - Janet Jackson
                        - Jason Bateman
                        - Jason Segel
                        - Jennifer Coolidge
                        - Johnny Galecki
                        - Jon Favreau
                        - Joseph Gordon-Levitt
                        - Josh Brolin
                        - Josh Gad
                        - Josh Groban
                        - Julia Louis-Dreyfus
                        - Kristen Stewart
                        - Kristen Wiig
                        - Rooney Mara
                        - Caitriona Balfe
                        - J.J. Abrams
                        - Zoe Saldana
                        - SpongeBob SquarePants
                        - Patrick Star
                        - Squidward Tentacles
                        - Homer Simpson
                        - Bart Simpson
                        - Peter Griffin
                        - Stewie Griffin
                        - Eric Cartman
                        - Rick Sanchez
                        - Bugs Bunny
                        - Mickey Mouse
                        - Donald Duck
                        - Shrek
                        - Donkey (Shrek)
                        - Elsa (Frozen)
                        - Woody (Toy Story)
                        - Buzz Lightyear
                        - Scooby-Doo
                        - Shaggy Rogers
                        - Bender (Futurama)
                        - Optimus Prime
                        - Batman (Animated)
                        - The Joker (Animated)
                        - Darth Vader
                        - Yoda
                        - Gollum Smeagol
                        - Gandalf
                        - Winnie the Pooh
                        - Kermit the Frog
                        - Elmo
                        - SpiderMan (Tom Holland ver.)
                        - Mario
                        - Luigi
                        - Sonic the Hedgehog
                        - Naruto Uzumaki
                        - Goku
                        - Vegeta
                        - Light Yagami
                        - Luffy (One Piece)
                        - Edward Elric
                        - Eren Jaeger
                        - Levi Ackerman
                        - Tanjiro Kamado
                        - All Might
                        - GLaDOS
                        - Master Chief
                        - Kratos
                        - Arthur Morgan
                        - Geralt of Rivia
                        - Dwayne 'The Rock' Johnson
                        - LeBron James
                        - Shaquille O'Neal
                        - Conor McGregor
                        - Mike Tyson
                        - Kobe Bryant
                        - Floyd Mayweather
                        - Cristiano Ronaldo
                        - Lionel Messi
                        - Serena Williams
                        - Tom Brady
                        - Stephen Curry
                        - John Cena
                        - Hulk Hogan
                        - Stone Cold Steve Austin
                        - The Undertaker
                        - Nate Diaz
                        - Charles Barkley
                        - Shannon Sharpe
                        - Drake
                        - Beyonce
                        - Rihanna
                        - Eminem
                        - Snoop Dogg
                        - Jay-Z
                        - Ed Sheeran
                        - Billie Eilish
                        - Ariana Grande
                        - Adele
                        - Post Malone
                        - Travis Scott
                        - Nicki Minaj
                        - Cardi B
                        - Doja Cat
                        - Bad Bunny
                        - Shakira
                        - Justin Bieber
                        - Sabrina Carpenter
                        - Chappell Roan
                        - Dua Lipa
                        - The Weeknd
                        - Miley Cyrus
                        - Lady Gaga
                        - Kendrick Lamar
                        - Ozzy Osbourne
                        - Freddie Mercury
                        - Elvis Presley
                        - Bob Marley
                        - Frank Sinatra
                        - MrBeast
                        - PewDiePie
                        - Kai Cenat
                        - IShowSpeed
                        - Markiplier
                        - Jacksepticeye
                        - KSI
                        - Logan Paul
                        - Jake Paul
                        - Dream (Minecraft)
                        - Corpse Husband
                        - xQc
                        - Pokimane
                        - Valkyrae
                        - Ninja
                        - Joe Scott
                        - Linus (LTT)
                        - Ryan Reynolds
                        - Tom Hanks
                        - Robert Downey Jr.
                        - Will Smith
                        - Denzel Washington
                        - Leonardo DiCaprio
                        - Brad Pitt
                        - Keanu Reeves
                        - Nicolas Cage
                        - Al Pacino
                        - Robert De Niro
                        - Arnold Schwarzenegger
                        - Sylvester Stallone
                        - Vin Diesel
                        - Jason Statham
                        - Tom Cruise
                        - Johnny Depp
                        - Scarlett Johansson
                        - Angelina Jolie
                        - Jennifer Aniston
                        - Emma Watson
                        - Margot Robbie
                        - Sydney Sweeney
                        - Zendaya
                        - Timothee Chalamet
                        - Pedro Pascal
                        - Oscar Isaac
                        - Benedict Cumberbatch
                        - Ian McKellen
                        - Patrick Stewart
                        - Christopher Walken
                        - Matthew McConaughey
                        - Harrison Ford
                        - Mark Wahlberg
                        - Owen Wilson
                        - Seth Rogen
                        - Kevin Hart
                        - Adam Sandler
                        - Jim Carrey
                        - Eddie Murphy
                        - Robin Williams
                        - Will Ferrell
                        - Melissa McCarthy
                        - Awkwafina
                        - Jason Momoa
                        - Idris Elba
                        - Tom Hardy
                        - Michael B. Jordan
                        - Austin Butler
                        - Glen Powell
                        - Paul Giamatti
                        - Bryan Cranston
                        - Bob Odenkirk
                        - Vladimir Putin
                        - Queen Elizabeth II
                        - Winston Churchill
                        - Martin Luther King Jr.
                        - Kamala Harris
                        - Bernie Sanders
                        - Alexandria Ocasio-Cortez
                        - Narendra Modi
                        - Oprah Winfrey
                        - Ellen DeGeneres
                        - Dr. Phil
                        - Steve Harvey
                        - Trevor Noah
                        - John Oliver
                        - James Corden
                        - Ryan Seacrest
                        - Howard Stern
                        - Conan O'Brien
                        - Seth Meyers
                        - Bill Nye
                        - Neil deGrasse Tyson
                        - Guy Fieri
                        - Dave Chappelle
                        - Chris Rock
                        - Jerry Seinfeld
                        - Ali Wong
                        - John Mulaney
                        - Hasan Minhaj
                        - Nikki Glaser
                        - Matt Rife
                        - Gabriel Iglesias
                        - Bo Burnham
                        - Jeff Bezos
                        - Bill Gates
                        - Steve Jobs
                        - Tim Cook
                        - Sam Altman
                        - Jensen Huang
                        - Gilbert Gottfried
                        - James May
                        - Jeremy Clarkson
                        - Richard Hammond
                        - Bob Ross
                        - Anthony Bourdain
                        - David Goggins
                        - Jordan Peterson
                        - Joe Pesci
                        - Danny DeVito
                        - Seth MacFarlane
                        - Patrick Warburton
                        - Keith David
                        - Mark Hamill
                        - Liam Neeson
                        - Antonio Banderas
                        - Sofia Vergara
                        - Penelope Cruz
                        - Gal Gadot
                        - Cate Blanchett
                        - Viola Davis
                        - Meryl Streep
                        - Sandra Bullock
                        - Reese Witherspoon
                        - Salma Hayek
                        - Lupita Nyong'o
                        - Florence Pugh
                        - Jenna Ortega
                        - Ana de Armas
                        - Jacob Elordi
                        - Barry White
                        - Dolly Parton
                        - Willie Nelson
                        - Lil Wayne
                        - 50 Cent
                        - Ice Cube
                        - Tupac Shakur
                        - Notorious B.I.G.
                        - Bob Dylan
                        - David Bowie
                        - Michael Jackson
                        - Whitney Houston
                        - Amy Winehouse
                        - SZA
                        - Tyler, The Creator
                        - Thanos
                        - Tony Stark
                        - Captain Jack Sparrow
                        - Walter White
                        - Tommy Shelby
                        - Michael Scott
                        - Dwight Schrute
                        - Bowser
                        - Usain Bolt
                        - Tyson Fury
                        - Dana White
                        - Pat McAfee
                        - Giannis Antetokounmpo
                        - Lex Fridman
                        - Ben Shapiro
                        - Tucker Carlson
                        - Martha Stewart
                        - Gordon Lightfoot
                        - Lizzo
                        - Megan Thee Stallion
                        - Ice Spice
                        - 21 Savage
                        - Metro Boomin
                        - Jack Harlow
                        - Peso Pluma
                        - BTS Jungkook
                        - Quentin Tarantino
                        - Werner Herzog
                        - Anderson Cooper
                        - Rachel Maddow
                        - Mahatma Gandhi
                        - Muhammad Ali
                        - Princess Diana
                        - Nelson Mandela
                        - Steve Irwin
                        - Morty Smith
                        - Andrew Huberman
                        - Willem Dafoe
                        - Mike Rowe
                        - Terminator
                        - Deadpool
                        - Plankton
                        - Mr. Krabs
                        - Picard
                      description: >-
                        The voice to use for the speech. Available voices: Elon
                        Musk, Mark Zuckerberg, Joe Rogan, Barack Obama, Morgan
                        Freeman, Kanye West, Donald Trump, Joe Biden, Kim
                        Kardashian, Taylor Swift, James Earl Jones, Samuel L.
                        Jackson, Jeff Goldblum, David Attenborough, Sean
                        Connery, Cillian Murphy, Anne Hathaway, Julia Roberts,
                        Natalie Portman, Steve Carell, Amy Poehler, Stephen
                        Colbert, Jimmy Fallon, David Letterman, Alex Trebek,
                        Katy Perry, Prince, Kevin Bacon, Tom Hiddleston, Adam
                        Driver, Alan Rickman, Alexz Johnson, Ana Gasteyer,
                        Andrew Rannells, Arden Cho, Bear Grylls, Ben McKenzie,
                        Ben Stiller, Ben Whishaw, Billie Joe Armstrong, Bingbing
                        Li, Booboo Stewart, Bradley Steven Perry, Bruno Mars,
                        Caity Lotz, Cameron Boyce, Candice Accola, Carrie
                        Underwood, Casey Affleck, Caterina Scorsone, Cedric the
                        Entertainer, Chace Crawford, Chadwick Boseman, Charlie
                        Day, Chris Hemsworth, Chris Martin, Christopher
                        Mintz-Plasse, Dan Fogler, Dan Stevens, Daniel Dae Kim,
                        Danielle Panabaker, Dave Bautista, David Schwimmer,
                        Denis Leary, Derek Mears, Diego Luna, Donald Glover,
                        Donnie Yen, Doutzen Kroes, Dove Cameron, Dr. Dre, Drake
                        Bell, Elle Fanning, Ernie Hudson, Fergie, Forest
                        Whitaker, Francia Raisa, Freddie Highmore, Gillian
                        Jacobs, Gina Carano, Ginnifer Goodwin, Gordon Ramsay,
                        Guy Pearce, Gwendoline Christie, Hailee Steinfeld, Howie
                        Mandel, Hugh Jackman, Hugh Laurie, J. K. Simmons, Jack
                        Black, Jared Leto, Jennifer Carpenter, Kesha, Kris
                        Jenner, Kristen Bell, Lorde, Matt Smith, Marilyn Monroe,
                        Charlie Chaplin, Albert Einstein, Abraham Lincoln, John
                        F. Kennedy, Lucille Ball, A.R. Rahman, Aamir Khan, Ajay
                        Devgn, Akshay Kumar, Alain Delon, Alan Alda, Alan
                        Cumming, Amitabh Bachchan, Ang Lee, Ansel Elgort,
                        Anthony Anderson, Anthony Mackie, Armie Hammer, Asa
                        Butterfield, B.J. Novak, Barbara Eden, Betty White, Bill
                        Nighy, Bill Pullman, Blake Shelton, Bonnie Wright, Brad
                        Paisley, Brendan Gleeson, Brian Cox, Bruno Ganz, Burt
                        Reynolds, Carrie Fisher, Charles Dance, Chiwetel
                        Ejiofor, Chris Pine, Christina Hendricks, Christina
                        Ricci, Cyndi Lauper, Dakota Fanning, Damian Lewis, Dan
                        Aykroyd, Daniel Craig, David Oyelowo, David Tennant,
                        Diane Keaton, Diane Kruger, Dick Van Dyke, Domhnall
                        Gleeson, Dominic Cooper, Donald Sutherland, Drew Carey,
                        Eartha Kitt, Eddie Izzard, Edward Asner, Eli Roth,
                        Elisabeth Moss, Ellen Burstyn, Emile Hirsch, Ezra
                        Miller, Felicity Jones, Fiona Shaw, Florence Henderson,
                        Freida Pinto, Geena Davis, Gemma Arterton, Geri
                        Halliwell, Glenn Close, Gloria Steinem, Greta Gerwig,
                        Gugu Mbatha-Raw, Hans Zimmer, Harry Connick Jr., Harvey
                        Keitel, Helena Bonham Carter, Henry Cavill, Hilary
                        Swank, Hugh Bonneville, Idina Menzel, Imelda Staunton,
                        Ingrid Bergman, Irrfan Khan, Isla Fisher, Iwan Rheon,
                        Jack Lemmon, Janet Jackson, Jason Bateman, Jason Segel,
                        Jennifer Coolidge, Johnny Galecki, Jon Favreau, Joseph
                        Gordon-Levitt, Josh Brolin, Josh Gad, Josh Groban, Julia
                        Louis-Dreyfus, Kristen Stewart, Kristen Wiig, Rooney
                        Mara, Caitriona Balfe, J.J. Abrams, Zoe Saldana,
                        SpongeBob SquarePants, Patrick Star, Squidward
                        Tentacles, Homer Simpson, Bart Simpson, Peter Griffin,
                        Stewie Griffin, Eric Cartman, Rick Sanchez, Bugs Bunny,
                        Mickey Mouse, Donald Duck, Shrek, Donkey (Shrek), Elsa
                        (Frozen), Woody (Toy Story), Buzz Lightyear, Scooby-Doo,
                        Shaggy Rogers, Bender (Futurama), Optimus Prime, Batman
                        (Animated), The Joker (Animated), Darth Vader, Yoda,
                        Gollum Smeagol, Gandalf, Winnie the Pooh, Kermit the
                        Frog, Elmo, SpiderMan (Tom Holland ver.), Mario, Luigi,
                        Sonic the Hedgehog, Naruto Uzumaki, Goku, Vegeta, Light
                        Yagami, Luffy (One Piece), Edward Elric, Eren Jaeger,
                        Levi Ackerman, Tanjiro Kamado, All Might, GLaDOS, Master
                        Chief, Kratos, Arthur Morgan, Geralt of Rivia, Dwayne
                        'The Rock' Johnson, LeBron James, Shaquille O'Neal,
                        Conor McGregor, Mike Tyson, Kobe Bryant, Floyd
                        Mayweather, Cristiano Ronaldo, Lionel Messi, Serena
                        Williams, Tom Brady, Stephen Curry, John Cena, Hulk
                        Hogan, Stone Cold Steve Austin, The Undertaker, Nate
                        Diaz, Charles Barkley, Shannon Sharpe, Drake, Beyonce,
                        Rihanna, Eminem, Snoop Dogg, Jay-Z, Ed Sheeran, Billie
                        Eilish, Ariana Grande, Adele, Post Malone, Travis Scott,
                        Nicki Minaj, Cardi B, Doja Cat, Bad Bunny, Shakira,
                        Justin Bieber, Sabrina Carpenter, Chappell Roan, Dua
                        Lipa, The Weeknd, Miley Cyrus, Lady Gaga, Kendrick
                        Lamar, Ozzy Osbourne, Freddie Mercury, Elvis Presley,
                        Bob Marley, Frank Sinatra, MrBeast, PewDiePie, Kai
                        Cenat, IShowSpeed, Markiplier, Jacksepticeye, KSI, Logan
                        Paul, Jake Paul, Dream (Minecraft), Corpse Husband, xQc,
                        Pokimane, Valkyrae, Ninja, Joe Scott, Linus (LTT), Ryan
                        Reynolds, Tom Hanks, Robert Downey Jr., Will Smith,
                        Denzel Washington, Leonardo DiCaprio, Brad Pitt, Keanu
                        Reeves, Nicolas Cage, Al Pacino, Robert De Niro, Arnold
                        Schwarzenegger, Sylvester Stallone, Vin Diesel, Jason
                        Statham, Tom Cruise, Johnny Depp, Scarlett Johansson,
                        Angelina Jolie, Jennifer Aniston, Emma Watson, Margot
                        Robbie, Sydney Sweeney, Zendaya, Timothee Chalamet,
                        Pedro Pascal, Oscar Isaac, Benedict Cumberbatch, Ian
                        McKellen, Patrick Stewart, Christopher Walken, Matthew
                        McConaughey, Harrison Ford, Mark Wahlberg, Owen Wilson,
                        Seth Rogen, Kevin Hart, Adam Sandler, Jim Carrey, Eddie
                        Murphy, Robin Williams, Will Ferrell, Melissa McCarthy,
                        Awkwafina, Jason Momoa, Idris Elba, Tom Hardy, Michael
                        B. Jordan, Austin Butler, Glen Powell, Paul Giamatti,
                        Bryan Cranston, Bob Odenkirk, Vladimir Putin, Queen
                        Elizabeth II, Winston Churchill, Martin Luther King Jr.,
                        Kamala Harris, Bernie Sanders, Alexandria Ocasio-Cortez,
                        Narendra Modi, Oprah Winfrey, Ellen DeGeneres, Dr. Phil,
                        Steve Harvey, Trevor Noah, John Oliver, James Corden,
                        Ryan Seacrest, Howard Stern, Conan O'Brien, Seth Meyers,
                        Bill Nye, Neil deGrasse Tyson, Guy Fieri, Dave
                        Chappelle, Chris Rock, Jerry Seinfeld, Ali Wong, John
                        Mulaney, Hasan Minhaj, Nikki Glaser, Matt Rife, Gabriel
                        Iglesias, Bo Burnham, Jeff Bezos, Bill Gates, Steve
                        Jobs, Tim Cook, Sam Altman, Jensen Huang, Gilbert
                        Gottfried, James May, Jeremy Clarkson, Richard Hammond,
                        Bob Ross, Anthony Bourdain, David Goggins, Jordan
                        Peterson, Joe Pesci, Danny DeVito, Seth MacFarlane,
                        Patrick Warburton, Keith David, Mark Hamill, Liam
                        Neeson, Antonio Banderas, Sofia Vergara, Penelope Cruz,
                        Gal Gadot, Cate Blanchett, Viola Davis, Meryl Streep,
                        Sandra Bullock, Reese Witherspoon, Salma Hayek, Lupita
                        Nyong'o, Florence Pugh, Jenna Ortega, Ana de Armas,
                        Jacob Elordi, Barry White, Dolly Parton, Willie Nelson,
                        Lil Wayne, 50 Cent, Ice Cube, Tupac Shakur, Notorious
                        B.I.G., Bob Dylan, David Bowie, Michael Jackson, Whitney
                        Houston, Amy Winehouse, SZA, Tyler, The Creator, Thanos,
                        Tony Stark, Captain Jack Sparrow, Walter White, Tommy
                        Shelby, Michael Scott, Dwight Schrute, Bowser, Usain
                        Bolt, Tyson Fury, Dana White, Pat McAfee, Giannis
                        Antetokounmpo, Lex Fridman, Ben Shapiro, Tucker Carlson,
                        Martha Stewart, Gordon Lightfoot, Lizzo, Megan Thee
                        Stallion, Ice Spice, 21 Savage, Metro Boomin, Jack
                        Harlow, Peso Pluma, BTS Jungkook, Quentin Tarantino,
                        Werner Herzog, Anderson Cooper, Rachel Maddow, Mahatma
                        Gandhi, Muhammad Ali, Princess Diana, Nelson Mandela,
                        Steve Irwin, Morty Smith, Andrew Huberman, Willem Dafoe,
                        Mike Rowe, Terminator, Deadpool, Plankton, Mr. Krabs,
                        Picard
                      example: Elon Musk
                  required:
                    - prompt
                    - voice_name
                  description: The content used to generate speech.
                  example:
                    prompt: Hello, how are you?
                    voice_name: Elon Musk
              required:
                - style
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: cuid-example
                    description: >-
                      Unique ID of the audio. Use it with the [Get audio Project
                      API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details)
                      to fetch status and downloads.
                  credits_charged:
                    type: integer
                    description: >-
                      The amount of credits deducted from your account to
                      generate the audio. We charge credits right when the
                      request is made. 


                      If an error occurred while generating the audio, credits
                      will be refunded and this field will be updated to include
                      the refund.
                    example: 1
                required:
                  - id
                  - credits_charged
                description: Success
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                description: The request is invalid
                example:
                  message: Missing request body
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Unauthorized
                required:
                  - message
                description: The request is not properly authenticated
                example:
                  message: Unauthorized
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
                description: The request requires payment
                example:
                  message: Payment required
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    enum:
                      - Not Found
                required:
                  - message
                description: Requested resource is not found
                example:
                  message: Not Found
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unable to generate speech
                required:
                  - message
                description: Unprocessable Entity
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: python
          source: |-
            from magic_hour import Client
            from os import getenv

            client = Client(token=getenv("API_TOKEN"))
            res = client.v1.ai_voice_generator.generate(
                style={"prompt": "Hello, how are you?", "voice_name": "Elon Musk"},
                name="Voice Generator audio",
                wait_for_completion=True,
                download_outputs=True,
                download_directory="."
            )
        - lang: javascript
          source: |-
            import { Client } from "magic-hour";

            const client = new Client({ token: process.env["API_TOKEN"]!! });
            const res = await client.v1.aiVoiceGenerator.generate(
              {
                name: "Voice Generator audio",
                style: { prompt: "Hello, how are you?", voiceName: "Elon Musk" },
              },
              {
                waitForCompletion: true,
                downloadOutputs: true,
                downloadDirectory: ".",
              },
            );
        - lang: go
          source: "package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tai_voice_generator \"github.com/magichourhq/magic-hour-go/resources/v1/ai_voice_generator\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"API_TOKEN\")),\n\t)\n\tres, err := client.V1.AiVoiceGenerator.Create(ai_voice_generator.CreateRequest{\n\t\tName: nullable.NewValue(\"My Voice Generator audio\"),\n\t\tStyle: types.V1AiVoiceGeneratorCreateBodyStyle{\n\t\t\tPrompt:    \"Hello, how are you?\",\n\t\t\tVoiceName: types.V1AiVoiceGeneratorCreateBodyStyleVoiceNameEnumElonMusk,\n\t\t},\n\t})\n}"
        - lang: rust
          source: |-
            let client = magic_hour::Client::default()
                .with_bearer_auth(&std::env::var("API_TOKEN").unwrap());
            let res = client
                .v1()
                .ai_voice_generator()
                .create(magic_hour::resources::v1::ai_voice_generator::CreateRequest {
                    name: Some("My Voice Generator audio".to_string()),
                    style: magic_hour::models::V1AiVoiceGeneratorCreateBodyStyle {
                        prompt: "Hello, how are you?".to_string(),
                        voice_name: magic_hour::models::V1AiVoiceGeneratorCreateBodyStyleVoiceNameEnum::ElonMusk,
                    },
                })
                .await;
        - lang: curl
          source: |-
            curl --request POST \
                 --url https://api.magichour.ai/v1/ai-voice-generator \
                 --header 'accept: application/json' \
                 --header 'authorization: Bearer <token>' \
                 --header 'content-type: application/json' \
                 --data '
            {
              "name": "My Voice Generator audio",
              "style": {
                "prompt": "Hello, how are you?",
                "voice_name": "Elon Musk"
              }
            }
            '
        - lang: php
          source: |-
            <?php

            $curl = curl_init();

            curl_setopt_array($curl, [
              CURLOPT_URL => "https://api.magichour.ai/v1/ai-voice-generator",
              CURLOPT_RETURNTRANSFER => true,
              CURLOPT_ENCODING => "",
              CURLOPT_MAXREDIRS => 10,
              CURLOPT_TIMEOUT => 30,
              CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
              CURLOPT_CUSTOMREQUEST => "POST",
              CURLOPT_POSTFIELDS => json_encode([
                'name' => 'My Voice Generator audio',
                'style' => [
                    'prompt' => 'Hello, how are you?',
                    'voice_name' => 'Elon Musk'
                ]
              ]),
              CURLOPT_HTTPHEADER => [
                "accept: application/json",
                "authorization: Bearer <token>",
                "content-type: application/json"
              ],
            ]);

            $response = curl_exec($curl);
            $err = curl_error($curl);

            curl_close($curl);

            if ($err) {
              echo "cURL Error #:" . $err;
            } else {
              echo $response;
            }
        - lang: java
          source: >-
            HttpResponse<String> response =
            Unirest.post("https://api.magichour.ai/v1/ai-voice-generator")
              .header("accept", "application/json")
              .header("content-type", "application/json")
              .header("authorization", "Bearer <token>")
              .body("{\"name\":\"My Voice Generator audio\",\"style\":{\"prompt\":\"Hello, how are you?\",\"voice_name\":\"Elon Musk\"}}")
              .asString();
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form `Bearer <api_key>`, where
        `<api_key>` is your API key. To get your API key, go to [Developer
        Hub](https://magichour.ai/developer?tab=api-keys) and click "Create new
        API Key".

````