{
  "info": {
    "name": "Videosays API",
    "description": "Create and monitor video transcription tasks from supported public video links. Documentation: https://videosays.com/docs",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "apikey",
    "apikey": [
      { "key": "key", "value": "X-API-Key", "type": "string" },
      { "key": "value", "value": "{{apiKey}}", "type": "string" },
      { "key": "in", "value": "header", "type": "string" }
    ]
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.videosays.com" },
    { "key": "apiKey", "value": "vs_xxxxx", "type": "secret" },
    { "key": "taskId", "value": "" },
    { "key": "batchId", "value": "" }
  ],
  "item": [
    {
      "name": "Transcription",
      "item": [
        {
          "name": "Create transcription",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"input\": \"https://www.tiktok.com/@creator/video/123456\",\n  \"options\": {\n    \"language\": \"auto\",\n    \"sourceMode\": \"auto\"\n  }\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": "{{baseUrl}}/api/v1/transcribe"
          }
        },
        {
          "name": "Get transcription",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/transcribe/{{taskId}}"
          }
        }
      ]
    },
    {
      "name": "Batches",
      "item": [
        {
          "name": "Create batch",
          "request": {
            "method": "POST",
            "header": [{ "key": "Content-Type", "value": "application/json" }],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"items\": [\n    \"https://www.douyin.com/video/123\",\n    \"https://www.youtube.com/watch?v=abc\"\n  ],\n  \"options\": {\n    \"language\": \"auto\",\n    \"sourceMode\": \"auto\"\n  }\n}",
              "options": { "raw": { "language": "json" } }
            },
            "url": "{{baseUrl}}/api/v1/batches"
          }
        },
        {
          "name": "Get batch",
          "request": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/batches/{{batchId}}"
          }
        },
        {
          "name": "Continue batch",
          "request": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/batches/{{batchId}}/continue"
          }
        },
        {
          "name": "Cancel batch",
          "request": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/batches/{{batchId}}/cancel"
          }
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "Get credits",
          "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/credits" }
        },
        {
          "name": "Get history",
          "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/history?page=1&limit=20" }
        }
      ]
    }
  ]
}
