Convert text to speech programmatically. Submit a job, poll for completion, and download the MP3. No SDK required — plain HTTP.
All requests must include api_token and user_id in the JSON request body — there are no HTTP headers for auth.
You can generate up to 3 tokens from your Account Settings → API Tokens.
Your user_id is also shown there.
Only paid (non-lifetime) plans have API access. Monthly character quota: 2,000,000 characters.
Accepts text and a voice name, starts generation asynchronously, and returns a job_id immediately with HTTP 202.
| Field | Type | Required | Description |
|---|---|---|---|
| api_token | string | Yes | Your 12-character API token from Account Settings |
| user_id | number | Yes | Your numeric user ID from Account Settings |
| text | string | Yes | The text to synthesise — max 12,000 characters |
| voice_name | string | No | Voice short name e.g. en-US-AriaNeural. Defaults to en-US-AriaNeural.
See /voice-list. |
{
"api_token": "aB3dE5fG7hJ9",
"user_id": 42,
"text": "Hello, world!",
"voice_name": "en-US-GuyNeural"
}{
"job_id": "a3f8c2e1d4b7...",
"status": "pending"
}# Submit a TTS job
curl -X POST https://crikk.com/generate-audio \
-H "Content-Type: application/json" \
-d '{
"api_token": "YOUR_TOKEN",
"user_id": YOUR_USER_ID,
"text": "Hello, world!",
"voice_name": "en-US-GuyNeural"
}'
# → {"job_id":"a3f8c2e1d4b7...","status":"pending"}Poll this endpoint with the job_id from the submit response.
When audio is ready, the response body is a raw audio/mpeg binary (MP3).
The job is deleted from the server after the audio is downloaded — download once and store it on your side.
| HTTP Status | Content-Type | Body |
|---|---|---|
| 200 | application/json | {"status":"pending"} — still processing |
| 200 | audio/mpeg | Raw MP3 binary — audio is ready |
| 404 | application/json | Job not found or already downloaded |
| 500 | application/json | {"status":"failed","error":"..."} |
# Poll until ready, then save as output.mp3
JOB_ID="a3f8c2e1d4b7..."
while true; do
STATUS=$(curl -s -o /tmp/audio_response -w "%{content_type}" \
https://crikk.com/generate-audio/status/$JOB_ID)
if [[ "$STATUS" == audio/mpeg* ]]; then
mv /tmp/audio_response output.mp3
echo "Done! Saved as output.mp3"
break
fi
echo "Still processing..."
sleep 2
doneReturns the full list of 322 Microsoft Edge TTS voices. No authentication required. Cached for 24 hours on the client.
{
"count": 322,
"voices": [
{
"name": "en-US-AriaNeural",
"locale": "en-US",
"gender": "Female"
},
...
]
}curl https://crikk.com/generate-audio/voice-list
# Use voice names like:
# en-US-AriaNeural
# en-GB-RyanNeural
# fr-FR-DeniseNeural
# ja-JP-NanamiNeural| Status | error field | Meaning |
|---|---|---|
| 400 | Missing required fields | One or more required body fields are absent |
| 400 | Text exceeds 12,000 characters limit | text is too long |
| 401 | Invalid API token | The api_token / user_id combination is not valid |
| 403 | API access not available | Your plan does not include API access |
| 404 | Job not found | The job_id does not exist or audio was already downloaded |
| 429 | Monthly character limit exceeded | You have used your 2,000,000 monthly character quota |
| 500 | Generation failed | TTS synthesis error — retry with the same parameters |
A complete, self-contained example that submits text, polls for completion, and saves the MP3.
const API_TOKEN = "YOUR_TOKEN";
const USER_ID = YOUR_USER_ID; // numeric
const BASE_URL = "https://crikk.com";
async function textToSpeech(text, voiceName = "en-US-AriaNeural") {
// 1. Submit job
const submitRes = await fetch(`${BASE_URL}/generate-audio`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
api_token: API_TOKEN,
user_id: USER_ID,
text,
voice_name: voiceName,
}),
});
if (!submitRes.ok) {
const err = await submitRes.json();
throw new Error(err.error ?? "Submit failed");
}
const { job_id } = await submitRes.json();
console.log("Job submitted:", job_id);
// 2. Poll until done
while (true) {
await new Promise(r => setTimeout(r, 1500));
const pollRes = await fetch(
`${BASE_URL}/generate-audio/status/${job_id}`
);
if (pollRes.headers.get("content-type")?.startsWith("audio/mpeg")) {
return pollRes.blob(); // ← MP3
}
const data = await pollRes.json();
if (data.status === "failed") throw new Error(data.error ?? "Generation failed");
console.log("Status:", data.status);
}
}
// Usage
textToSpeech("Hello from Crikk API!", "en-US-GuyNeural")
.then(blob => {
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url; a.download = "speech.mp3"; a.click();
})
.catch(console.error);Generate your API token in Account Settings — it takes 10 seconds.
Go to Account Settings