Skip to content

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.

Access

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

manifest.json
{
"modules": {
"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:

Terminal window
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": [
{
"type": "text",
"text": "Prompt"
},
{
"type": "image",
"mimeType": "image/png",
"url": "https://picsum.photos/200/300"
}
]
},
{
"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",
"supportsJsonMode": true,
"supportsFunctionCalling": true,
"supportsVision": false,
"contextWindowLimit": 16385,
"outputLimit": 4096
},
{
"id": "gpt-4-turbo",
"supportsJsonMode": true,
"supportsFunctionCalling": true,
"supportsVision": true,
"contextWindowLimit": 128000,
"outputLimit": 4096
},
{
"id": "gpt-5-power",
"supportsJsonMode": true,
"supportsFunctionCalling": true,
"supportsVision": true,
"contextWindowLimit": 1000000,
"outputLimit": 8192
},
{
"id": "gpt-6-devil",
"supportsJsonMode": true,
"supportsFunctionCalling": true,
"supportsVision": true,
"contextWindowLimit": 1000000,
"outputLimit": 8192
},
{
"id": "gpt-7-magic",
"supportsJsonMode": true,
"supportsFunctionCalling": true,
"supportsVision": true,
"contextWindowLimit": 1000000,
"outputLimit": 8192
}
]
}

Default values:

  • supportsJsonMode: false
  • supportsFunctionCalling: false
  • supportsVision: false
  • contextWindowLimit: 4096
  • outputLimit: 4096

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

Was this page helpful?