Skip to main content
POST
/
v2
/
evaluation
curl --request POST \ --url https://eu.phrase.com/quality-evaluator/v2/evaluation \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: <content-type>' \ --data ' { "qualityProfileUid": "6804b1c2d3e4f5a6b7c80123", "segments": [ { "id": "segment-1", "source": "Hello, world!", "target": "Hallo, Welt!" } ], "sourceLocaleCode": "en_us", "targetLocaleCode": "de_de" } '
{
  "qualityProfileUid": "6804b1c2d3e4f5a6b7c80123",
  "segments": [
    {
      "id": "segment-1",
      "source": "Hello, world!",
      "target": "Hallo, Welt!",
      "results": [
        {
          "type": "AI_CHECK",
          "aiCheckUid": "6804a3f2e1b2c3d4e5f60789",
          "evaluation": {
            "isValid": true,
            "explanation": "The translation uses standard German sentence structure."
          }
        },
        {
          "type": "AI_CHECK",
          "aiCheckUid": "6804a3f2e1b2c3d4e5f6078a",
          "evaluation": {
            "isValid": false,
            "explanation": "The translation uses informal greeting 'Hallo' instead of formal 'Guten Tag'."
          }
        }
      ]
    }
  ]
}
{
  "type": "urn:problem-type:unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Valid credentials were not supplied",
  "instance": "<string>"
}
{
  "type": "urn:problem-type:unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Valid credentials were not supplied"
}
{
  "type": "urn:problem-type:forbidden",
  "title": "Forbidden",
  "status": 403,
  "detail": "Insufficient permissions to perform this action"
}
{
  "type": "urn:problem-type:unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Valid credentials were not supplied",
  "instance": "<string>"
}
{
  "type": "urn:problem-type:unauthorized",
  "title": "Unauthorized",
  "status": 401,
  "detail": "Valid credentials were not supplied",
  "instance": "<string>"
}

Authorizations

Authorization
string
header
required

Use a Bearer token obtained from Phrase Platform authentication. See the Authentication guide for details on how to obtain a token.

Headers

Content-Type
string
required

Media type of the request body.

Example:

"application/json"

Body

application/json

Request to evaluate translation segments. Exactly one of qualityProfileUid or aiCheckUids must be provided. Supplying both or neither will result in a 400 Bad Request error.

segments
object[]
required

Segments to evaluate.

Required array length: 1 - 200 elements
sourceLocaleCode
string
required

Locale code compatible with Phrase locale format. Case-insensitive, supports both underscore and hyphen separators (e.g., en_us, en-US, de_de, fr_fr).

Example:

"en_us"

targetLocaleCode
string
required

Locale code compatible with Phrase locale format. Case-insensitive, supports both underscore and hyphen separators (e.g., en_us, en-US, de_de, fr_fr).

Example:

"en_us"

qualityProfileUid
string

UID of the Quality Profile to use for evaluation. Cannot be combined with aiCheckUids.

aiCheckUids
string[]

List of AI Check UIDs to evaluate against. Cannot be combined with qualityProfileUid. Maximum 3 items.

Maximum array length: 3

Response

Evaluation completed successfully. Returns evaluated segments with per-check results.

Evaluation results for v2 endpoint.

segments
object[]
required

Evaluated segments with all AI Check results nested per segment.

qualityProfileUid
string

UID of the Quality Profile used for evaluation. Null when evaluating by AI Check UIDs directly.