{"openapi":"3.1.0","info":{"title":"Orange Voice API","version":"1.0.0","summary":"Speech for every Indian language and Indian English.","description":"Text to speech, speech to text, voice cloning and design, voice changer, dubbing and long-form stories for the 22 scheduled Indian languages, Indian English, Hinglish and Banglish.\n\nAuth: `Authorization: Bearer ov_pat_...`, a personal access token the user creates at https://theorange.imutechz.in/voice/api-keys/ (never through the API). Each operation's `x-scope` names the scope it needs.\n\nErrors are `{\"error\": {\"code\", \"message\", \"details?\"}}`; `x-error-codes` says what an agent should do for each code. Failed requests are never counted. Audio links in answers last a few minutes: download promptly.\n\nAgents: guide https://orange-api.imutechz.in/llms.txt, MCP server https://orange-api.imutechz.in/mcp. Human docs: https://theorange.imutechz.in/voice/docs/","contact":{"name":"Orange Voice support","email":"support@imutechz.in","url":"https://theorange.imutechz.in/contact/"},"termsOfService":"https://theorange.imutechz.in/legal/terms/"},"servers":[{"url":"https://orange-api.imutechz.in"}],"externalDocs":{"description":"Agent guide (llms.txt)","url":"https://orange-api.imutechz.in/llms.txt"},"tags":[{"name":"Speech"},{"name":"Catalogue"},{"name":"Voices"},{"name":"Jobs"},{"name":"Stories"},{"name":"Account"},{"name":"OpenAI-compatible"},{"name":"Agents"},{"name":"Discovery"}],"components":{"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["VALIDATION","INVALID_API_KEY","SUBSCRIPTION_REQUIRED","SUBSCRIPTION_INACTIVE","INSUFFICIENT_SCOPE","CLONE_LIMIT","NOT_FOUND","METHOD_NOT_ALLOWED","DUPLICATE_REQUEST","LANGUAGE_NOT_VOICED","RATE_LIMITED","MONTHLY_LIMIT_REACHED","INTERNAL","SERVICE_NOT_LIVE"]},"message":{"type":"string","description":"A sentence a person can read"},"details":{"type":"object","description":"Extra facts for some codes, such as resetsAt, left, required"}},"required":["code","message"]}},"required":["error"],"examples":[{"error":{"code":"RATE_LIMITED","message":"Too many requests. Try again in 12 seconds."}}]},"Usage":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"],"description":"null = no limit"},"left":{"type":["integer","null"]},"periodEnd":{"type":"string","format":"date-time"},"renews":{"type":"boolean"}},"description":"This period's count for the product the request used (characters or seconds)."},"Language":{"type":"object","properties":{"code":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"]},"name":{"type":"string"},"script":{"type":"string"},"wave":{"type":"integer"},"voices":{"type":"integer"},"features":{"type":"object","properties":{"tts":{"type":"boolean"},"clone":{"type":"boolean"},"stt":{"type":"boolean"},"translate":{"type":"boolean"}}},"prompt":{"type":"string"}}},"Voice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["orange","library","clone","designed"]},"lang":{"type":"string","description":"Main language"},"languages":{"type":"array","items":{"type":"string"},"description":"Every language it can speak"},"gender":{"type":"string"},"age":{"type":"string"},"region":{"type":"string"},"style":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"previewUrl":{"type":"string","format":"uri"},"mine":{"type":"boolean"},"saved":{"type":"boolean"},"visibility":{"type":"string","enum":["public","private"]},"featured":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"Job":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["dub","story","design"]},"status":{"type":"string","enum":["queued","running","done","failed"]},"progress":{"type":"number","minimum":0,"maximum":1},"message":{"type":"string"},"result":{"type":["object","null"],"description":"When done: url (a fresh short-lived link on every read), durationMs, and per kind: dub -> transcript, translation, lang, sourceLang, segments, kind (audio|video); story -> characters, chapters; design -> candidates"},"error":{"type":["object","null"],"description":"When failed: {code, message}; nothing was counted"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":["string","null"]}},"examples":[{"id":"4c1d...","kind":"dub","status":"done","progress":1,"message":"Finished","result":{"url":"https://orange-api.imutechz.in/v1/files/...","durationMs":31200},"error":null,"createdAt":"2026-11-16T10:00:00+00:00","updatedAt":"2026-11-16T10:01:10+00:00"}]},"Segment":{"type":"object","properties":{"start":{"type":["number","null"]},"end":{"type":["number","null"]},"text":{"type":"string"},"speaker":{"type":["string","null"]}}},"StoryInput":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."},"speakers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":40},"voice_id":{"type":"string","examples":["orange"],"description":"A voice id from GET /v1/voices (for example orange, the house voice)."}}}},"chapters":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"lines":{"type":"array","items":{"type":"object","properties":{"speaker":{"type":"string","maxLength":40},"voice_id":{"type":"string","examples":["orange"],"description":"A voice id from GET /v1/voices (for example orange, the house voice)."},"text":{"type":"string","maxLength":5000},"emotion":{"type":"string","default":"neutral","description":"A tag name such as happy"},"pause":{"type":"number","minimum":0,"maximum":2,"default":0.35,"description":"Seconds of silence after the line"}},"required":["text"]}}},"required":["lines"]},"maxItems":200}},"required":["chapters"]},"Plan":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"amountPaise":{"type":"integer","description":"Price in paise (100 paise = Rs 1)"},"kind":{"type":"string","enum":["free","once","monthly"]},"periodDays":{"type":"integer"},"renews":{"type":"boolean"},"limits":{"type":"object","properties":{"characters":{"type":["integer","null"]},"audioSeconds":{"type":["integer","null"]},"clones":{"type":["integer","null"]},"appDownload":{"type":"boolean"}}},"features":{"type":"array","items":{"type":"string","enum":["clone","design","story","dub","app"]}},"rateMultiplier":{"type":"number"},"commercialUse":{"type":"boolean"}}},"Story":{"allOf":[{"$ref":"#/components/schemas/StoryInput"},{"type":"object","properties":{"id":{"type":"string"},"characters":{"type":"integer"},"lastJobId":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":["string","null"]}}}]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","bearerFormat":"ov_pat_<id>_<secret>","description":"Personal access token from https://theorange.imutechz.in/voice/api-keys/. Scopes: 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 and previews; voices:write: Clone, design, rename, save and delete voices; convert: Voice changer: POST /v1/convert; dub: Dubbing: POST /v1/dub; stories: Stories: create, edit, delete and render; account:read: Usage, history and plan status"}}},"security":[{"bearer":[]}],"x-error-codes":[{"code":"VALIDATION","status":400,"meaning":"A field is missing, has the wrong type, or is out of range. The message names the field.","agentAction":"Fix that field and send again. Do not retry unchanged."},{"code":"INVALID_API_KEY","status":401,"meaning":"The token is missing, wrong, revoked or expired.","agentAction":"Stop. Ask the user to create a personal access token at https://theorange.imutechz.in/voice/api-keys/ and give it to you. Tokens are never made through the API."},{"code":"SUBSCRIPTION_REQUIRED","status":402,"meaning":"This needs a paid plan, or the free allowance is used up.","agentAction":"Stop. Tell the user to subscribe at https://theorange.imutechz.in/voice/pricing/ (GET /v1/plans lists the plans). Nothing was counted."},{"code":"SUBSCRIPTION_INACTIVE","status":402,"meaning":"The paid plan was cancelled or has ended (details.status, details.endedAt).","agentAction":"Stop. Tell the user to renew at https://theorange.imutechz.in/voice/pricing/. Nothing was counted."},{"code":"INSUFFICIENT_SCOPE","status":403,"meaning":"The token lacks the scope (details.required lists the scopes that would work).","agentAction":"Stop. Ask the user for a token that has one of details.required."},{"code":"CLONE_LIMIT","status":403,"meaning":"The plan's number of cloned voices is reached.","agentAction":"Ask the user to delete a cloned voice (DELETE /v1/voices/{id}) or move to a bigger plan."},{"code":"NOT_FOUND","status":404,"meaning":"No such voice, story, job or file; or an audio link has expired.","agentAction":"Check the id. For an expired link, fetch the job or make the audio again."},{"code":"METHOD_NOT_ALLOWED","status":405,"meaning":"That path does not take this method.","agentAction":"Check the method in the OpenAPI document."},{"code":"DUPLICATE_REQUEST","status":409,"meaning":"This Idempotency-Key was already used; that request was done and counted once.","agentAction":"Do not resend the same key. Use the first answer, or send a new key for new work."},{"code":"LANGUAGE_NOT_VOICED","status":422,"meaning":"The voice cannot speak that language (details.lang).","agentAction":"Pick a voice whose languages include it: GET /v1/voices?lang=<code>."},{"code":"RATE_LIMITED","status":429,"meaning":"Too many requests a minute, or the server is busy.","agentAction":"Wait the Retry-After header's seconds, then send again (same body, a new Idempotency-Key if you use one)."},{"code":"MONTHLY_LIMIT_REACHED","status":429,"meaning":"The plan's monthly characters or audio seconds are used up (details.left, details.resetsAt).","agentAction":"Do not retry. Tell the user when it resets (details.resetsAt) or to move to a bigger plan."},{"code":"INTERNAL","status":500,"meaning":"The work failed on our side. Nothing was counted.","agentAction":"Retry once after a few seconds; then report the requestId."},{"code":"SERVICE_NOT_LIVE","status":503,"meaning":"Speech is not open on this server yet.","agentAction":"Try later."}],"x-limits":{"ttsCharactersPerRequest":5000,"storyCharacters":100000,"uploadMB":100,"sttSeconds":3600,"convertSeconds":120,"dubSeconds":600,"requestsPerMinute":30,"linkSeconds":300},"paths":{"/healthz":{"get":{"operationId":"health","tags":["Discovery"],"summary":"Is the service up","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"503":{"description":"SERVICE_NOT_LIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/openapi.json":{"get":{"operationId":"openapi","tags":["Discovery"],"summary":"This document","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"operationId":"llms_txt","tags":["Discovery"],"summary":"Short guide for AI agents (llms.txt)","security":[{}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"operationId":"llms_full_txt","tags":["Discovery"],"summary":"Full reference for AI agents","security":[{}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/mcp.json":{"get":{"operationId":"mcp_manifest","tags":["Discovery"],"summary":"MCP server card","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/.well-known/ai-plugin.json":{"get":{"operationId":"ai_plugin","tags":["Discovery"],"summary":"Plugin manifest (ai-plugin.json style)","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/mcp":{"post":{"operationId":"mcp","tags":["Agents"],"summary":"MCP server (JSON-RPC 2.0, streamable HTTP, JSON answers)","security":[{"bearer":[]}],"responses":{"200":{"description":"JSON-RPC response (202 with no body for a notification)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Methods: initialize, ping, tools/list, tools/call. Each tool needs the scope of the REST endpoint it calls. See /.well-known/mcp.json.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"},"example":{"jsonrpc":"2.0","id":1,"method":"tools/list"}}}}}},"/v1/languages":{"get":{"operationId":"list_languages","tags":["Catalogue"],"summary":"List languages and what each supports","security":[{},{"bearer":["voices:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"languages":{"type":"array","items":{"$ref":"#/components/schemas/Language"}}}}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:read"}},"/v1/voices":{"get":{"operationId":"list_voices","tags":["Catalogue"],"summary":"List voices","security":[{},{"bearer":["voices:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:read","description":"Without a token: the public library. With one: also your own and saved voices.","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."},"description":"Only voices that speak this language"},{"name":"gender","in":"query","required":false,"schema":{"type":"string","enum":["female","male"]},"description":"female or male"},{"name":"age","in":"query","required":false,"schema":{"type":"string"},"description":"young, adult, senior"},{"name":"style","in":"query","required":false,"schema":{"type":"string"},"description":"For example narration"},{"name":"region","in":"query","required":false,"schema":{"type":"string"},"description":"For example Kolkata"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"Free text search"},{"name":"mine","in":"query","required":false,"schema":{"type":"string"},"description":"1 = only voices you made (needs a token)"},{"name":"saved","in":"query","required":false,"schema":{"type":"string"},"description":"1 = only voices you saved (needs a token)"},{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"orange, library, clone, designed"}]}},"/v1/voices/{id}":{"get":{"operationId":"get_voice","tags":["Catalogue"],"summary":"Get a voice","security":[{},{"bearer":["voices:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]},"patch":{"operationId":"update_voice","tags":["Voices"],"summary":"Rename or change a voice of yours","security":[{"bearer":["voices:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"visibility":{"type":"string","enum":["private","public"]},"description":{"type":"string"}}}}}}},"delete":{"operationId":"delete_voice","tags":["Voices"],"summary":"Delete a voice of yours","security":[{"bearer":["voices:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/voices/{id}/preview":{"get":{"operationId":"voice_preview","tags":["Catalogue"],"summary":"Voice preview audio","security":[{},{"bearer":["voices:read"]}],"responses":{"200":{"description":"OK","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/voices/{id}/save":{"post":{"operationId":"save_voice","tags":["Voices"],"summary":"Save a library voice to My voices","security":[{"bearer":["voices:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"saved":{"type":"boolean"}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]},"delete":{"operationId":"unsave_voice","tags":["Voices"],"summary":"Remove a saved voice","security":[{"bearer":["voices:write"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"saved":{"type":"boolean"}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/voices/clone/prompt":{"get":{"operationId":"clone_prompt","tags":["Voices"],"summary":"A passage to read for a clone, and the consent text","security":[{},{"bearer":["voices:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lang":{"type":"string"},"reading":{"type":"string"},"passage":{"type":"integer"},"passages":{"type":"integer"},"romanised":{"type":"boolean"},"consent":{"type":"string"},"consentVersion":{"type":"string"}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:read","parameters":[{"name":"lang","in":"query","required":false,"schema":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."},"description":"Language code"}]}},"/v1/voices/clone":{"post":{"operationId":"clone_voice","tags":["Voices"],"summary":"Clone a voice from a short sample (paid plans)","security":[{"bearer":["voices:write"]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","description":"Paid plans only; each plan keeps a set number of cloned voices (403 CLONE_LIMIT). Only clone a voice that is the user's own or whose speaker gave permission.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"6 to 30 seconds, one speaker. Most 100 MB a file."},"consent":{"type":"string","enum":["true"],"description":"The consent checkbox: this is my own voice, or I have the speaker's permission, and I agree to the terms"},"transcript":{"type":"string","description":"What the sample says (better quality)"},"name":{"type":"string","minLength":1,"maxLength":60},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports.","default":"en-IN"},"visibility":{"type":"string","enum":["private","public"],"default":"private"},"gender":{"type":"string"},"description":{"type":"string"}},"required":["audio","consent","name"]}}}}}},"/v1/voices/design":{"post":{"operationId":"design_voice","tags":["Voices"],"summary":"Design a voice from a description (paid plans)","security":[{"bearer":["voices:write"]}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"designId":{"type":"string"},"jobId":{"type":"string"},"job":{"$ref":"#/components/schemas/Job"},"choices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"basedOn":{"type":"string"},"description":{"type":"string"}}}}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Voice cannot speak that language (LANGUAGE_NOT_VOICED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","description":"Makes three candidates. Poll the job; when done, keep one with POST /v1/voices/design/{cid}/keep. Counts 3 preview lines as characters.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","minLength":3,"maxLength":500},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."},"gender":{"type":"string","enum":["female","male"]},"text":{"type":"string","maxLength":200,"description":"Preview line"}},"required":["description"]},"example":{"description":"warm middle-aged Kolkata storyteller","lang":"en-IN"}}}}}},"/v1/voices/design/{cid}/keep":{"post":{"operationId":"keep_designed_voice","tags":["Voices"],"summary":"Keep a designed candidate","security":[{"bearer":["voices:write"]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Voice"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"voices:write","parameters":[{"name":"cid","in":"path","required":true,"schema":{"type":"string"},"description":"Candidate id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":60},"visibility":{"type":"string","enum":["private","public"]}}}}}}}},"/v1/tts":{"post":{"operationId":"text_to_speech","tags":["Speech"],"summary":"Text to speech","security":[{"bearer":["speech"]}],"responses":{"200":{"description":"JSON with a short-lived audioUrl (default), or the audio bytes when Accept is audio/*","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Quote this to support"},"X-Characters":{"schema":{"type":"string"},"description":"Characters counted"},"X-Audio-Seconds":{"schema":{"type":"string"},"description":"Length of the audio"},"X-Usage-Used":{"schema":{"type":"string"},"description":"Used this period"},"X-Usage-Limit":{"schema":{"type":"string"},"description":"This period's limit"},"X-Usage-Left":{"schema":{"type":"string"},"description":"Left this period"}},"content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","format":"uri","description":"Short-lived link to the audio: download it at once"},"format":{"type":"string"},"durationMs":{"type":"integer"},"seconds":{"type":"number"},"characters":{"type":"integer","description":"Characters counted"},"usage":{"$ref":"#/components/schemas/Usage"},"requestId":{"type":"string"},"historyId":{"type":["string","null"],"description":"null for API-key calls"},"spokenText":{"type":"string"},"lang":{"type":"string"},"voiceId":{"type":"string"}}},"example":{"audioUrl":"https://orange-api.imutechz.in/v1/files/users/u1/outputs/ab12.mp3?e=1763290000&s=...","format":"mp3","durationMs":2310,"seconds":2.31,"characters":24,"usage":{"used":524,"limit":15000,"left":14476,"periodEnd":"2026-11-23T00:00:00+00:00","renews":false},"requestId":"9f2c...","historyId":null,"spokenText":"Namaskar! Aap kaise hain?","lang":"hinglish","voiceId":"orange"}},"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/ogg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Voice cannot speak that language (LANGUAGE_NOT_VOICED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SERVICE_NOT_LIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"speech","description":"Counts spoken characters (not tags). Up to 5,000 a request: split longer text at sentence ends, or use stories. Send Accept: audio/mpeg to get the bytes in the answer instead of a link.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"What to say: up to 5,000 spoken characters a request (tags are not counted). Inline expression tags change delivery: [happy] ... [calm] ..., [pause], [long pause], <laugh>, <sigh>. Unknown tags are dropped. Tags: affectionate, angry, auntie, breath, calm, chuckle, clears throat, cough, cry, devotional, emphasis, excited, fast, filmy, gasp, giggle, happy, hmm, laugh, long pause, long_pause, nervous, neutral, newsreader, pause, pleading, proud, sad, sarcastic, scared, scolding, serious, short pause, shout, shy, sigh, sing-song, slow, smile, sniff, soft, storyteller, surprised, tapori, teasing, tender, tsk, whisper, yawn"},"voice_id":{"type":"string","examples":["orange"],"description":"A voice id from GET /v1/voices (for example orange, the house voice).","default":"orange"},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code; default the voice's own language. The voice must speak it (else 422)."},"speed":{"type":"number","minimum":0.5,"maximum":2,"default":1,"description":"1 = normal"},"pitch":{"type":"number","minimum":-12,"maximum":12,"default":0,"description":"Semitones"},"format":{"type":"string","enum":["mp3","wav","opus"],"default":"mp3"},"tags":{"type":"array","items":{"type":"string","enum":["affectionate","angry","auntie","breath","calm","chuckle","clears throat","cough","cry","devotional","emphasis","excited","fast","filmy","gasp","giggle","happy","hmm","laugh","long pause","long_pause","nervous","neutral","newsreader","pause","pleading","proud","sad","sarcastic","scared","scolding","serious","short pause","shout","shy","sigh","sing-song","slow","smile","sniff","soft","storyteller","surprised","tapori","teasing","tender","tsk","whisper","yawn"]},"description":"Styles applied to the whole text","maxItems":20}},"required":["text"]},"example":{"text":"[happy] Namaskar! Aap kaise hain?","voice_id":"orange","lang":"hinglish","format":"mp3"}}}}}},"/v1/tts/stream":{"get":{"operationId":"text_to_speech_stream","tags":["Speech"],"summary":"Live text to speech over a WebSocket","x-websocket":true,"security":[{}],"x-scope":"speech","description":"Not plain HTTP: open wss://<host>/v1/tts/stream. 1) send {\"token\": \"ov_pat_...\"} (the token goes only in the first message, never in the URL); the server answers {\"type\":\"ready\"}. 2) send {\"text\", \"voice_id\", \"lang\", \"speed\", \"pitch\", \"format\": \"mp3\"|\"pcm\"} (same rules as POST /v1/tts). 3) binary frames carry audio as it is made (mp3, or 16-bit mono PCM at the sampleRate in the done message), then {\"type\":\"done\", characters, durationMs, usage, requestId, sampleRate}. Errors arrive as {\"type\":\"error\",\"error\":{code,message}}; the socket stays open for the next text. Send {\"type\":\"close\"} to end. Close codes: 4401 bad token, 4403 origin not allowed, 4429 too many wrong tokens, 4400 bad message.","responses":{"101":{"description":"Switching protocols (WebSocket)"}}}},"/v1/speech":{"post":{"operationId":"speech_classic","tags":["Speech"],"summary":"Classic streaming speech (the Orange voice only)","security":[{"bearer":["speech"]}],"responses":{"200":{"description":"Audio bytes, streamed as they are made","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Quote this to support"},"X-Characters":{"schema":{"type":"string"},"description":"Characters counted"},"X-Audio-Seconds":{"schema":{"type":"string"},"description":"Length of the audio"},"X-Usage-Used":{"schema":{"type":"string"},"description":"Used this period"},"X-Usage-Limit":{"schema":{"type":"string"},"description":"This period's limit"},"X-Usage-Left":{"schema":{"type":"string"},"description":"Left this period"}},"content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"SERVICE_NOT_LIVE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"speech","description":"The first API. New code should use POST /v1/tts (every voice and language).","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Up to 5,000 characters"},"voice":{"type":"string","description":"A voice id from GET /v1/voices"},"language":{"type":"string","enum":["en-IN","hi","bn","hinglish"]},"format":{"type":"string","enum":["mp3","wav"],"default":"mp3"},"speed":{"type":"number","minimum":0.5,"maximum":2,"default":1}},"required":["text","voice","language"]}}}}}},"/v1/stt":{"post":{"operationId":"speech_to_text","tags":["Speech"],"summary":"Speech to text","security":[{"bearer":["transcribe"]}],"responses":{"200":{"description":"Transcript","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"lang":{"type":"string"},"duration":{"type":"number"},"seconds":{"type":"number"},"segments":{"type":"array","items":{"$ref":"#/components/schemas/Segment"}},"speakers":{"type":"integer"},"exports":{"type":"object","properties":{"txt":{"type":"string"},"srt":{"type":"string"},"vtt":{"type":"string"}}},"usage":{"$ref":"#/components/schemas/Usage"},"requestId":{"type":"string"},"historyId":{"type":["string","null"]}}}},"text/plain":{"schema":{"type":"string"}},"text/vtt":{"schema":{"type":"string"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"transcribe","description":"Counts seconds of audio (rounded up). Audio or video, up to 3,600 seconds. Most 100 MB a file.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary","description":"Any common audio or video file"},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa","auto"],"default":"auto","description":"Language code, or auto to detect it."},"diarize":{"type":"boolean","default":false,"description":"Tell speakers apart"},"timestamps":{"type":"boolean","default":true},"format":{"type":"string","enum":["json","txt","srt","vtt"],"default":"json"}},"required":["audio"]}}}}}},"/v1/convert":{"post":{"operationId":"voice_changer","tags":["Speech"],"summary":"Voice changer (up to 120 s)","security":[{"bearer":["convert"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"audioUrl":{"type":"string","format":"uri"},"format":{"type":"string"},"durationMs":{"type":"integer"},"seconds":{"type":"number"},"text":{"type":"string"},"lang":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"},"requestId":{"type":"string"},"historyId":{"type":["string","null"]}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Voice cannot speak that language (LANGUAGE_NOT_VOICED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"convert","description":"Says the same words in another voice. Counts seconds. Most 100 MB a file. Longer files: use POST /v1/dub with the same target language.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"audio":{"type":"string","format":"binary"},"voice_id":{"type":"string","examples":["orange"],"description":"A voice id from GET /v1/voices (for example orange, the house voice)."},"lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa","auto"],"default":"auto","description":"Language code, or auto to detect it."}},"required":["audio","voice_id"]}}}}}},"/v1/dub":{"post":{"operationId":"start_dub","tags":["Jobs"],"summary":"Dub audio or video into another language (paid plans)","security":[{"bearer":["dub"]}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"},"jobId":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"dub","description":"Asynchronous: answers 202 with a job at once. Poll GET /v1/jobs/{id} every 2 to 5 seconds until status is done (result.url is the file; links last a few minutes, so download promptly or poll again for a fresh link) or failed (error.code; nothing was counted). Counts seconds of the input, up to 600 s. Most 100 MB a file.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"media":{"type":"string","format":"binary","description":"Audio or video (mp4 keeps the picture)"},"source_lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa","auto"],"default":"auto","description":"Language code, or auto to detect it."},"target_lang":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."},"voice_id":{"type":"string","examples":["orange"],"description":"A voice id from GET /v1/voices (for example orange, the house voice)."}},"required":["media","target_lang"]}}}}}},"/v1/stories":{"get":{"operationId":"list_stories","tags":["Stories"],"summary":"List your stories","security":[{"bearer":["stories"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"stories":{"type":"array","items":{"$ref":"#/components/schemas/Story"}}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories"},"post":{"operationId":"create_story","tags":["Stories"],"summary":"Create a story","security":[{"bearer":["stories"]}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Story"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories","description":"Up to 200 chapters, 2,000 lines and 100,000 characters.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryInput"},"example":{"title":"Chhutir din","lang":"en-IN","speakers":[{"name":"Narrator","voice_id":"orange"}],"chapters":[{"title":"One","lines":[{"speaker":"Narrator","voice_id":"orange","text":"It was a quiet Sunday in Kolkata."}]}]}}}}}},"/v1/stories/{id}":{"get":{"operationId":"get_story","tags":["Stories"],"summary":"Get a story","security":[{"bearer":["stories"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Story"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]},"put":{"operationId":"save_story","tags":["Stories"],"summary":"Replace a story","security":[{"bearer":["stories"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Story"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoryInput"}}}}},"delete":{"operationId":"delete_story","tags":["Stories"],"summary":"Delete a story","security":[{"bearer":["stories"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/stories/{id}/render":{"post":{"operationId":"render_story","tags":["Jobs"],"summary":"Read a story aloud (paid plans)","security":[{"bearer":["stories"]}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"},"jobId":{"type":"string"},"usage":{"$ref":"#/components/schemas/Usage"}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"stories","description":"Asynchronous: answers 202 with a job at once. Poll GET /v1/jobs/{id} every 2 to 5 seconds until status is done (result.url is the file; links last a few minutes, so download promptly or poll again for a fresh link) or failed (error.code; nothing was counted). Counts the story's characters.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"format":{"type":"string","enum":["mp3","wav"],"default":"mp3"},"chapter":{"type":"integer","minimum":0,"description":"Only this chapter (0-based)"}}}}}}}},"/v1/jobs":{"get":{"operationId":"list_jobs","tags":["Jobs"],"summary":"Your 50 most recent jobs","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read","description":"Any of the scopes dub, stories, voices:write or account:read."}},"/v1/jobs/{id}":{"get":{"operationId":"get_job","tags":["Jobs"],"summary":"A job's status and result","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read","description":"Any of the scopes dub, stories, voices:write or account:read. Asynchronous: answers 202 with a job at once. Poll GET /v1/jobs/{id} every 2 to 5 seconds until status is done (result.url is the file; links last a few minutes, so download promptly or poll again for a fresh link) or failed (error.code; nothing was counted).","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/plans":{"get":{"operationId":"list_plans","tags":["Account"],"summary":"Plans on sale (prices in paise)","security":[{}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"plans":{"type":"array","items":{"$ref":"#/components/schemas/Plan"}},"currency":{"type":"string"},"upgrade":{"type":"string"},"downgrade":{"type":"string"}}}}}}}}},"/v1/subscription":{"get":{"operationId":"get_subscription","tags":["Account"],"summary":"Your plan, its period and usage","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean","description":"A paid plan is on"},"status":{"type":"string"},"plan":{"$ref":"#/components/schemas/Plan"},"periodStart":{"type":["string","null"]},"periodEnd":{"type":["string","null"]},"usage":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"unit":{"type":"string"},"used":{"type":"integer"},"limit":{"type":["integer","null"]},"left":{"type":["integer","null"]}}}},"clones":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]}}}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read"}},"/v1/usage":{"get":{"operationId":"get_usage","tags":["Account"],"summary":"This period's usage and what is left","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"periodStart":{"type":["string","null"]},"periodEnd":{"type":["string","null"]},"characters":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]}},"description":"Speech (TTS, stories, design)"},"seconds":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":["integer","null"]}},"description":"Audio (STT, voice changer, dub)"},"products":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string","enum":["orange_voice","orange_audio","orange_app"]},"unit":{"type":"string"},"used":{"type":"integer"},"limit":{"type":["integer","null"]},"left":{"type":["integer","null"]}}}},"recent":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"characters":{"type":"integer"},"seconds":{"type":"number"}}}}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read"}},"/v1/history":{"get":{"operationId":"list_history","tags":["Account"],"summary":"Studio history (website work)","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"title":{"type":"string"},"lang":{"type":["string","null"]},"voiceId":{"type":["string","null"]},"characters":{"type":["integer","null"]},"seconds":{"type":["number","null"]},"audioUrl":{"type":["string","null"]},"createdAt":{"type":"string"}}}}}}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read","description":"Lists work done on the website studio. Work done with an API key is not listed (its historyId is null): keep your own record and download audio when you get the link.","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string"},"description":"tts, stt, convert, dub, story"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"description":"1 to 200"}]}},"/v1/history/{id}":{"delete":{"operationId":"delete_history","tags":["Account"],"summary":"Delete a history item and its file","security":[{"bearer":["account:read"]}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"account:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"The id"}]}},"/v1/files/{key}":{"get":{"operationId":"get_file","tags":["Account"],"summary":"A result file (signed, short-lived link)","security":[{}],"responses":{"200":{"description":"OK","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found (NOT_FOUND)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"description":"Use the full link exactly as returned (it carries its own signature; no token needed). Links last about 5 minutes; then 404.","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"Taken from a result link"}]}},"/v1/audio/speech":{"post":{"operationId":"openai_speech","tags":["OpenAI-compatible"],"summary":"OpenAI-compatible text to speech","security":[{"bearer":["speech"]}],"responses":{"200":{"description":"Audio bytes","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"Quote this to support"},"X-Characters":{"schema":{"type":"string"},"description":"Characters counted"},"X-Audio-Seconds":{"schema":{"type":"string"},"description":"Length of the audio"},"X-Usage-Used":{"schema":{"type":"string"},"description":"Used this period"},"X-Usage-Limit":{"schema":{"type":"string"},"description":"This period's limit"},"X-Usage-Left":{"schema":{"type":"string"},"description":"Left this period"}},"content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/wav":{"schema":{"type":"string","format":"binary"}},"audio/ogg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Voice cannot speak that language (LANGUAGE_NOT_VOICED)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"speech","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Any; ignored"},"input":{"type":"string","description":"Up to 5,000 characters"},"voice":{"type":"string","description":"OpenAI voice names (alloy, nova, ...) use the Orange voice; or any Orange voice id"},"response_format":{"type":"string","enum":["mp3","wav","opus"],"default":"mp3"},"speed":{"type":"number","minimum":0.5,"maximum":2},"language":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa"],"description":"Language code. GET /v1/languages lists them with the features each supports."}},"required":["input"]},"example":{"model":"tts-1","voice":"alloy","input":"Hello from Kolkata."}}}}}},"/v1/audio/transcriptions":{"post":{"operationId":"openai_transcriptions","tags":["OpenAI-compatible"],"summary":"OpenAI-compatible speech to text","security":[{"bearer":["transcribe"]}],"responses":{"200":{"description":"Transcript","content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string"},"usage":{"type":"object"}}}},"text/plain":{"schema":{"type":"string"}},"text/vtt":{"schema":{"type":"string"}}}},"400":{"description":"Bad request (VALIDATION)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing, wrong, revoked or expired token (INVALID_API_KEY)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Needs a paid plan (SUBSCRIPTION_REQUIRED / SUBSCRIPTION_INACTIVE): tell the user to subscribe","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Token lacks the scope (INSUFFICIENT_SCOPE) or CLONE_LIMIT","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Idempotency-Key already used (DUPLICATE_REQUEST)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"RATE_LIMITED (wait Retry-After seconds) or MONTHLY_LIMIT_REACHED (do not retry)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds to wait before sending again","schema":{"type":"integer"}}}},"500":{"description":"Failed on our side (INTERNAL); nothing counted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-scope":"transcribe","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,64}$"},"description":"Optional, single use. A repeat with the same key is refused with 409 DUPLICATE_REQUEST and is never done or counted twice. Use a new key for each new piece of work."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"model":{"type":"string","description":"Any; ignored"},"language":{"type":"string","enum":["en-IN","hi","bn","mr","hinglish","banglish","te","ta","gu","kn","ml","or","pa","as","ur","mai","kok","ne","sd","doi","ks","mni","brx","sat","sa","auto"],"default":"auto","description":"Language code, or auto to detect it."},"response_format":{"type":"string","enum":["json","text","srt","vtt","verbose_json"],"default":"json"}},"required":["file"]}}}}}}}}