{
  "openapi": "3.1.0",
  "info": {
    "title": "realtime-api",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.trint.com/transcripts/realtime"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/{trint-id}": {
      "get": {
        "summary": "Get realtime status",
        "description": "Get the current status of a realtime",
        "operationId": "get-realtime-status",
        "parameters": [
          {
            "name": "trint-id",
            "in": "path",
            "description": "id of the realtime trint",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\": \"TRANSCRIBING\",\n  \"warnings\": [\"failed to generate waveform\"],\n  \"errors\": [\"could not detect media\"],\n  \"started\": \"2021-08-20T15:11:33.331Z\",\n  \"expires\": \"2021-08-20T21:11:33.330Z\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "TRANSCRIBING"
                    },
                    "warnings": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "failed to generate waveform"
                      }
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": "could not detect media"
                      }
                    },
                    "started": {
                      "type": "string",
                      "example": "2021-08-20T15:11:33.331Z"
                    },
                    "expires": {
                      "type": "string",
                      "example": "2021-08-20T21:11:33.330Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{ \"message\": \"The provided Trint is not a realtime\" }"
                  }
                }
              }
            }
          },
          "403": {
            "description": "403",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{ \"message\": \"Access denied\" }"
                  }
                }
              }
            }
          },
          "404": {
            "description": "404",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{ \"message\": \"The provided Trint could not be found\"}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/": {
      "put": {
        "summary": "Begin realtime transcription",
        "description": "Start new Realtime transcript",
        "operationId": "start-new-realtime-transcript",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Transcript title"
                  },
                  "language": {
                    "type": "string",
                    "description": "Transcription language",
                    "default": "en"
                  },
                  "streamUrl": {
                    "type": "string",
                    "description": "This will be your media url",
                    "default": "<protocol>://<server address>:<port>/<appl>/<id>"
                  },
                  "transcriptDelay": {
                    "type": "string",
                    "description": "numbers 1 - 10",
                    "default": "5"
                  },
                  "workspaceId": {
                    "type": "string",
                    "description": "ID of the Workspace / Shared Drive in which to create the new Trint (optional)"
                  },
                  "folderId": {
                    "type": "string",
                    "description": "ID of the Shared Drive Folder in which to create the new Trint (optional)"
                  },
                  "timezoneOffset": {
                    "type": "integer",
                    "description": "specifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1",
                    "default": 0,
                    "format": "int32"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "Metadata to be included in the callback event"
                  }
                }
              },
              "examples": {
                "Request Example": {
                  "value": {
                    "title": "Your realtime transcript title",
                    "language": "language code e.g. en",
                    "streamUrl": "<protocol>://<server address>:<port>/<appl>/<id>",
                    "transcriptDelay": 5
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n\t\"_id\": \"<newly created trintId>\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string",
                      "example": "<newly created trintId>"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      },
      "delete": {
        "summary": "Stop realtime transcription",
        "description": "Stop a running Realtime transcript",
        "operationId": "stop-realtime-transcript",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "streamId": {
                    "type": "string"
                  },
                  "trintId": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    },
    "/push": {
      "post": {
        "summary": "Create Push Stream",
        "description": "Generate a stream key and stream url for a rtmp fed realtime trint",
        "operationId": "create-push-stream",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Transcript title"
                  },
                  "language": {
                    "type": "string",
                    "description": "Transcription language",
                    "default": "en"
                  },
                  "transcriptDelay": {
                    "type": "string",
                    "description": "numbers 2 - 20",
                    "default": "5"
                  },
                  "workspaceId": {
                    "type": "string",
                    "description": "ID of the Workspace / Shared Drive in which to create the new Trint (optional)"
                  },
                  "folderId": {
                    "type": "string",
                    "description": "ID of the Shared Drive Folder in which to create the new Trint (optional)"
                  },
                  "timezoneOffset": {
                    "type": "integer",
                    "description": "specifies the timezone offset from UTC in milliseconds, e.g., 3600000 for UTC+1",
                    "default": 0,
                    "format": "int32"
                  },
                  "metadata": {
                    "type": "string",
                    "description": "Metadata to be included in the callback event"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"streamId\": \"<newly created stream id>\",\n  \"streamUrl\": \"rtmp://stream.trint.com/live\",\n  \"streamKey\": \"<single use stream key>\",\n  \"title\": \"trint title\",\n  \"trintId\": \"<newly created trint id>\"\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "streamId": {
                      "type": "string",
                      "example": "<newly created stream id>"
                    },
                    "streamUrl": {
                      "type": "string",
                      "example": "rtmp://stream.trint.com/live"
                    },
                    "streamKey": {
                      "type": "string",
                      "example": "<single use stream key>"
                    },
                    "title": {
                      "type": "string",
                      "example": "trint title"
                    },
                    "trintId": {
                      "type": "string",
                      "example": "<newly created trint id>"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "402": {
            "description": "(Realtime not enabled, please speak to your account manager)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
