AI

Generate AI Prompt Completion

Required scopes: ai.prompt (Read only).

post/ai/prompts/{aiPromptId}/completions

Request

Request body

Example request

{
  "resources": {
    "stringIds": [
      78253
    ],
    "overridePromptValues": {
      "sourceLanguage": "English",
      "targetLanguage": "Ukrainian",
      "strings": "{\"strings\":[{\"id\":5515318,\"text\":\"About...\",\"key\":\"about\",\"context\":\"about\",\"maxLength\":null},{\"id\":5515319,\"text\":\"About Me\",\"key\":\"about_me\",\"context\":\"about_me\",\"maxLength\":null},{\"id\":5515320,\"text\":\"Current Password\",\"key\":\"current_password\",\"context\":\"current_password\",\"maxLength\":null}]}",
      "tm": "About... => Про...\nAbout Me => Про мене\nCreate Password => Створити пароль",
      "terms": "Term: Password. Translation: Пароль. Part of speech: N/A.\nTerm: password. Term doesn\\'t have a defined translation. Please translate it yourself. Part of speech: N/A.",
      "fileName": "crowdin_sample_android.xml",
      "fileContext": "N/A",
      "siblingsStrings": "N/A",
      "projectName": "Crowdin",
      "projectDescription": "Crowdin Translations. Official effort.",
      "projectPublicDescription": "Crowdin Translations. Official effort.",
      "pluralForms": "one,few,many,other",
      "fileContent": "N/A",
      "organizationName": "Acme Corporation",
      "organizationDescription": "A SaaS company providing CRM tools for SMBs."
    }
  },
  "tools": [
    {
      "tool": {
        "type": "function"
      }
    }
  ]
}

Response

AI prompt completion job was added successfully

Example response

{
  "data": {
    "identifier": "50fb3506-4127-4ba8-8296-f97dc7e3e0c3",
    "status": "finished",
    "progress": 100,
    "attributes": {
      "aiPromptId": 38
    },
    "createdAt": "2019-09-23T11:26:54+00:00",
    "updatedAt": "2019-09-23T11:26:54+00:00",
    "startedAt": "2019-09-23T11:26:54+00:00",
    "finishedAt": "2019-09-23T11:26:54+00:00",
    "eta": "1 second"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.