Crowdin Enterprise (String-Based) icon

Crowdin Enterprise (String-Based)

Interact with Crowdin Enterprise API for localization management

Actions361

AI → Add AI Prompt

AI-generated

Summary

Add a new AI prompt for Crowdin Enterprise projects by specifying its name, action type, AI provider and model, target projects, and detailed configuration settings.

Inputs

  • Authentication — Choose the authentication method: OAuth2 (recommended) or Personal Access Token.
  • Name (required) — Specify the name of the AI prompt.
  • Action (required) — Select the AI prompt action, such as pre_translate, alignment, or qa_check. Note that 'assist' action is deprecated.
  • Ai Provider Id — Optionally select the AI provider by its identifier, obtainable through List AI Providers.
  • Ai Model Id — Optionally select the AI model ID, dependent on the chosen AI provider, retrievable via List AI Provider Models.
  • Enabled Project Ids — Optionally specify an array of project IDs where this AI prompt should be enabled, fetched via List Projects.
  • Config (required) — Provide the AI prompt configuration object, which varies by action and mode. It supports multiple modes (basic for pre_translate, alignment, qa_check actions; advanced; external), each with specific fields such as snippets, context inclusion flags, evaluation steps (for QA), and prompt text.

Output shape

a single record containing the created AI prompt details as returned by the Crowdin API

The output includes all details of the newly added AI prompt. Some input fields are loaded dynamically via helper methods to list AI providers, models, projects, snippets, and languages. The operation requires the 'name', 'action', and 'config' fields as mandatory inputs. Authentication configuration defaults to OAuth2 but can be customized.

Examples

Example 1: Add a pre-translate AI prompt using basic mode with selected snippets and enabled projects

Set 'Name' to identify the prompt, choose 'Action' as pre_translate, select AI Provider and Model IDs if needed, specify 'Enabled Project Ids', and provide 'Config' with 'Basic mode (pre-translate action)' options such as snippets and context toggles.

Links

Discussion