SexyVoice Docs
Guides

SexyVoice CLI

Install and use the SexyVoice command-line tool for speech generation, voice lookup, curl output, and local playback

The SexyVoice CLI is a command-line client for the SexyVoice speech API. Use it to log in, list voices, generate speech, save or play audio, and print equivalent curl requests for debugging.

Prerequisites

  • A SexyVoice account
  • API access with enough credits to generate speech
  • One of the installation methods below

Install

Shell script

curl -fsSL https://raw.githubusercontent.com/gianpaj/sexyvoice-cli/main/install.sh | sh

To install a specific version, pass the version to the installer:

curl -fsSL https://raw.githubusercontent.com/gianpaj/sexyvoice-cli/main/install.sh | sh -s v0.1.0

From source

go install github.com/gianpaj/sexyvoice-cli@latest

Homebrew

If the Homebrew formula is available, install the CLI from the tap:

brew install gianpaj/sexyvoice-cli/sexyvoice-cli

Quick start

# Open the dashboard login flow and save an API key locally
sexyvoice login

# Generate speech and play it immediately
sexyvoice tts "Hello from SexyVoice" --voice achernar --model-id gpro

# Save generated speech to a file
sexyvoice tts "Hello from SexyVoice" --voice achernar --model-id gpro -o hello.wav

# List available voices
sexyvoice voices

# Print the equivalent curl request
sexyvoice curl "Hello from SexyVoice" --voice achernar --model-id gpro --format wav

Commands

sexyvoice login

Open the SexyVoice dashboard in your browser and save an API key locally. The login flow can reuse an existing API key by rotating it and storing the replacement key on your machine.

sexyvoice tts TEXT

Generate speech audio from text.

Common flags:

FlagShortDescription
--voice-vVoice name to use
--model-id-mModel ID: gpro, grok, or orpheus
--format-fResponse format: wav or mp3
--styleOptional style prompt
--seedOptional deterministic seed
--output-oSave to a file, or use - for stdout
--play-pPlay audio locally
--jsonEmit CLI result metadata as JSON

sexyvoice voices

List voices available from GET /api/v1/voices. The output includes voice names, model IDs, languages, formats, style support, and voice IDs.

sexyvoice voices

Use --json when you need machine-readable output:

sexyvoice voices --json

sexyvoice curl TEXT

Print the equivalent curl request for the speech endpoint. Use this when you want to debug a request or move from the CLI to a backend integration.

sexyvoice curl "Hello from SexyVoice" --voice achernar --model-id gpro --format wav

sexyvoice key

Print the resolved API key with no trailing newline.

sexyvoice key

Only run sexyvoice key in a private terminal. Do not paste API keys into logs, tickets, screenshots, or client-side code.

sexyvoice config

Manage config environments in ~/.sexyvoice/sexyvoice.toml.

sexyvoice config

sexyvoice play FILE

Play a local WAV or MP3 file.

sexyvoice play hello.wav

sexyvoice logout

Remove the saved local API key.

sexyvoice logout

Configuration

ItemLocation
Config directory~/.sexyvoice/
Config file~/.sexyvoice/sexyvoice.toml
Env API key overrideSEXYVOICE_API_KEY
Env API URL overrideSEXYVOICE_API_URL
Env auth prefix overrideSEXYVOICE_AUTH_HEADER_PREFIX

Default API URL:

https://sexyvoice.ai/api/v1/speech

How it works

  • sexyvoice login opens a browser-based dashboard flow and stores an API key locally.
  • The CLI validates API keys against GET /api/v1/models.
  • sexyvoice tts calls POST /api/v1/speech and downloads the returned audio URL for playback or saving.
  • sexyvoice curl prints the request you can adapt for scripts, servers, and tests.

Next steps

On this page