Custom Services

In addition to built-in and local services, Doco Translate lets you add custom translation services that are compatible with common LLM API formats. This is useful for private deployments, proxy endpoints, enterprise gateways, or model providers not included in the default list.

Supported API Protocols

Doco Translate supports the following API protocols for custom services:

ProtocolDefault PathDescription
OpenAI/v1/chat/completionsCompatible with OpenAI Chat Completions API. Works with most providers and self-hosted servers.
Anthropic/v1/messagesCompatible with Anthropic Messages API.
Gemini/v1beta/modelsCompatible with Google Gemini API.
Ollama/api/chatCompatible with Ollama's local API format.
LM Studio/api/v1/chatCompatible with LM Studio's local server API.

The OpenAI protocol is the most widely compatible — many third-party providers and self-hosted servers implement the OpenAI Chat Completions API format.

Adding a Custom Service

Step 1: Open the Custom Service Dialog

  1. Go to Settings → Services.
  2. Scroll to the bottom of the service list on the left.
  3. Click Custom Service.

Step 2: Configure the Service

  1. Service Name — Enter a descriptive name (e.g., "My Proxy", "Company LLM"). The name must be unique.
  2. API Protocol — Select the API protocol that your service implements.
  3. Click Add to create the service.

Step 3: Configure Connection Details

After creating the service, you'll be taken to its settings page:

  1. API Key — Enter the API key if your service requires authentication. Leave empty for services that don't need a key.
  2. API Host — Enter the base URL of your service (e.g., https://my-proxy.example.com, http://192.168.1.100:8080).
  3. Model — Enter or select the model name to use for translation.
  4. Click Verify service to test the connection.

Step 4: Advanced Configuration

Click the gear icon next to the API Host field to access advanced settings:

  • API Path — Customize the request path if it differs from the protocol default (e.g., /v1/chat/completions).
  • Request Body — Add custom JSON fields that are merged into each translation request. For example, {"temperature": 0.3} to control translation creativity.
  • Request Headers — Add custom HTTP headers. For example, {"X-Custom-Header": "value"} for authentication or routing.

Note: Request Body and Request Headers must be valid JSON format.

Editing a Custom Service

  1. Go to Settings → Services.
  2. Select the custom service from the list.
  3. Click the gear icon next to the service name.
  4. Modify the name or protocol as needed.
  5. Click Save.

Deleting a Custom Service

  1. Go to Settings → Services.
  2. Select the custom service from the list.
  3. Click Delete Service at the bottom of the settings page.
  4. Confirm the deletion.

Warning: Deleting a custom service removes its configuration permanently. Any API keys and model settings will be lost.

Fetching Models

Custom services support fetching the model list from the remote server:

  1. In the service settings, click Fetch model list.
  2. The app connects to your service and retrieves available models.
  3. Select the models you want to add and click Add.

Note: Not all services support the model listing endpoint. If the fetch fails, you can add models manually.

Adding Models Manually

You can add models to a custom service without fetching:

  1. Click Add Model in the service settings.
  2. Enter the exact model identifier expected by your service.
  3. Optionally mark it as a free model.
  4. Click Add.

Common Use Cases

Private API Proxy

If you have a proxy server that routes requests to a cloud provider:

  1. Create a custom service with the OpenAI protocol.
  2. Set the API Host to your proxy URL.
  3. Enter the API key required by your proxy.
  4. Add the models your proxy supports.

Self-Hosted Model

If you run a model on your own server using vLLM, text-generation-webui, llama.cpp server, or similar:

  1. Create a custom service with the OpenAI protocol.
  2. Set the API Host to your server's address (e.g., http://localhost:8000).
  3. Add the model name your server exposes.

Enterprise Gateway

For corporate environments with centralized LLM gateways:

  1. Create a custom service with the appropriate protocol.
  2. Set the API Host to your enterprise gateway URL.
  3. Enter your corporate API key or authentication header in the advanced settings.

Previous: Local LLM Services · Next: FAQ