For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DocumentationAPI ReferenceSelf HostModel CardsClient LibrariesIntegrationsDeveloper ToolsChangelog
DocumentationAPI ReferenceSelf HostModel CardsClient LibrariesIntegrationsDeveloper ToolsChangelog
  • Getting Started
    • Introduction
    • Models
    • Authentication
  • Text to Speech (Lightning)
    • Quickstart
    • Overview
    • Sync & Async
    • Streaming
    • Pronunciation Dictionaries
    • Voices & Languages
    • HTTP vs Streaming vs WebSockets
  • Speech to Text (Pulse)
    • Quickstart
    • Overview
  • LLM (Electron)
    • Quickstart
    • Overview
    • Chat Completions
    • Streaming
    • Tool / Function Calling
    • Prefix Caching
    • Supported Parameters
    • Migrate from OpenAI
    • Best Practices
  • Cookbooks
    • Speech to Text
    • Text to Speech
    • Voice Agent (Electron + Pulse + Lightning)
  • Voice Cloning
    • Instant Clone (UI)
    • Instant Clone (API)
    • Instant Clone (Python SDK)
    • Delete Cloned Voice
  • Best Practices
    • Voice Cloning Best Practices
    • TTS Best Practices
  • Troubleshooting
    • Error reference
LogoLogo
Voice AgentsModels
Voice AgentsModels
On this page
  • Create Your API Key
  • Using Your API Key
  • Security
  • Error Responses
Getting Started

Authentication

||View as Markdown|
Was this page helpful?
Previous

Models

Next

Quickstart

Built with

Every API request requires an API key in the Authorization header.

Create Your API Key

1

Open the Smallest AI console

In the Smallest AI console, select API Keys from the left sidebar under Developer.

Smallest AI dashboard with API Keys highlighted under Developer section in the left sidebar
2

Create a new key

Click Create API Key in the top-right corner, enter a name (e.g., my-tts-app), and click Create API Key to confirm.

API Keys page showing the Create API Key buttonCreate New API Key dialog with API Name field and Create API Key button
3

Copy the key

The new key appears in your dashboard. Click the copy icon to copy it — it’s shown only once at creation, so copy it now.

API Keys dashboard showing the newly created key with copy icon highlighted
4

Set it in your environment

$export SMALLEST_API_KEY="your-api-key-here"

Add this to your .bashrc or .zshrc to persist across sessions.

Using Your API Key

Include your key in the Authorization header with every request:

Authorization: Bearer YOUR_API_KEY
$curl -X POST "https://api.smallest.ai/waves/v1/tts" \
> -H "Authorization: Bearer $SMALLEST_API_KEY" \
> -H "Content-Type: application/json" \
> -H "Accept: audio/wav" \
> -d '{"text": "Authentication test", "voice_id": "meher", "model": "lightning_v3.1_pro", "output_format": "wav"}' \
> --output test.wav

Security

Your API key is a secret. Never expose it in client-side code, public repositories, or browser applications.

  • Store keys in environment variables, not in source code
  • Use .env files locally (add .env to .gitignore)
  • Rotate keys periodically via the console
  • Each key tracks usage against your account quota

Error Responses

StatusMeaning
401 UnauthorizedMissing or invalid API key
403 ForbiddenKey doesn’t have access to this resource
429 Too Many RequestsRate limit exceeded — wait and retry

For rate limits and concurrency details, see Concurrency and Limits.