Replit
Add voice — STT, TTS, and LLM with provider routing and failover — to any Replit app.
Speko works on Replit two ways: connect the hosted MCP server so Replit Agent can operate Speko for you, or call the API from your Repl with the Python or TypeScript SDK.
Add Speko to Replit Agent (MCP)
One click installs the hosted Speko MCP server into Replit Agent:
Or add it by hand — + Add MCP server, name Speko, then Test & save:
https://mcp.speko.ai/mcpEither route opens Speko's OAuth sign-in, after which Agent has Speko tools across all your projects. For API-key auth instead of OAuth, add an Authorization: Bearer sk_live_xxx header under Advanced settings.
Things to ask Agent once connected:
- "Use the Speko MCP server to create a voice agent that answers in Spanish."
- "Check my Speko credit balance and usage."
- "Pull the transcript of my last Speko session."
The same server works in Claude Code, Codex, and Cursor — see MCP.
Call the API from your Repl
1. Get an API key
Sign up at platform.speko.ai — new organizations get $5 of starter credit. Open API keys, click Create key, and copy the sk_live_ value.
2. Store the key in Replit Secrets
In your Repl, open Tools → Secrets and add SPEKO_API_KEY with your sk_live_ value. Secrets become environment variables at runtime. They stay out of your code and version history, and carry over when the app is deployed. Agent can do it too — ask it to add a SPEKO_API_KEY secret and it will prompt you for the value.
3. Install the SDK
pip install spekoai # Python
npm install @spekoai/sdk # Node / TypeScript4. Make your first call
import os
from spekoai import Speko
speko = Speko(api_key=os.environ["SPEKO_API_KEY"])
speech = speko.synthesize("Salom, dunyo!", language="uz")
with open("hello.mp3", "wb") as f:
f.write(speech.audio)
print(speech.provider, speech.content_type)import { Speko } from '@spekoai/sdk';
import { writeFile } from 'node:fs/promises';
const speko = new Speko({ apiKey: process.env.SPEKO_API_KEY! });
const speech = await speko.synthesize('Salom, dunyo!', { language: 'uz' });
await writeFile('hello.mp3', Buffer.from(speech.audio));curl -X POST https://api.speko.dev/v1/synthesize \
-H "Authorization: Bearer $SPEKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "text": "Salom, dunyo!", "intent": { "language": "uz" } }' \
--output hello.mp35. Chain the voice loop
transcribe → complete → synthesize is a multilingual voice agent — each leg routed and failed over independently.
from spekoai import ChatMessage, RoutingIntent
result = speko.transcribe(audio_bytes, language="es-MX")
reply = speko.complete(
messages=[ChatMessage(role="user", content=result.text)],
intent=RoutingIntent(language="es-MX"),
)
speech = speko.synthesize(reply.text, language="es-MX")Full request and response shapes: One-shot APIs.
Prompts that work well with Replit Agent
Paste these into Agent once SPEKO_API_KEY is in Secrets:
- "Build a Flask app with a record button. Transcribe with
POST https://api.speko.dev/v1/transcribe, answer withPOST /v1/complete, speak the reply withPOST /v1/synthesize. BearerSPEKO_API_KEY, language from a dropdown." - "Add a voice note feature: upload audio, transcribe it with the
spekoaipackage, store the text." - "Make the app reply in the same language the user spoke — pass the selected language as the
intenton every Speko call."
Speko's docs are agent-readable. Point Agent at /llms.txt when it needs the full API surface.