> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lokutor.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dify

> Use Lokutor text to speech (Versa 2.0) and speech to text (Conv 2.0) as a model provider in Dify.

The Lokutor plugin adds two model types to [Dify](https://dify.ai): text to speech (`versa-2.0`) and speech to text (`conv-2.0`), in English, Spanish, Catalan, Galician, Basque, Portuguese, French, Italian and German.

Source: [lokutor-ai/dify-plugin-lokutor](https://github.com/lokutor-ai/dify-plugin-lokutor) (MIT). Marketplace listing: submitted to [langgenius/dify-plugins#3621](https://github.com/langgenius/dify-plugins/pull/3621); until it is merged, install the `.difypkg` from the repository.

## Setup

1. Create an API key in the [dashboard](https://lokutor.com).
2. In Dify, open **Settings > Model Provider**, install **Lokutor** and paste the key.
3. Optional: **API Base URL** (default `https://api.lokutor.com/v1`) and **Language** (a language code, or detect from the text or audio).
4. In **System Model Settings**, choose `versa-2.0` for text to speech and `conv-2.0` for speech to text.

Saving the key makes one short test synthesis ("Hello") to check it, which is billed like any other request.

## What it calls

| Dify model type | Lokutor endpoint |
| :- | :- |
| Text to speech | [`POST /v1/tts/synthesize`](https://docs.lokutor.com/api-reference/rest) with `text`, `voice` (`F1`-`F5`, `M1`-`M5`) and, if set, `language` |
| Speech to text | `POST /v1/audio/transcriptions` ([OpenAI-compatible](https://docs.lokutor.com/integrations/openai-compatible.md)) with `file`, `model` and, if set, `language` |

## Limits

* Speech to text takes **WAV only**. Other formats are refused with an error; convert them first.
* Text to speech returns WAV (16-bit PCM, 44.1 kHz, mono). Text over 5,000 characters is split on sentence ends and joined into one WAV.
* Without a language, synthesis has no language hint; set one for predictable results outside English.
* Billing and limits are those of your account.

## What was tested

Unit tests with mocked HTTP, and one live round trip against `api.lokutor.com` (the word "Hello" synthesised with `F1`, then that WAV transcribed back). The plugin has **not** yet been run inside a Dify instance (Community Edition or Cloud).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.