Authorizations
API Key authentication. For all API requests, include your API Key in the Authorization HTTP Header, prefixed with 'Bearer '. Example: Authorization: Bearer {API_KEY}. Strongly recommend storing your API Key on the server-side, not shared or stored on the client-side, to avoid possible API-Key leakage that can lead to serious consequences.
Body
At least one of message_id or text must be provided, along with user.
The user identifier, defined by the developer, must ensure uniqueness within the app.
For text messages generated by Dify, simply pass the generated message-id directly. The backend will use the message-id to look up the corresponding content and synthesize the voice information directly. If both message_id and text are provided simultaneously, the message_id is given priority.
Speech generated content. Used if message_id is not provided or not found.
Response
Audio file generated successfully.
The generated audio file in WAV format.