{
  "openapi": "3.0.1",
  "info": {
    "title": "SiteVerdict — Translation QA & AI Translator (JSON, PO, XLIFF)",
    "description": "QA your i18n files before release: missing keys, broken placeholders, ICU plurals, HTML tags, length limits, glossary, tone. JSON, PO, XLIFF, CSV. No key needed for checks; translate gaps with your own DeepL, OpenAI or Anthropic key. HTML report and CI gate.",
    "version": "1.1",
    "x-build-id": "Bnrd1RFsG4fsMkQX5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/siteverdict~siteverdict-translation-qa/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-siteverdict-siteverdict-translation-qa",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-translation-qa/runs": {
      "post": {
        "operationId": "runs-sync-siteverdict-siteverdict-translation-qa",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/siteverdict~siteverdict-translation-qa/run-sync": {
      "post": {
        "operationId": "run-sync-siteverdict-siteverdict-translation-qa",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "files"
        ],
        "properties": {
          "files": {
            "title": "Files",
            "type": "array",
            "description": "Localisation files as objects: {\"url\": \"https://…/de.json\"} or {\"name\": \"de.json\", \"content\": \"…\"} or {\"keyValueStoreRecord\": \"store/key\"}. Optional \"locale\" and \"role\" (\"source\" or \"target\"). Formats: JSON (nested/flat, ARB), gettext PO, XLIFF 1.2/2.0, CSV (key + locale columns or key,source,target). For JSON give one source file plus target files."
          },
          "sourceLocale": {
            "title": "Source locale",
            "type": "string",
            "description": "Locale of the source strings (e.g. en, en-GB).",
            "default": "en"
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "qa",
              "translate-missing",
              "translate-all"
            ],
            "type": "string",
            "description": "qa = checks only (no key needed). translate-missing = fill missing/empty translations with your MT key, then QA. translate-all = re-translate every string.",
            "default": "qa"
          },
          "targetLocales": {
            "title": "Create these locales (translate modes)",
            "type": "array",
            "description": "New locales to create from the source (JSON/CSV), e.g. fr, es, pt-BR.",
            "items": {
              "type": "string"
            }
          },
          "translationProvider": {
            "title": "Translation provider",
            "enum": [
              "deepl",
              "openai",
              "anthropic"
            ],
            "type": "string",
            "description": "Your own DeepL, OpenAI or Anthropic key. Placeholders and markup are protected and verified after translation.",
            "default": "deepl"
          },
          "translationApiKey": {
            "title": "Translation API key",
            "type": "string",
            "description": "Your provider key (DeepL Free keys end with :fx). Never logged or output."
          },
          "translationModel": {
            "title": "LLM model (optional)",
            "type": "string",
            "description": "For OpenAI/Anthropic, e.g. gpt-4.1-mini or claude-sonnet-5-5."
          },
          "aiReview": {
            "title": "AI review (accuracy & tone)",
            "type": "boolean",
            "description": "Ask an LLM (your key) to flag mistranslations, omissions, wrong tone and terminology, with suggested fixes.",
            "default": false
          },
          "reviewProvider": {
            "title": "Review LLM provider",
            "enum": [
              "openai",
              "anthropic",
              "google",
              "mistral"
            ],
            "type": "string",
            "description": "Provider for AI review.",
            "default": "openai"
          },
          "reviewApiKey": {
            "title": "Review LLM API key",
            "type": "string",
            "description": "Your LLM key for AI review (reuses the translation key when the provider is the same)."
          },
          "reviewModel": {
            "title": "Review model (optional)",
            "type": "string",
            "description": "Model for AI review."
          },
          "glossary": {
            "title": "Glossary",
            "type": "array",
            "description": "Terminology rules: {\"source\": \"cart\", \"target\": \"Warenkorb\", \"locale\": \"de\"}, {\"source\": \"SiteVerdict\", \"doNotTranslate\": true}, {\"source\": \"Einkaufswagen\", \"forbidden\": true, \"locale\": \"de\"}."
          },
          "formality": {
            "title": "Formality per locale",
            "type": "object",
            "description": "e.g. {\"de\": \"formal\", \"fr\": \"formal\", \"es\": \"informal\"}. Checked heuristically for de/fr/es/it/nl/pt and passed to DeepL/LLMs when translating."
          },
          "styleNotes": {
            "title": "Style notes for AI",
            "type": "string",
            "description": "Brand voice and rules for LLM translation/review (e.g. 'friendly, concise, UK spelling')."
          },
          "maxLengthRatio": {
            "title": "Max length ratio",
            "minimum": 1.1,
            "maximum": 10,
            "type": "number",
            "description": "Warn when a translation is this many times longer than the source.",
            "default": 2
          },
          "maxLengthRules": {
            "title": "Hard length limits",
            "type": "array",
            "description": "e.g. [{\"keyPattern\": \"button.*\", \"max\": 20}]. XLIFF maxwidth is applied automatically."
          },
          "disabledChecks": {
            "title": "Disable checks",
            "type": "array",
            "description": "Check ids to skip, e.g. end_punctuation, double_space, inconsistent, length_ratio.",
            "items": {
              "type": "string"
            }
          },
          "untranslatedAllowlist": {
            "title": "Allowed identical strings",
            "type": "array",
            "description": "Strings that may stay identical to the source (brand names, 'OK', 'Email').",
            "items": {
              "type": "string"
            }
          },
          "failOnErrors": {
            "title": "Fail the run when errors are found (CI)",
            "type": "boolean",
            "description": "Mark the run as FAILED if any error-level issue is found: handy as a CI gate before release.",
            "default": false
          },
          "maxStrings": {
            "title": "Max strings",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety cap on strings processed per run (all files and locales).",
            "default": 100000
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}