Custom AI Module

This module helps you connect AI providers not yet supported by Crowdin. Once you create this kind of app, you’ll be able to pre-translate your content with the connected AI provider and use the AI provider as an assistant in the Editor.

You can grant access to this module to one of the following user categories:

For Crowdin:

  • Only me (i.e., project owner)
  • All project members
  • Selected users

For Crowdin Enterprise:

  • Only organization admins
  • All users in the organization projects
  • Selected users

Structure

{
   "ai-provider": [
     {
       "key": "custom-ai",
       "name": "Custom Open AI",
       "logo": "/logo.png",
       "url": "/ai-settings",
       "chatCompletionsUrl": "/chat/completions",
       "modelsUrl": "/models"
     }
   ]
}

Properties

key

Type: string

Required: yes

Description: Module identifier within the Crowdin app.

name

Type: string

Required: yes

Description: The human-readable name of the module.

logo

Type: string

Required: yes

Description: The relative URL to the custom AI's logo that will be displayed in the Crowdin UI.
The recommended resolution is 48x48 pixels.

url

Type: string

Required: no

Description: The relative URL to the module settings page (e.g., AI provider credentials settings, etc.).

chatCompletionsUrl

Type: string

Required: yes

Description: The relative URL used for fetching chat completions.

modelsUrl

Type: string

Required: yes

Description: The relative URL used for retrieving the list of models supported by the AI provider.

environments

Type: string

Allowed values: crowdin, crowdin-enterprise

Description: Set of environments where a module could be installed.
This parameter is needed for cross-product applications.

Communication between Custom AI App and Crowdin

The system sends prompts to the app using chatCompletionsUrl, the app then processes the prompts and responds to the system with a reply. When configuring a Custom AI provider in the AI > Providers page, Crowdin sends a request to the app using modelsUrl. Particularly to display available models in the respective input field in the Custom AI provider settings page. A user can select and save needed models, which then will be used for content pre-translation and communication with the assistant using chatCompletionsUrl.

Request to the App from Crowdin for сhatCompletions

HTTP request:

POST https://{AppBaseUrl}/chat/completions/

Request Headers

The request to chatCompletionsUrl will contain authorization headers (e.g., Authorization: Bearer <App JWT token>).

Request payload example:

{
  "model": "gpt-3.5-turbo",
  "messages": [
    {
      "role": "user",
      "content": "Prompt"
    },
    {
      "role": "assistant",
      "content": "Reply"
    },
    {
      "role": "user",
      "content": "New prompt"
    }
  ]
}

Expected Response from the App

Response payload example:

{
   "choices": [
      {
         "message": {
            "role": "assistant",
            "content": "New reply"
         }
      }
   ]
}

Response from the App to Crowdin for modelsUrl

Response payload example:

{
  "data": [
    {
      "id": "gpt-3.5-turbo"
    },
    {
      "id": "gpt-4-turbo"
    },
    {
      "id": "gpt-5-power"
    },
    {
      "id": "gpt-6-devil"
    },
    {
      "id": "gpt-7-magic"
    }
  ]
}

The structure of the responses from the app should correspond to the presented examples, otherwise Crowdin will consider them invalid.

Was this article helpful?