{"openapi": "3.1.0", "info": {"title": "Vocify Voice API", "version": "1.0.0", "description": "Text to natural speech. 1 token = 1 character. Use format=json to get a link to the MP3."}, "servers": [{"url": "https://vocify.pro"}], "components": {"securitySchemes": {"bearer": {"type": "http", "scheme": "bearer"}}}, "security": [{"bearer": []}], "paths": {"/api/v1/tts": {"post": {"operationId": "generateSpeech", "summary": "Convert text to speech", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["text"], "properties": {"text": {"type": "string", "description": "Text to speak. [pause 2s] adds silence."}, "voice": {"type": "string", "default": "en-us-julia-multi", "description": "Voice id from listVoices"}, "speed": {"type": "number", "minimum": 0.5, "maximum": 2, "default": 1, "description": "Speaking speed"}, "pitch": {"type": "integer", "minimum": -50, "maximum": 50, "default": 0, "description": "Pitch shift in Hz"}, "volume": {"type": "integer", "minimum": -100, "maximum": 100, "default": 0, "description": "Volume change in %"}, "format": {"type": "string", "enum": ["json", "mp3"], "default": "mp3", "description": "json returns audio_url/srt_url links; mp3 returns the audio bytes"}, "emotion": {"type": "string", "enum": ["auto", "neutral", "happy", "sad", "angry", "excited", "fearful", "suspenseful", "curious", "surprised", "shocked", "confident", "empathetic", "sarcastic", "romantic", "hopeful", "frustrated", "nervous", "calm", "soothing", "mysterious", "inspirational"], "description": "auto = each sentence gets the emotion that fits its meaning"}, "style": {"type": "string", "enum": ["natural", "conversational", "cinematic", "documentary", "storytelling", "audiobook", "podcast", "news", "motivational", "comedic", "whispering", "shouting", "asmr"], "default": "natural", "description": "Speaking style"}, "intensity": {"type": "number", "minimum": 0, "maximum": 2, "default": 1, "description": "Emotion strength"}}}}}}, "responses": {"200": {"description": "Speech generated", "content": {"application/json": {"schema": {"type": "object", "properties": {"id": {"type": "string"}, "audio_url": {"type": "string"}, "srt_url": {"type": "string"}, "duration": {"type": "number"}, "characters": {"type": "integer"}, "voice": {"type": "string"}, "quota": {"type": "object"}}}}, "audio/mpeg": {"schema": {"type": "string", "format": "binary"}}}}, "402": {"description": "Not enough tokens"}, "401": {"description": "Missing or invalid API key"}}}}, "/api/v1/dialogue": {"post": {"operationId": "generateDialogue", "summary": "Several voices in one audio file", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "required": ["lines"], "properties": {"lines": {"type": "array", "items": {"type": "object", "required": ["text"], "properties": {"voice": {"type": "string"}, "text": {"type": "string"}}}}, "gap": {"type": "number", "default": 0.35}, "speed": {"type": "number", "minimum": 0.5, "maximum": 2, "default": 1, "description": "Speaking speed"}, "pitch": {"type": "integer", "minimum": -50, "maximum": 50, "default": 0, "description": "Pitch shift in Hz"}, "volume": {"type": "integer", "minimum": -100, "maximum": 100, "default": 0, "description": "Volume change in %"}, "format": {"type": "string", "enum": ["json", "mp3"], "default": "mp3", "description": "json returns audio_url/srt_url links; mp3 returns the audio bytes"}, "emotion": {"type": "string", "enum": ["auto", "neutral", "happy", "sad", "angry", "excited", "fearful", "suspenseful", "curious", "surprised", "shocked", "confident", "empathetic", "sarcastic", "romantic", "hopeful", "frustrated", "nervous", "calm", "soothing", "mysterious", "inspirational"], "description": "auto = each sentence gets the emotion that fits its meaning"}, "style": {"type": "string", "enum": ["natural", "conversational", "cinematic", "documentary", "storytelling", "audiobook", "podcast", "news", "motivational", "comedic", "whispering", "shouting", "asmr"], "default": "natural", "description": "Speaking style"}, "intensity": {"type": "number", "minimum": 0, "maximum": 2, "default": 1, "description": "Emotion strength"}}}}}}, "responses": {"200": {"description": "Speech generated", "content": {"application/json": {"schema": {"type": "object", "properties": {"id": {"type": "string"}, "audio_url": {"type": "string"}, "srt_url": {"type": "string"}, "duration": {"type": "number"}, "characters": {"type": "integer"}, "voice": {"type": "string"}, "quota": {"type": "object"}}}}, "audio/mpeg": {"schema": {"type": "string", "format": "binary"}}}}, "402": {"description": "Not enough tokens"}, "401": {"description": "Missing or invalid API key"}}}}, "/api/v1/voices": {"get": {"operationId": "listVoices", "summary": "List available voices", "security": [], "parameters": [{"name": "lang", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Language code, e.g. ur, en, hi"}, {"name": "gender", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Female or Male"}, {"name": "q", "in": "query", "required": false, "schema": {"type": "string"}, "description": "Search text"}], "responses": {"200": {"description": "Voices", "content": {"application/json": {"schema": {"type": "object", "properties": {"count": {"type": "integer"}, "voices": {"type": "array", "items": {"type": "object"}}}}}}}}}}, "/api/v1/me": {"get": {"operationId": "getBalance", "summary": "Token balance and limits for this key", "responses": {"200": {"description": "Balance", "content": {"application/json": {"schema": {"type": "object"}}}}}}}}}