API Documentation
Drop-in replacement for ElevenLabs. Use any ElevenLabs SDK — just change the base URL.
Quick Start- Get an API key (purchase Lab Access or contact sales@moln.ai)
- Set
base_url to https://samtal.moln.ai - Use your API key with the
xi-api-key header
Code examples in:
Text-to-SpeechPOST /v1/text-to-speech/{voice_id}
Params: output_format, num_steps, speed, p_temperature, c_temperature, include_word_timestamps
Speech-to-TextPOST /v1/speech-to-text
Returns: text, language_code, words[] with start/end timestamps
VoicesGET /v1/voices GET /v1/voices/{voice_id}
13 premade voices (EN, SV, DA, NO, FI, DE, FR, ES, IT, NL, PL, PT) + custom cloned/designed voices
Knowledge BasePOST /v1/convai/knowledge-base — upload document
GET /v1/convai/knowledge-base — list documents
POST /v1/convai/knowledge-base/search — semantic search
POST /v1/convai/knowledge-base/folders — create folder
Conversational AgentsPOST /v1/convai/agents/create
GET /v1/convai/agents GET /v1/convai/agents/{id} GET /v1/convai/agents/{id}/versions
Config: system_prompt, voice, knowledge_base_ids, mcp_server_ids, custom_llm, tts/asr/turn/conversation settings
Voice Conversations (WebSocket)GET /v1/convai/conversation/get-signed-url
WSS wss://samtal.moln.ai/v1/convai/conversation?agent_id=...&token=...
Events: user_audio_chunk, user_text, user_transcript, agent_response, audio, interruption, agent_response_metadata, ping/pong
MCP SkillsPOST /v1/convai/skills — add MCP server
POST /v1/convai/skills/{id}/test — discover tools
POST /v1/convai/skills/{id}/call — call tool