Inworld CLI
Authenticate, create API keys, synthesize speech, transcribe audio, and send chat completions from your terminal
Use the Inworld CLI from your terminal to authenticate, create API keys, synthesize speech, generate audiobooks, transcribe audio, call text models through Inworld Inference, and run the Inworld MCP server. Install one global package; no project setup or SDK installation is required.
It's also built for AI coding agents: an agent can log in, mint an API key, and call Inworld APIs directly from the shell — no MCP server configuration needed.
npm install -g @inworld/cliRequires Node.js 20+. The package installs two commands: inworld (the CLI) and inworld-mcp (the standalone MCP server, equivalent to inworld mcp).
Authentication
# Authenticate with Inworld Platform (opens browser)
inworld login
# Check current authentication status and configuration
inworld statusinworld login opens the Inworld sign-in page, which offers the same methods as the Portal: Google, Microsoft, GitHub, email and SSO. To skip the page, pass --provider google, github or azure (Microsoft) to go straight to that provider. --provider email opens the sign-in page for an email link.
If the browser runs on another machine, for example when you use the CLI over SSH, sign in there with Google, GitHub, Microsoft or SSO. The browser then fails to load an http://127.0.0.1 address. Copy that address from the address bar and paste it at the inworld login prompt. Email sign-in needs a browser on the same machine as the CLI. This needs CLI 2.1.0 or later.
Credentials are stored securely on your machine (macOS Keychain, Windows Credential Manager, or an encrypted file on Linux) and refreshed automatically.
CLI 1.4.0 changed how sign-in works. Sign-ins saved by earlier versions no longer work: after upgrading, run inworld login again.
For CI or other non-interactive environments, either authenticate with an Inworld access token or set an API key directly:
# Use an Inworld access token; add --refresh-token "$INWORLD_REFRESH_TOKEN" to let the CLI refresh it
inworld auth login-ci --token "$INWORLD_ACCESS_TOKEN" --email you@example.com
# Or skip login entirely with an API key
export INWORLD_API_KEY="..."Workspaces and API keys
# Select the workspace that CLI commands use
inworld workspace select
# Create a new API key (read-only by default) and print it once
inworld workspace add-key --name my-key
# Create a key with read/write permissions for voices and router
inworld workspace add-key --write --name my-key
# Write the new key to a new file as INWORLD_API_KEY=<key> instead of printing it
inworld workspace add-key --name my-key --output inworld.envCommands such as inworld tts run as you, in the selected workspace. The CLI does not store an API key. To run it with a key instead, set INWORLD_API_KEY, which takes precedence over the sign-in.
inworld workspace add-key shows the new key once and does not keep it. Copy it then, or use --output to write it to a file. The file must not exist yet. On macOS and Linux, only you can read it.
CLI 2.0.0 removed inworld workspace select-key and inworld auth print-api-key: the CLI no longer stores a key to select or print.
Text-to-Speech
# List available voices
inworld tts list-voices
# Show details for a voice, or listen to its preview sample
inworld tts get-voice Dennis
inworld tts preview Dennis --play
# Synthesize text to speech
inworld tts synthesize "Hello world" --voice Dennis --output hello.mp3
# Synthesize and play through speakers
inworld tts synthesize "[happy] Great to see you!" --play
# Pick a model (inworld-tts-2 or inworld-tts-2-flash)
inworld tts synthesize "Hello world" --model inworld-tts-2-flash --voice Dennis
# Clone a voice from an audio file (3-30 seconds, max 12MB)
inworld tts clone sample.wav --name "My Voice"
# Design a voice from a text description (interactive wizard)
inworld tts design "A warm, deep narrator voice with a slight British accent"synthesize supports audio markups directly in the text: emotions ([happy], [sad]), delivery styles ([whispering]), vocalizations ([laugh], [sigh]), SSML breaks, and IPA pronunciation.
Audiobooks
Turn a whole book into a single MP3 with chapter markers:
# Generate an audiobook from a .txt or .epub file
inworld audiobook generate book.epub --voice Dennis --output book.mp3Chapters are detected automatically from Markdown headings or "Chapter 1"-style lines in .txt, or from the spine in .epub. They are synthesized in parallel, each on its own TTS session so voice delivery stays consistent within a chapter. Long runs are resumable: pass --work-dir <dir> and a re-run skips chapters that already finished.
Speech-to-Text
# Transcribe an audio file
inworld stt transcribe recording.wav
# Transcribe with a specific language
inworld stt transcribe recording.mp3 --lang es-ESText inference
# List models available to your workspace
inworld llm models
# Send a chat completion request
inworld llm chat "What is the capital of France?" --model gpt-4o-miniMCP server
The CLI includes the full Inworld MCP server. It gives your AI assistant tools for speech synthesis and TTS previews, voice cloning, design and publishing, STT transcription, LLM chat (with or without spoken audio), workspace search and limits, billing summary, router management, and documentation search.
# Run as a stdio MCP server (for Claude Code, Cursor, etc.)
inworld mcp # or the standalone bin: inworld-mcp
# Or run over HTTP (listens on 127.0.0.1 by default; the endpoint is POST /mcp)
inworld mcp --http --port 3333For example, to add it to Claude Code:
claude mcp add inworld -- inworld mcpThe server uses the credentials it finds when it starts, and registers only the tools those credentials can call:
| Credential | How to provide it | Tools |
|---|---|---|
| API key | INWORLD_API_KEY | Speech synthesis, voice listing, cloning, design and publishing, transcription, chat completions, router listing, and documentation search (search_docs) |
| Sign-in | inworld login (or inworld mcp login) | The same API tools, run as you in the workspace selected with inworld workspace select, plus workspace, billing, voice and router management |
When INWORLD_API_KEY is set, the API tools use it instead of the sign-in. If you add a credential later, restart the MCP server to pick up the new tools.
Voice cloning, design and publishing write to your workspace. With an API key, they need a read/write key (inworld workspace add-key --write). With a read-only key the tools are still listed, but those calls fail.
Many agents don't need the MCP server at all — they can call inworld commands directly from the shell.
Telemetry
The CLI collects anonymous usage analytics. To opt out:
inworld auth disable_cli_telemetryOr set DISABLE_TELEMETRY=1 in the environment.
Inworld CLI vs. Runtime CLI
The Inworld CLI (inworld) covers platform APIs: auth, API keys, TTS, STT, and text inference. For Agent Runtime graph development and deployment (inworld-runtime init/run/deploy), see the Runtime CLI.