{"openapi":"3.1.0","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/voices":{"post":{"summary":"Clone Voice","description":"Handles the POST operation for voice cloning via the router.\n\nThis function processes a request to clone a voice using the provided parameters,\nincluding the voice name, tags, and an audio file containing the voice sample.\n\nArgs:\n    voice_name (str): The desired name for the cloned voice.\n    voice_tags (list of str): A list of tags associated with the voice for categorization or metadata.\n    voice_file (UploadFile): An uploaded file containing the audio data of the voice to be cloned.\n\nReturns:\n    dict: A JSON-compatible dictionary with a message indicating whether the user\n        has been successfully added or if the operation encountered an issue.","operationId":"clone_voice_voices_post","parameters":[{"name":"voice_name","in":"query","required":true,"schema":{"type":"string","title":"Voice Name"}},{"name":"voice_tags","in":"query","required":false,"schema":{"type":"string","title":"Voice Tags"}},{"name":"lang_code","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang Code"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_clone_voice_voices_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"Tts Endpoint","description":"Retrieves available voices for the text-to-speech (TTS) feature.\n\nThis endpoint fetches a list of TTS voices available in the application. .\n\nReturns:\n    dict: A JSON-compatible dictionary containing:\n        - 'data': A dictionary with a 'voices' key, holding a list of available voices.\n\nRaises:\n    Exception: Raised if an error occurs while retrieving the voices, with appropriate logging for debugging.","operationId":"tts_endpoint_voices_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices/assisted/script":{"get":{"summary":"Assisted Cloning Script","description":"The script a speaker reads for assisted cloning.\n\nAssisted cloning works because the words in the recording are known before it is made, so\nthe caller shows this text, records the speaker reading it, and posts the recording to\n`POST /voices/assisted`. Nothing else about the recording needs to be described.","operationId":"assisted_cloning_script_voices_assisted_script_get","parameters":[{"name":"lang_code","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang Code"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices/assisted":{"post":{"summary":"Clone Voice Assisted","description":"Clone a voice from a full recording of a known script, and speak one clip back.\n\nWhere `POST /voices` takes a reference the caller already cut and trusts ASR to say what is\nin it, this takes the whole enrollment recording and cuts the reference itself: the script\nis force-aligned to the audio, every run of whole sentences between 4 and 13 seconds is\nscored, the best is cut, and its punctuation is rewritten to the pauses the speaker actually\nleft. See `api.services.enrollment`.\n\nArgs:\n    voice_name: The desired name for the cloned voice.\n    voice_tags: Comma-separated tags for the voice.\n    lang_code: Language of the voice.\n    script: The text the speaker read. Defaults to the built-in script for `lang_code`,\n        which is what `GET /voices/assisted/script` returns.\n    preview_text: Line to speak back with the new voice. Defaults to a fixed sentence;\n        pass an empty string to skip the preview.\n    fast: Use our own enhancer (~10 s for a typical take) instead of the external one\n        (typically 20-30 s, up to ~40 s). The external one handles clipping and uneven\n        levels better, so clipped takes are likelier to be rejected with `fast`.\n        Without `fast` our enhancer runs alongside the external one, and its clone is\n        returned when the external one is unavailable or its side rejects the recording.\n        `reference.enhancer` says which ran.\n    candidates: Offer several voices to choose between instead of one (see Returns). The\n        recording is enhanced once by each enhancer either way.\n    voice_file: The enrollment recording, the whole script in one take, 15-60 seconds.\n\nReturns:\n    dict: the new `voice_id`, a `reference` report describing what was chosen and why, and\n        a `preview` clip unless one was not requested or could not be produced. The voice is\n        stored with `assisted` true and the report in `assisted_report`.\n\n        With `candidates`: a candidate set, a voice per usable pair of consecutive\n        sentences (up to MAX_SEGMENTS, the best if there are more, or the single clone's\n        passage if none is usable), cut from the external enhancer's output and named\n        `<voice_name>_slow_<first sentence>`, plus, without `fast`, the best pair cut from our\n        own as `<voice_name>_fast_<n>`; when the external enhancer gives none, the pairs come\n        from our own. Every voice is tagged `candidates:<set id>`. `candidates` lists them\n        best first, each with its `rank`, `candidate` id, `reference` report and `preview`;\n        each enhancer's best also comes as a `top_k` 10 variant (`<id>_top_k_10`, the same\n        voice, the same rank), whose preview is that voice synthesised with exactly its\n        `top_k` and `temperature` (null leaves the default). Every voice is kept, with\n        `assisted` true, `selected` false and its offer, rank, sampling variants and\n        reference report in `assisted_report`; POST /voices/assisted/choose records which\n        one the user picked.","operationId":"clone_voice_assisted_voices_assisted_post","parameters":[{"name":"voice_name","in":"query","required":true,"schema":{"type":"string","title":"Voice Name"}},{"name":"voice_tags","in":"query","required":false,"schema":{"type":"string","title":"Voice Tags"}},{"name":"lang_code","in":"query","required":false,"schema":{"type":"string","default":"en","title":"Lang Code"}},{"name":"script","in":"query","required":false,"schema":{"type":"string","title":"Script"}},{"name":"preview_text","in":"query","required":false,"schema":{"type":"string","title":"Preview Text"}},{"name":"fast","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Fast"}},{"name":"candidates","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Candidates"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_clone_voice_assisted_voices_assisted_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices/{voice_id}/assisted":{"patch":{"summary":"Update Voice Assisted","description":"Re-enroll an existing voice: pick the best snippet of a new recording and swap it in.\n\nThe same selection as `POST /voices/assisted`, applied to a voice that already exists. Its\nname, tags and id are kept; its reference (transcript, codes and markers at every speed) is\nreplaced in one write, so a rejected recording leaves the voice exactly as it was.\n\nArgs:\n    voice_id: The voice to update.\n    lang_code: Language of the new recording. Defaults to the voice's own.\n    script: The text the speaker read. Defaults to the built-in script for the language.\n    preview_text: Line to speak back with the updated voice; an empty string skips it.\n    fast: Use our own enhancer, as in `POST /voices/assisted`.\n    candidates: Re-enroll the whole candidate set `voice_id` belongs to, as\n        `POST /voices/assisted?candidates=true` made it: a candidate whose name comes again\n        keeps its voice id and is otherwise rewritten as a new candidate (unchosen, with\n        the new reference), a new one is added, and one the new recording does not give is\n        deleted. The answer is the new set, as `POST /voices/assisted` gives it. A voice\n        enrolled without candidates is refused.\n    voice_file: The new enrollment recording, the whole script in one take, 15-60 seconds.","operationId":"update_voice_assisted_voices__voice_id__assisted_patch","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}},{"name":"lang_code","in":"query","required":false,"schema":{"type":"string","title":"Lang Code"}},{"name":"script","in":"query","required":false,"schema":{"type":"string","title":"Script"}},{"name":"preview_text","in":"query","required":false,"schema":{"type":"string","title":"Preview Text"}},{"name":"fast","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Fast"}},{"name":"candidates","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Candidates"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_voice_assisted_voices__voice_id__assisted_patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices/assisted/choose":{"post":{"summary":"Choose Assisted Candidate","description":"Record which candidate of an assisted-cloning offer the user picked: the chosen voice\ngets `selected` true and the chosen sampling in its `assisted_report`, the rest of its set\n`selected` false. Choosing again replaces the choice. No reference is changed.\n\nArgs:\n    voice_id: The chosen candidate's `voice_id`.\n    top_k: The chosen candidate's `top_k`, if it was a sampling variant.\n    temperature: The chosen candidate's `temperature`, if it was a sampling variant.\n\nReturns:\n    dict: the chosen `voice_id`, and the `top_k` and `temperature` to pass with it for the\n        voice to sound as its preview did.","operationId":"choose_assisted_candidate_voices_assisted_choose_post","parameters":[{"name":"voice_id","in":"query","required":true,"schema":{"type":"string","title":"Voice Id"}},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","title":"Top K"}},{"name":"temperature","in":"query","required":false,"schema":{"type":"number","title":"Temperature"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/voices/{voice_id}":{"patch":{"summary":"Update Voice","description":"Handles the PATCH operation for updating a cloned voice.\n\nThis endpoint updates the audio clip associated with a cloned voice.\n\nArgs:\n    voice_id (str): The unique identifier of the voice to be updated. This is passed as a query parameter.\n    new_voice_name (str): new name for this voice.\n    new_voice_tags (List[str]): List of strings, contains tags to the voice.\n    new_voice_file (UploadFile): The new audio file to update the cloned voice.\n\nReturns:\n    dict: A JSON-compatible dictionary with a message indicating whether the voice has been successfully updated.\n\nRaises:\n    HTTPException: Raised if the provided `voice_id` is invalid or if the voice does not belong to the authenticated user.","operationId":"update_voice_voices__voice_id__patch","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}},{"name":"new_voice_name","in":"query","required":false,"schema":{"type":"string","title":"New Voice Name"}},{"name":"new_voice_tags","in":"query","required":false,"schema":{"type":"string","title":"New Voice Tags"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_update_voice_voices__voice_id__patch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Cloned Voice","description":"Handles the DELETE operation for removing a cloned voice.\n\nThis endpoint deletes a cloned voice from the system based on the provided `voice_id`.\nThe operation ensures that all associated data is removed.\n\nArgs:\n    voice_id (str): The unique identifier of the voice to be deleted. This is passed as a query parameter.\n\nReturns:\n    dict: A JSON-compatible dictionary containing a success message and the `voice_id` of the deleted voice.\n\nRaises:\n    HTTPException: Raised if the provided `voice_id` is invalid or if the voice does not belong to the authenticated user.","operationId":"delete_cloned_voice_voices__voice_id__delete","parameters":[{"name":"voice_id","in":"path","required":true,"schema":{"type":"string","title":"Voice Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sse/auth":{"post":{"summary":"Swap Api Key For Jwt Token","description":"Authenticate the client for futher SSE requests.\n\nIf the client decideds to authenticate using this endpoint, they will\nreceive a JWT token for future requests, allowing faster authentication for future requests.","operationId":"swap_api_key_for_jwt_token_sse_auth_post","parameters":[{"name":"expiration","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Expiration"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/sse/speak/{lang_code}":{"post":{"summary":"Sse Generator","description":"Handles the `/sse/speak/{lang_code}` POST endpoint for generating speech using Server-Sent Events (SSE).\n\nThis endpoint enables real-time streaming of text-to-speech (TTS) responses in the specified language.\nThe generated speech is sent as a continuous stream to the client using SSE.\n\nArgs:\n    lang_code (str): The unique identifier for the language in which speech will be generated.\n    request_data (dict): The body of the request containing the input text and additional configuration for TTS.\n\nReturns:\n    StreamingResponse: A Server-Sent Events (SSE) stream that transmits the generated speech in real-time.\n\nRaises:\n    HTTPException: Raised if there is an issue with the input data, language code, or TTS generation process.\n    Exception: Logs and raises any unexpected errors encountered during the operation.","operationId":"sse_generator_sse_speak__lang_code__post","parameters":[{"name":"lang_code","in":"path","required":true,"schema":{"type":"string","title":"Lang Code"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents":{"post":{"summary":"Create Agent","description":"Create an agent in the `agents` table in supabase.\n\nArgs:\n    body (dict): The request body containing the agent's details. See AgentCreateModel.","operationId":"create_agent_agents_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"summary":"List All Agents","description":"List all of the agents that belong to the user.","operationId":"list_all_agents_agents_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}":{"get":{"summary":"Get Agent","description":"Get all of the details for a specific agent and return it to the user.\n\nArgs:\n    agent_id: The path parameter. The agent_id for the requested agent.","operationId":"get_agent_agents__agent_id__get","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Agent","description":"Delete a specific agent, given an agent_id.\n\nArgs:\n    agent_id: The path parameter. The agent_id for the agent to delete.","operationId":"delete_agent_agents__agent_id__delete","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agents/{agent_id}/token":{"post":{"summary":"Get Livekit Token","operationId":"get_livekit_token_agents__agent_id__token_post","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"default":{},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ping":{"get":{"summary":"Ping","operationId":"ping_ping_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/ipa/inventory":{"get":{"summary":"Ipa Inventory","description":"The frozen `<|IPA_x|>` token set and per-language tables, so a client can show a symbol\npalette and validate typed IPA against exactly what the model has tokens for.","operationId":"ipa_inventory_ipa_inventory_get","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ipa/validate":{"post":{"summary":"Validate Ipa","operationId":"validate_ipa_ipa_validate_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ipa/suggest":{"post":{"summary":"Suggest Ipa","description":"How to say one word, in the sentence it appears in. `offset` picks the occurrence when\nthe word appears more than once; without `text` it is a plain dictionary lookup.\n\nEvery suggestion returned is already validated against the inventory, so it can go\nstraight into a `<phoneme:...>` tag. Anything out of domain is reported in `dropped`\nrather than offered.","operationId":"suggest_ipa_ipa_suggest_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routers__ipa__SuggestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/config":{"get":{"summary":"Demo Config","operationId":"demo_config_demo_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/demo/session":{"post":{"summary":"Demo Session","operationId":"demo_session_demo_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/demo/speak":{"post":{"summary":"Demo Speak","operationId":"demo_speak_demo_speak_post","parameters":[{"name":"X-Demo-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Demo-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpeakRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stress/suggest":{"post":{"summary":"Suggest Stress","description":"Where the stress falls in one Croatian or Serbian word, in the sentence it appears in.\n\n`syllables` is the word cut the way the model counts it (every vowel letter, and an r\nbetween consonants, is one); each suggestion's `syllable` is a 1-based index into it, so\na mark on that syllable's vowel (or r) sets exactly that stress.","operationId":"suggest_stress_stress_suggest_post","parameters":[{"name":"api_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key"}},{"name":"jwt_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jwt Token"}},{"name":"X-API-KEY","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/api__routers__stress__SuggestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Body_clone_voice_assisted_voices_assisted_post":{"properties":{"voice_file":{"type":"string","format":"binary","title":"Voice File"}},"type":"object","required":["voice_file"],"title":"Body_clone_voice_assisted_voices_assisted_post"},"Body_clone_voice_voices_post":{"properties":{"voice_file":{"type":"string","format":"binary","title":"Voice File"}},"type":"object","required":["voice_file"],"title":"Body_clone_voice_voices_post"},"Body_update_voice_assisted_voices__voice_id__assisted_patch":{"properties":{"voice_file":{"type":"string","format":"binary","title":"Voice File"}},"type":"object","required":["voice_file"],"title":"Body_update_voice_assisted_voices__voice_id__assisted_patch"},"Body_update_voice_voices__voice_id__patch":{"properties":{"new_voice_file":{"anyOf":[{"type":"string","format":"binary"},{"type":"string"},{"type":"null"}],"title":"New Voice File"}},"type":"object","title":"Body_update_voice_voices__voice_id__patch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"SessionRequest":{"properties":{"turnstile_token":{"type":"string","maxLength":2048,"title":"Turnstile Token"}},"type":"object","required":["turnstile_token"],"title":"SessionRequest"},"SpeakRequest":{"properties":{"voice_id":{"type":"string","maxLength":64,"title":"Voice Id"},"text":{"type":"string","maxLength":1000,"title":"Text"},"timestamps":{"type":"boolean","title":"Timestamps","default":false},"ipa_key":{"anyOf":[{"type":"string","enum":["es-castilian","pt-br"]},{"type":"null"}],"title":"Ipa Key"}},"type":"object","required":["voice_id","text"],"title":"SpeakRequest"},"ValidateItem":{"properties":{"ipa":{"type":"string","title":"Ipa","default":""},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"}},"type":"object","title":"ValidateItem"},"ValidateRequest":{"properties":{"ipa":{"type":"string","title":"Ipa","default":""},"key":{"type":"string","title":"Key","default":"en"},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/ValidateItem"},"type":"array"},{"type":"null"}],"title":"Items"}},"type":"object","title":"ValidateRequest","description":"Either a single `ipa`/`key`, or a batch in `items` (each may override `key`)."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"api__routers__ipa__SuggestRequest":{"properties":{"word":{"type":"string","title":"Word"},"text":{"type":"string","title":"Text","default":""},"offset":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Offset"},"key":{"type":"string","title":"Key","default":"en"},"limit":{"type":"integer","maximum":8.0,"minimum":1.0,"title":"Limit","default":4}},"type":"object","required":["word"],"title":"SuggestRequest","description":"`text` is deliberately unbounded: send the whole script and let the server take the\nwindow. Capping it client-side is what broke this for anything longer than a paragraph."},"api__routers__stress__SuggestRequest":{"properties":{"word":{"type":"string","title":"Word"},"lang":{"type":"string","title":"Lang"},"text":{"type":"string","title":"Text","default":""},"offset":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Offset"},"limit":{"type":"integer","maximum":6.0,"minimum":1.0,"title":"Limit","default":3}},"type":"object","required":["word","lang"],"title":"SuggestRequest","description":"`text` is deliberately unbounded, as for /ipa/suggest: the server takes the window."}}}}