{
  "openapi": "3.1.0",
  "info": {
    "title": "translation-api-1",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://translation.api.trint.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/translation-languages": {
      "get": {
        "summary": "Translation Languages",
        "description": "Retrieves a list of supported languages for translation. Each language includes a human-readable name and its corresponding language code, which can be used when specifying translation targets.",
        "operationId": "translation-languages",
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n    \"data\": {\n        \"translationLanguages\": [\n            {\n                \"languageName\": \"Afrikaans\",\n                \"languageCode\": \"af\"\n            },\n            {\n                \"languageName\": \"Albanian\",\n                \"languageCode\": \"sq\"\n            },\n            {\n                \"languageName\": \"Amharic\",\n                \"languageCode\": \"am\"\n            },\n            {\n                \"languageName\": \"Arabic\",\n                \"languageCode\": \"ar\"\n            },\n            {\n                \"languageName\": \"Armenian\",\n                \"languageCode\": \"hy\"\n            },\n            {\n                \"languageName\": \"Azerbaijani\",\n                \"languageCode\": \"az\"\n            },\n            {\n                \"languageName\": \"Bengali\",\n                \"languageCode\": \"bn\"\n            },\n          \t...\n          ],\n          \n    },\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/": {
      "get": {
        "summary": "Get Translations",
        "description": "Retrieves translation references for a fileId (trint-id). Source and Translations.",
        "operationId": "get-translations",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transcriptId": {
                    "type": "string",
                    "description": "trint-id"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\":\n    {\n      \"source\":\n        {\n          \"fileId\": \"exampleCR7e5gFx-Y7fake\",\n          \"languageCode\": \"en\",\n          \"languageName\": \"English\",\n          \"createdDate\": 1000157600000,\n        },\n      \"translations\":\n        [\n          {\n            \"fileId\": \"exampleHTfi4YuvgI0fake\",\n            \"languageCode\": \"fr\",\n            \"languageName\": \"French\",\n            \"createdDate\": 1000222100000,\n          }\n        ],\n    },\n}"
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      },
      "post": {
        "summary": "Create Translation",
        "description": "This endpoint creates a translation of a file. The targetLanguage should be provided using a supported language code. Once the translation is complete, the translated file will be linked to the original file and available for retrieval or further processing.",
        "operationId": "create-translation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transcriptId": {
                    "type": "string",
                    "description": "trint-id to translate"
                  },
                  "targetLanguage": {
                    "type": "string",
                    "description": "language code to translate into"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"data\": {\n    \"fileId\": \"example9KD-8Eo7Casfake\",\n    \"createdDate\": 1000222100000,\n    \"languageCode\": \"es\",\n    \"sourceFileId\": \"exampleCR7e5gFx-Y7fake\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "fileId": {
                          "type": "string",
                          "example": "example9KD-8Eo7Casfake"
                        },
                        "createdDate": {
                          "type": "integer",
                          "example": 1000222100000,
                          "default": 0
                        },
                        "languageCode": {
                          "type": "string",
                          "example": "es"
                        },
                        "sourceFileId": {
                          "type": "string",
                          "example": "exampleCR7e5gFx-Y7fake"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      },
      "delete": {
        "summary": "Delete Translation",
        "description": "Deletes an existing translation.",
        "operationId": "delete-translation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "transcriptId": {
                    "type": "string",
                    "description": "trint-id to delete"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{ \"data\": { \"fileId\": \"exampleSRQGSZjBcvfake\", \"deleted\": true } }"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "fileId": {
                          "type": "string",
                          "example": "exampleSRQGSZjBcvfake"
                        },
                        "deleted": {
                          "type": "boolean",
                          "example": true,
                          "default": true
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
