Orange Voice
Documentation
Everything Orange Voice does, as an API: for your own code, for SDKs written for OpenAI, and for AI agents.
Overview
Orange Voice is speech for every Indian language and Indian English: text to speech, live streaming speech, speech to text, voice cloning, voice design, a voice changer, dubbing of audio and video, and long-form stories with many voices. Everything in the studio on this site is also an API, and AI agents can use it directly.
| API address | https://orange-api.imutechz.in |
| Authentication | Authorization: Bearer ov_pat_... (a personal access token) |
| Format | JSON in and out, multipart/form-data for files; audio links in answers are short-lived |
| Machine-readable | OpenAPI 3.1 · llms.txt · MCP manifest |
| Support | support@imutechz.in |
Quick start
- Sign in or create an account. Every signed-in account gets a free allowance each month: 2,000 characters of speech and 60 seconds of audio for speech to text and the voice changer.
- Open Personal access tokens and create a token. Pick its scopes and when it expires. Copy it: it is shown once.
- Keep it in an environment variable, for example
ORANGE_TOKEN, on your server. Never put it in a web page or an app. - Make your first request:
curl -X POST "https://orange-api.imutechz.in/v1/tts" \
-H "Authorization: Bearer $ORANGE_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: audio/mpeg" \
-d '{"text": "Namaskar! Aaj ka mausam bahut achha hai.", "voice_id": "orange", "lang": "hinglish"}' \
--output hello.mp3import os, requests
r = requests.post(
"https://orange-api.imutechz.in/v1/tts",
headers={"Authorization": "Bearer " + os.environ["ORANGE_TOKEN"]},
json={"text": "Namaskar! Aaj ka mausam bahut achha hai.", "voice_id": "orange", "lang": "hinglish"},
)
r.raise_for_status()
answer = r.json()
print(answer["characters"], "characters,", answer["durationMs"], "ms")
audio = requests.get(answer["audioUrl"]) # the link works for about 5 minutes
open("hello.mp3", "wb").write(audio.content)const r = await fetch("https://orange-api.imutechz.in/v1/tts", {
method: "POST",
headers: { Authorization: "Bearer " + process.env.ORANGE_TOKEN, "Content-Type": "application/json" },
body: JSON.stringify({ text: "Namaskar! Aaj ka mausam bahut achha hai.", voice_id: "orange", lang: "hinglish" }),
});
if (!r.ok) throw new Error((await r.json()).error.message);
const answer = await r.json();
console.log(answer.characters, "characters", answer.audioUrl);The answer has a short-lived audioUrl, the characters counted and your usage. Send Accept: audio/mpeg (as in the cURL example) to get the audio bytes directly.
Authentication and tokens
Every request sends a personal access token in the Authorization header:
Authorization: Bearer ov_pat_3f9a1c2b7d4e_kQ...
A token looks like ov_pat_<id>_<secret>. The part ov_pat_<id> is its prefix, shown in your token list so you can tell tokens apart; only a fingerprint of the full token is stored, so a lost token cannot be shown again: create a new one.
Scopes
A token may only do what its scopes allow. Anything else is refused with 403 INSUFFICIENT_SCOPE before any work is done or counted.
| Scope | Allows |
|---|---|
| speech | Text to speech: POST /v1/tts, the WebSocket stream, POST /v1/audio/speech |
| transcribe | Speech to text: POST /v1/stt, POST /v1/audio/transcriptions |
| voices:read | List languages and voices, voice details, previews, the clone prompt |
| voices:write | Clone, design, rename, save and delete voices (also allows everything voices:read does) |
| convert | Voice changer: POST /v1/convert |
| dub | Dubbing: POST /v1/dub |
| stories | Stories: create, read, edit, delete and render |
| account:read | Usage, history, jobs and plan status |
GET /v1/jobs/{id} works with any of dub, stories, voices:write or account:read, so a token that starts a job can also follow it. Keys made before scopes existed keep every scope.
Expiry
Choose 7, 30, 90 or 365 days, or never. An expired token is refused with 401 INVALID_API_KEY and a message that says when it expired.
Rotating a token
- Create a new token with the same scopes.
- Deploy it to your server or agent.
- Check its Last used time on the tokens page.
- Revoke the old token. Anything still using it stops at once.
Limits on tokens
- Up to 10 active tokens per account.
- Tokens cannot create or revoke tokens and cannot download the app; those need you signed in on this site.
- Too many wrong tokens from one address in a minute are answered with 429
RATE_LIMITEDfor a minute.
Managing tokens
POST/v1/tokens
The tokens page uses these calls with your signed-in session (a token cannot call them).
| Field | Type | About |
|---|---|---|
| name | string | Up to 60 characters |
| scopes | array | Any of the scopes above; default all |
| expires_in_days | integer or null | 7, 30, 90, 365, or null for never |
{
"id": "3f9a1c2b7d4e",
"name": "My server",
"prefix": "ov_pat_3f9a1c2b7d4e",
"key": "ov_pat_3f9a1c2b7d4e_kQ...",
"scopes": [
"speech",
"voices:read"
],
"expiresAt": "2027-02-13T09:30:00+00:00",
"createdAt": "2026-11-15T09:30:00+00:00"
}GET /v1/tokens lists { id, name, prefix, scopes, createdAt, lastUsedAt, expiresAt, expired, revokedAt } and DELETE /v1/tokens/{id} revokes one.
Text to speech
POST/v1/tts scope: speech
Turns text into speech. Counts characters (letters, digits, spaces and punctuation; tags are not counted).
| Field | Type | About |
|---|---|---|
| text | string | Up to 1,000 characters per request. Expression tags are free and not counted |
| voice_id | string | From GET /v1/voices. Default orange |
| lang | string | Language code (see Languages). Default the voice's own language |
| speed | number | 0.5 to 2.0, default 1 |
| pitch | number | Semitones, -12 to 12, default 0 |
| format | string | mp3 (default), wav or opus |
| tags | array | Optional styles for the whole text, for example ["calm"] (up to 20) |
{
"audioUrl": "https://orange-api.imutechz.in/v1/files/users/.../outputs/1a2b.mp3?e=...",
"format": "mp3",
"durationMs": 2840,
"characters": 41,
"usage": {
"used": 1241,
"limit": 40000,
"left": 38759,
"periodEnd": "2026-12-14T00:00:00+00:00",
"renews": true
},
"requestId": "9f2c...",
"historyId": "h_...",
"spokenText": "Namaskar! ...",
"lang": "hinglish",
"voiceId": "orange"
}With Accept: audio/mpeg (or audio/wav, audio/ogg) the answer is the audio itself, with headers X-Request-Id, X-Characters, X-Audio-Seconds, X-Usage-Used, X-Usage-Limit and X-Usage-Left.
Streaming (WebSocket)
WS/v1/tts/stream scope: speech
For live use: audio leaves sentence by sentence while the rest is still being made.
- Connect to
wss://orange-api.imutechz.in/v1/tts/stream. Send your token as atokenfield in your first message (tokens in the URL are not accepted, because addresses end up in logs). - Send a JSON message with the fields of POST /v1/tts (
text, voice_id, lang, speed, pitch) andformat:mp3orpcm(16-bit, 24,000 Hz, mono). A first message with only a token is answered{"type": "ready"}. - Audio arrives as binary messages, then one text message
{"type": "done", "characters", "durationMs", "usage", "requestId", "format", "sampleRate"}. - Send more text messages on the same connection; each is counted on its own.
- Errors arrive as
{"type": "error", "error": {"code", "message"}}; the connection stays open unless the token is refused (close code 4401). - Send
{"type": "close"}to finish.
const ws = new WebSocket("wss://orange-api.imutechz.in/v1/tts/stream");
ws.binaryType = "arraybuffer";
const chunks = [];
ws.onopen = () => ws.send(JSON.stringify({ token: ORANGE_TOKEN, text: "Hello! [pause] This arrives sentence by sentence.", voice_id: "orange", format: "mp3" }));
ws.onmessage = (e) => {
if (typeof e.data !== "string") { chunks.push(e.data); return; } // audio
const msg = JSON.parse(e.data);
if (msg.type === "done") { console.log("counted", msg.characters); ws.send(JSON.stringify({ type: "close" })); }
if (msg.type === "error") console.error(msg.error.code, msg.error.message);
};import asyncio, json, os, websockets
async def main():
url = "wss://orange-api.imutechz.in/v1/tts/stream"
async with websockets.connect(url) as ws:
await ws.send(json.dumps({"token": os.environ["ORANGE_TOKEN"], "text": "Hello from Python.", "format": "mp3"}))
with open("stream.mp3", "wb") as f:
while True:
m = await ws.recv()
if isinstance(m, bytes):
f.write(m)
continue
m = json.loads(m)
if m["type"] in ("done", "error"):
print(m)
break
asyncio.run(main())Expression tags
Put tags in the text in square brackets, [happy], or angle brackets, <laugh>. Spaces are fine: [long pause]. Tags are never counted as characters.
| Kind | Tags | What happens |
|---|---|---|
| Feelings and delivery | neutral, happy, sad, angry, excited, calm, tender, serious, surprised, scared, sarcastic, proud, nervous, affectionate, teasing, scolding, pleading, shy, devotional, storyteller, newsreader, filmy, sing-song, auntie, tapori, whisper, shout, soft, fast, slow, emphasis, smile | Changes speed, pitch, loudness and intensity for the words after it, until the next feeling tag. </whisper> goes back to how the text started. |
| Pauses | pause (0.4 s), short pause (0.2 s), long pause (1 s), breath (0.25 s) | Silence at that point |
| Sounds | laugh, chuckle, giggle, sigh, gasp, cry, sniff, cough, clears throat, yawn, hmm, tsk | A short breath of silence where the sound goes |
| Anything else | Removed: not spoken and not counted |
Pauses are capped. All the silence in one request may total at most 1 second plus 1 second for every 15 spoken characters. Longer pauses are shortened in proportion, so tags can never turn a short text into minutes of audio.
[storyteller] Ek din, Kolkata mein, baarish ho rahi thi. [long pause] [whisper] Phir kisi ne darwaza khatkhataya. <gasp> [excited] Arre, tum!
Languages
GET/v1/languages scope: voices:read
The 22 scheduled languages of India, Indian English, and the Roman-letter mixes people type every day. en and english also mean en-IN; speech to text and dubbing also take auto.
| Code | Language | Script |
|---|---|---|
| en-IN | English (India) | Latin |
| hi | Hindi | Devanagari |
| bn | Bengali | Bengali |
| mr | Marathi | Devanagari |
| hinglish | Hinglish: Hindi in Roman letters | Latin |
| banglish | Banglish: Bengali in Roman letters | Latin |
| te | Telugu | Telugu |
| ta | Tamil | Tamil |
| gu | Gujarati | Gujarati |
| kn | Kannada | Kannada |
| ml | Malayalam | Malayalam |
| or | Odia | Odia |
| pa | Punjabi | Gurmukhi |
| as | Assamese | Bengali |
| ur | Urdu | Perso-Arabic |
| mai | Maithili | Devanagari |
| kok | Konkani | Devanagari |
| ne | Nepali | Devanagari |
| sd | Sindhi | Perso-Arabic |
| doi | Dogri | Devanagari |
| ks | Kashmiri | Perso-Arabic |
| mni | Manipuri (Meitei) | Meitei Mayek |
| brx | Bodo | Devanagari |
| sat | Santali | Ol Chiki |
| sa | Sanskrit | Devanagari |
Write text in the language's own script, or in Roman letters for hinglish and banglish (typed Hindi or Bengali is converted before it is spoken). Which features work for each language right now is in GET /v1/languages:
{
"languages": [
{
"code": "bn",
"name": "Bengali",
"script": "Bengali",
"wave": 1,
"features": {
"tts": true,
"clone": true,
"stt": true,
"translate": true
},
"voices": 4
}
]
}Voices
GET/v1/voices scope: voices:read
The Orange voice, the voice library (speakers from many regions) and your own cloned and designed voices.
| Field | Type | About |
|---|---|---|
| lang | query | Language code |
| gender | query | female or male |
| age | query | young, adult or senior |
| style | query | For example narration, conversational |
| region | query | For example Kolkata, Lucknow |
| q | query | Words to search for |
| mine | query | 1 = only your voices |
| saved | query | 1 = only voices you saved |
| kind | query | orange, library, clone or designed |
{
"id": "orange",
"name": "Orange",
"kind": "orange",
"lang": "en-IN",
"languages": [
"en-IN",
"hi",
"bn",
"hinglish",
"banglish"
],
"gender": "female",
"age": "adult",
"region": "Kolkata",
"style": [
"conversational"
],
"description": "...",
"previewUrl": "https://...",
"mine": false,
"saved": false,
"visibility": "public",
"featured": true,
"createdAt": "..."
}| Call | Does |
|---|---|
| GET /v1/voices/{id} | One voice |
| GET /v1/voices/{id}/preview | Its preview (audio/mpeg; library voices need no token) |
| POST /v1/voices/{id}/save | Save a library voice to My voices; DELETE the same path removes it |
| PATCH /v1/voices/{id} | Your voice: { name?, description? } |
| DELETE /v1/voices/{id} | Delete your voice |
Cloning a voice
POST/v1/voices/clone scope: voices:write
Makes a voice from a short recording of one person. Needs a paid plan; the listening is counted as seconds of audio.
| Field | Type | About |
|---|---|---|
| audio | file | 6 to 60 seconds of one speaker, clear, no music (the first 15 seconds are used) |
| consent | string | true: the consent checkbox, "I confirm this is my own voice, or I have the speaker's permission, and I agree to the terms." Required. |
| name | string | 1 to 60 characters |
| lang | string | Language of the sample, default en-IN |
| transcript | string | Optional: what the sample says |
| gender | string | Optional: female or male |
| description | string | Optional |
Consent rules
- Clone only your own voice, or a voice whose speaker has given you permission.
- Send
consent=true: it stands for the checkbox above, and the time, your account and the wording version are kept with the voice. No consent recording is needed or kept. GET /v1/voices/clone/prompt?lang=bngives a passage to read (a different one each call; English, Hindi, Bengali and Marathi, the last three in English letters) and the checkbox text.- Cloned voices are always private to your account. Only a trimmed clip of the sample (at most 15 seconds) is kept, and it is deleted with the voice.
- Each plan keeps a set number of cloned voices: Zest 1, Tangerine 3, Blood Orange 10. At the limit the clone is refused with 403
CLONE_LIMITand nothing is counted. - Read the acceptable use policy.
curl -X POST "https://orange-api.imutechz.in/v1/voices/clone" \ -H "Authorization: Bearer $ORANGE_TOKEN" \ -F audio=@sample.wav -F consent=true \ -F name="Riya" -F lang=bn
Answer: 201 with the new Voice object.
Designing a voice
POST/v1/voices/design scope: voices:write
Describe a voice in words and get three candidates to choose from. Needs a paid plan.
| Field | Type | About |
|---|---|---|
| description | string | 3 to 500 characters: who is speaking, age, region, mood, pace |
| lang | string | Language the voice speaks |
| gender | string | Optional: female or male |
| text | string | Optional: the line the previews say |
Answer: 202 { designId, jobId, job, choices }. When the job is done, result.candidates has each candidate's previewUrl. Keep one with POST /v1/voices/design/{cid}/keep and { name }.
Speech to text
POST/v1/stt scope: transcribe
Multipart form. Any audio or video file up to 60 minutes. Counts seconds of audio.
| Field | Type | About |
|---|---|---|
| audio | file | Audio or video |
| lang | string | Language code, or auto (default) |
| diarize | boolean | Tell speakers apart (default false) |
| timestamps | boolean | Segment times (default true) |
| format | string | json (default), txt, srt or vtt |
import os, requests
r = requests.post(
"https://orange-api.imutechz.in/v1/stt",
headers={"Authorization": "Bearer " + os.environ["ORANGE_TOKEN"]},
files={"audio": open("meeting.mp3", "rb")},
data={"lang": "auto", "diarize": "true"},
)
r.raise_for_status()
for s in r.json()["segments"]:
print(f"[{s['start']:.1f}-{s['end']:.1f}] {s['speaker']}: {s['text']}"){
"text": "...",
"lang": "hi",
"duration": 62.4,
"segments": [
{
"start": 0.0,
"end": 3.2,
"text": "...",
"speaker": "S1"
}
],
"speakers": 2,
"exports": {
"txt": "...",
"srt": "...",
"vtt": "..."
},
"usage": {
"used": 120,
"limit": 10800
},
"requestId": "..."
}Transcription formats
| format | You get |
|---|---|
| json | The object above, with all three exports inside |
| txt | Plain text |
| srt | SubRip subtitles (00:00:01,000 --> 00:00:03,200) |
| vtt | WebVTT subtitles (text/vtt) |
The OpenAI-compatible route adds text and verbose_json; see Using Orange with AI agents.
Voice changer
POST/v1/convert scope: convert
Multipart form. The same words, timing and feeling in another voice. Up to 120 seconds; counts seconds of audio.
| Field | Type | About |
|---|---|---|
| audio | file | Speech to change |
| voice_id | string | Target voice |
| lang | string | Optional, auto by default |
Answer: { audioUrl, format: "mp3", durationMs, text, lang, usage, requestId, historyId }.
Dubbing
POST/v1/dub scope: dub
Multipart form. Transcribes, translates and re-voices audio or video into another language, up to 10 minutes. Needs a paid plan; counts seconds of audio. Starts a job.
| Field | Type | About |
|---|---|---|
| media | file | Audio or video (video comes back as video with the new audio) |
| target_lang | string | Language to dub into |
| source_lang | string | Optional, auto by default |
| voice_id | string | Optional: a voice for the dub. Left out, the speaker's own voice is kept |
Answer: 202 { job, jobId, usage }. The finished job's result is { url, kind: "audio" | "video", transcript, translation, lang, durationMs }.
Stories
POST/v1/stories scope: stories
Long-form projects: chapters of lines, each line with a speaker, a voice and a feeling. Saving is free; rendering counts the characters of what is rendered and needs a paid plan.
{
"title": "Baarish",
"lang": "hinglish",
"speakers": [
{
"name": "Narrator",
"voice_id": "orange"
},
{
"name": "Riya",
"voice_id": "hi_delhi_1"
}
],
"chapters": [
{
"title": "One",
"lines": [
{
"speaker": "Narrator",
"text": "Ek din, baarish ho rahi thi.",
"emotion": "storyteller",
"pause": 0.5
},
{
"speaker": "Riya",
"voice_id": "hi_delhi_1",
"text": "Arre, chhata kahan hai?",
"emotion": "surprised"
}
]
}
]
}| Rule | Limit |
|---|---|
| Chapters | Up to 200 |
| Lines | Up to 2,000 in a story; up to 5,000 characters each |
| Characters | Up to 100,000 in a story |
| pause | Silence after a line, 0 to 2 seconds (default 0.35) |
| Silence | All pauses together may not exceed 1 second plus 1 second per 15 characters |
| Call | Does |
|---|---|
| GET /v1/stories | { stories: [Story] } |
| GET /v1/stories/{id} | One story with { id, characters, lastJobId, createdAt, updatedAt } |
| PUT /v1/stories/{id} | Save changes |
| DELETE /v1/stories/{id} | Delete |
| POST /v1/stories/{id}/render | { format?: mp3 | wav, chapter?: index } -> 202 { job } |
A render reads the story as it was when you started it; edits made afterwards go into the next render. The finished job's result is { url, durationMs, characters, chapters: [{ title, startMs }] }.
Jobs
GET/v1/jobs/{id} scope: dub, stories, voices:write or account:read
Dubbing, story renders and voice design run as jobs. Poll every 2 seconds until the status is done or failed.
| status | Meaning |
|---|---|
| queued | Waiting for a free worker |
| running | Working; progress goes from 0 to 1 |
| done | Finished; result holds the links |
| failed | Stopped; error says why. What it counted is given back |
{
"id": "j_...",
"kind": "dub",
"status": "running",
"progress": 0.42,
"message": "Translating",
"result": null,
"error": null,
"createdAt": "...",
"updatedAt": "..."
}Result links are fresh each time you read the job. GET /v1/jobs lists your latest 50 jobs.
History and usage
GET/v1/usage scope: account:read
| Call | Answer |
|---|---|
| GET /v1/history?kind=&limit= | { items: [{ id, kind: tts | stt | convert | dub | story, title, lang, voiceId, characters, seconds, audioUrl, createdAt }] } |
| DELETE /v1/history/{id} | { ok: true } (the audio file is deleted too) |
| GET /v1/usage | { periodStart, periodEnd, products: [{ product, unit, used, limit, left }], recent: [{ day, characters, seconds }] } |
| GET /v1/subscription | { active, status, free, plan, currentPeriodStart, currentPeriodEnd, renews, usage } |
Errors
Every error has an HTTP status and the same body:
{
"error": {
"code": "MONTHLY_LIMIT_REACHED",
"message": "This request needs 1,200 characters but only 800 of this month's 2,00,000 are left. Your limit resets on 14 Dec 2026 (UTC). Nothing was counted.",
"details": {
"requested": 1200,
"used": 39200,
"limit": 40000,
"left": 800,
"resetsAt": "2026-12-14T00:00:00+00:00",
"unit": "characters"
}
}
}| Code | Status | Means | What to do |
|---|---|---|---|
| VALIDATION | 400 | A field is missing or wrong. The message names the field. | Fix the request. |
| INVALID_API_KEY | 401 | No token, a wrong, revoked or expired token, or an ended session. | Check the header; create a new token if it expired. |
| SUBSCRIPTION_REQUIRED | 402 | The free allowance does not cover this (cloning, design, dubbing, stories) or is used up. | Pick a plan on the pricing page. |
| SUBSCRIPTION_INACTIVE | 402 | The paid plan ended. | Pay for another period on the dashboard. |
| INSUFFICIENT_SCOPE | 403 | The token lacks the scope. details.required lists what would work. | Create a token with that scope. |
| NOT_FOUND | 404 | No such item, or it is not yours, or a link has ended. | Check the id; ask for a fresh link. |
| DUPLICATE_REQUEST | 409 | This Idempotency-Key was used before. | Use a new key for a new request. |
| LANGUAGE_NOT_VOICED | 422 | This voice cannot speak that language. | Pick a voice made for it (GET /v1/voices?lang=...). |
| MONTHLY_LIMIT_REACHED | 429 | This request would go past this month's limit. details: requested, used, limit, left, resetsAt, unit. | Wait for resetsAt, or send less. |
| RATE_LIMITED | 429 | Too many requests a minute, or the service is busy. | Wait for the Retry-After seconds, then retry. |
| INTERNAL | 500 | It failed on our side. Nothing was counted. | Retry with a new Idempotency-Key; write to support if it keeps happening. |
| SERVICE_NOT_LIVE | 503 | The service is briefly unavailable. Nothing was counted. | Retry in a minute; see the status page. |
A request that fails is never counted. Messages are written for people: you can show them to your users as they are.
Idempotency
Send an Idempotency-Key header (up to 64 letters, digits and _ . : -) on any request that does paid work: speech, speech to text, voice changer, cloning, design, dubbing and story renders.
- Keys are single use. A second request with a key you already used is refused with 409
DUPLICATE_REQUEST: it is not done again and not counted again. - So a retry after a network failure is safe: either the first request went through (and the retry is refused), or it did not (and the retry is done once).
- If the first request failed on our side, the retry with the same key says so; send it again with a new key.
- Keys are tied to your account, so they can never clash with anyone else's.
Idempotency-Key: order-1182-greeting
Rate limits and plan limits
Plans
| Free (signed in) | Zest, Rs 29 once, 7 days | Tangerine, Rs 199 a month | Blood Orange, Rs 599 a month | |
|---|---|---|---|---|
| Speech (text to speech, stories) | 2,000 characters a month | 15,000 characters | 2,00,000 characters a month | 10,00,000 characters a month |
| Audio (speech to text, voice changer, dubbing, cloning) | 60 seconds a month | 30 minutes | 5 hours a month | 20 hours a month |
| Cloned voices | None | 1 | 3 | 10 |
| Voice design, dubbing, stories | Not included | Included | Included | Included |
| The Orange app | Not included | Included | Included | Included |
| Requests per minute | Standard | Standard | Standard | 3 times the standard |
| Queue (dubbing, stories, design) | Normal | Normal | Normal | First |
| Commercial use of the audio | No | No | Yes | Yes |
Zest is once per account and does not renew. Each Tangerine or Blood Orange payment buys 30 days; paying again adds 30 days after the paid ones. A bigger plan starts at once with fresh limits (unused time is not credited); a smaller one starts when the paid time ends. The free allowance resets on the first of each month (UTC); a paid plan resets each period. At a limit, requests are refused with 429 MONTHLY_LIMIT_REACHED and nothing extra is ever charged. GET /v1/usage shows what is left; GET /v1/plans lists the plans (no sign-in needed).
Per request
| What | Most |
|---|---|
| Text to speech | 1,000 characters |
| A story | 100,000 characters, 2,000 lines |
| Speech to text | 60 minutes |
| Voice changer | 120 seconds |
| Dubbing | 10 minutes |
| Clone sample | 6 to 60 seconds |
| Upload | 100 MB |
Rates
- 30 requests a minute for each token (and for your signed-in session).
- Over that, 429
RATE_LIMITEDwith aRetry-Afterheader in seconds. - When many requests are waiting, new ones may get 429 with Retry-After: 5.
- Audio and file links in answers work for about 5 minutes. Download what you want to keep.
Using Orange with AI agents
Orange Voice speaks the Model Context Protocol, so Claude, Cursor, VS Code and any other MCP client can use it as a set of tools. Make a token for the agent with only the scopes it needs.
| MCP address | https://orange-api.imutechz.in/mcp |
| Transport | Streamable HTTP (POST, JSON answers) |
| Authentication | Authorization: Bearer ov_pat_... |
| Manifest | https://orange-api.imutechz.in/.well-known/mcp.json |
Claude Code
claude mcp add --transport http orange-voice https://orange-api.imutechz.in/mcp \ --header "Authorization: Bearer ov_pat_YOUR_TOKEN"
Claude Desktop
Add this to claude_desktop_config.json (Settings, Developer, Edit config), then restart Claude. It needs Node.js.
{
"mcpServers": {
"orange-voice": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://orange-api.imutechz.in/mcp",
"--header",
"Authorization:${ORANGE_AUTH}"
],
"env": {
"ORANGE_AUTH": "Bearer ov_pat_YOUR_TOKEN"
}
}
}
}Cursor
In ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"orange-voice": {
"url": "https://orange-api.imutechz.in/mcp",
"headers": {
"Authorization": "Bearer ov_pat_YOUR_TOKEN"
}
}
}
}VS Code
In .vscode/mcp.json; VS Code asks for the token once and keeps it safe:
{
"servers": {
"orange-voice": {
"type": "http",
"url": "https://orange-api.imutechz.in/mcp",
"headers": {
"Authorization": "Bearer ${input:orange-token}"
}
}
},
"inputs": [
{
"id": "orange-token",
"type": "promptString",
"description": "Orange Voice token",
"password": true
}
]
}Any MCP client
Point it at the address above with the Authorization header. In code:
import asyncio, os
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client
async def main():
headers = {"Authorization": "Bearer " + os.environ["ORANGE_TOKEN"]}
async with streamablehttp_client("https://orange-api.imutechz.in/mcp", headers=headers) as (read, write, _):
async with ClientSession(read, write) as s:
await s.initialize()
print([t.name for t in (await s.list_tools()).tools])
r = await s.call_tool("speak", {"text": "Namaskar!", "language": "hinglish"})
print(r.structuredContent["audioUrl"])
asyncio.run(main())curl -X POST "https://orange-api.imutechz.in/mcp" \
-H "Authorization: Bearer $ORANGE_TOKEN" \
-H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "speak", "arguments": {"text": "Hello!"}}}'Tools
| Tool | Scope | Takes | Gives |
|---|---|---|---|
| speak | speech | text, voice, language, speed, pitch, format, include_audio | audioUrl (about 5 minutes), durationMs, characters, usage |
| list_voices | voices:read | language, gender, query, mine, limit | voices |
| list_languages | voices:read | languages with script and features | |
| transcribe | transcribe | audio_url or audio_base64, language, diarize | text, lang, duration, segments |
| convert_voice | convert | audio_url or audio_base64, voice, language | audioUrl, durationMs, text |
| clone_voice | voices:write | audio_* and consent_url / consent_base64, name, language, transcript | the new voice |
| create_story | stories | title, language, speakers, chapters | story id, characters |
| render_story | stories | story_id, format, chapter | job |
| dub | dub | media_url or media_base64, target_language, source_language, voice | job |
| get_job | (the job's) | job_id | status, progress, result |
| usage | account:read | this month's usage and limits |
- Every tool counts usage, follows your plan limits and refuses a repeated
idempotency_keyexactly like the API. - Audio inputs are an https
audio_url(public addresses only, no redirects) or the file asaudio_base64(up to about 30 MB). Orange's own result links work as inputs too. - A refused call comes back as a tool error with the code and message, for example INSUFFICIENT_SCOPE or MONTHLY_LIMIT_REACHED, so the agent can explain it.
OpenAI-compatible endpoints
Code written for OpenAI's audio API works by changing the base address and the key.
from openai import OpenAI
client = OpenAI(api_key="ov_pat_YOUR_TOKEN", base_url="https://orange-api.imutechz.in/v1")
speech = client.audio.speech.create(model="tts-1", voice="alloy", input="Namaskar! Kemon achho?",
extra_body={"language": "banglish"})
speech.write_to_file("hello.mp3")
text = client.audio.transcriptions.create(model="whisper-1", file=open("hello.mp3", "rb"),
response_format="verbose_json")
print(text.text, text.duration)import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ apiKey: process.env.ORANGE_TOKEN, baseURL: "https://orange-api.imutechz.in/v1" });
const speech = await client.audio.speech.create({ model: "tts-1", voice: "orange", input: "Hello from Orange." });
fs.writeFileSync("hello.mp3", Buffer.from(await speech.arrayBuffer()));
const t = await client.audio.transcriptions.create({ model: "whisper-1", file: fs.createReadStream("hello.mp3") });
console.log(t.text);POST /v1/audio/speech
| Field | Type | About |
|---|---|---|
| model | string | Any value (tts-1, gpt-4o-mini-tts, ...); ignored |
| input | string | The text, up to 1,000 characters |
| voice | string | See the mapping below |
| response_format | string | mp3 (default), wav or opus |
| speed | number | 0.5 to 2.0 |
| language | string | Orange extra: a language code; default the voice's language |
Answer: the audio bytes. Voice mapping: OpenAI's names (alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, shimmer, verse, marin, cedar) all use the Orange voice; any Orange voice id (from GET /v1/voices) uses that voice.
POST /v1/audio/transcriptions
| Field | Type | About |
|---|---|---|
| file | file | Audio or video |
| model | string | Any value (whisper-1, ...); ignored |
| language | string | Optional: en, hi, bn, ta ... or any Orange code |
| response_format | string | json (default) { text }, text, srt, vtt, or verbose_json { language, duration, text, segments } |
Same tokens (scopes speech and transcribe), the same limits and the same errors as the rest of the API.
llms.txt and OpenAPI
| Address | What it is |
|---|---|
| https://orange-api.imutechz.in/llms.txt | A short guide for AI agents: authentication, endpoints, examples |
| https://orange-api.imutechz.in/v1/openapi.json | OpenAPI 3.1 description of every public endpoint, for code generators and agent frameworks |
| https://orange-api.imutechz.in/.well-known/mcp.json | Where the MCP server is and how to authenticate |
Generate a client from the OpenAPI document with any OpenAPI generator, or give the llms.txt address to an agent so it learns the API itself.
SDK-style snippets
Small helpers you can paste into a project. They keep the token on your server and turn errors into exceptions.
import os, time, requests
class Orange:
def __init__(self, token=os.environ.get("ORANGE_TOKEN"), base="https://orange-api.imutechz.in"):
self.base, self.s = base, requests.Session()
self.s.headers["Authorization"] = "Bearer " + token
def _ok(self, r):
if r.status_code >= 400:
e = r.json()["error"]
raise RuntimeError(f"{e['code']}: {e['message']}")
return r
def speak(self, text, voice="orange", **kw):
return self._ok(self.s.post(self.base + "/v1/tts", json={"text": text, "voice_id": voice, **kw},
headers={"Accept": "audio/mpeg"})).content
def transcribe(self, path, **form):
with open(path, "rb") as f:
return self._ok(self.s.post(self.base + "/v1/stt", files={"audio": f}, data=form)).json()
def wait(self, job_id):
while True:
j = self._ok(self.s.get(f"{self.base}/v1/jobs/{job_id}")).json()
if j["status"] in ("done", "failed"):
return j
time.sleep(2)
orange = Orange()
open("hi.mp3", "wb").write(orange.speak("Namaste!", lang="hinglish"))export function orange(token, base = "https://orange-api.imutechz.in") {
async function call(method, path, body, accept = "application/json") {
const isForm = body instanceof FormData;
const r = await fetch(base + path, {
method,
headers: { Authorization: "Bearer " + token, Accept: accept, ...(body && !isForm ? { "Content-Type": "application/json" } : {}) },
body: body ? (isForm ? body : JSON.stringify(body)) : undefined,
});
if (!r.ok) { const e = (await r.json()).error; throw Object.assign(new Error(e.message), { code: e.code, status: r.status }); }
return accept.startsWith("audio/") ? r.blob() : r.json();
}
return {
speak: (text, opts = {}) => call("POST", "/v1/tts", { text, voice_id: "orange", ...opts }, "audio/mpeg"),
voices: (lang) => call("GET", "/v1/voices" + (lang ? "?lang=" + lang : "")),
usage: () => call("GET", "/v1/usage"),
job: (id) => call("GET", "/v1/jobs/" + encodeURIComponent(id)),
transcribe: (file, lang = "auto") => { const f = new FormData(); f.append("audio", file); f.append("lang", lang); return call("POST", "/v1/stt", f); },
};
}Changelog
| Date | Change |
|---|---|
| 15 Nov 2026 | Plans: Free, Zest (Rs 29 once, 7 days), Tangerine (Rs 199 a month), Blood Orange (Rs 599 a month); GET /v1/plans; clone count per plan; cloning consent is a checkbox (consent=true), no consent recording; random reading passages. Personal access tokens with scopes and expiry (older keys keep every scope). MCP server at /mcp. OpenAI-compatible /v1/audio/speech and /v1/audio/transcriptions. Public OpenAPI 3.1, llms.txt and the MCP manifest. Free allowance for every signed-in account: 2,000 characters and 60 seconds of audio a month. Orange plan audio raised to 3 hours a month. |
| 14 Nov 2026 | Orange Studio API: languages, voice library, cloning with consent, voice design, speech to text with speakers and subtitles, voice changer, dubbing, stories, jobs, history and usage. Streaming speech over WebSocket. Expression tags. |
| Earlier | Text to speech with the Orange voice in Indian English, Hindi, Bengali, Hinglish and Banglish. |