{
  "info": {
    "name": "Vidocu API v1",
    "description": "Complete Vidocu API collection. Set the `base_url` and `api_key` variables before running.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{api_key}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "base_url",
      "value": "https://api.vidocu.ai",
      "type": "string"
    },
    {
      "key": "api_key",
      "value": "vdo_live_your_key_here",
      "type": "string"
    },
    {
      "key": "video_id",
      "value": "",
      "type": "string"
    },
    {
      "key": "job_id",
      "value": "",
      "type": "string"
    }
  ],
  "item": [
    {
      "name": "Health Check",
      "request": {
        "auth": { "type": "noauth" },
        "method": "GET",
        "header": [],
        "url": {
          "raw": "{{base_url}}/health",
          "host": ["{{base_url}}"],
          "path": ["health"]
        },
        "description": "Unauthenticated health check endpoint."
      },
      "response": []
    },
    {
      "name": "Videos",
      "item": [
        {
          "name": "Upload Video (from URL)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('video_id', json.id);",
                  "    console.log('Saved video_id:', json.id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"videoUrl\": \"https://example.com/videos/demo.mp4\",\n  \"name\": \"Product Demo\",\n  \"videoContext\": \"A walkthrough of the new dashboard features\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/upload",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "upload"]
            },
            "description": "Create a video from an existing URL. No file upload needed. Auto-saves video_id for subsequent requests."
          },
          "response": []
        },
        {
          "name": "Upload Video (presigned URL)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('video_id', json.id);",
                  "    if (json.uploadUrl) pm.collectionVariables.set('upload_url', json.uploadUrl);",
                  "    console.log('Saved video_id:', json.id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"filename\": \"demo.mp4\",\n  \"contentType\": \"video/mp4\",\n  \"name\": \"Product Demo\",\n  \"videoContext\": \"A walkthrough of the new dashboard features\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/upload",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "upload"]
            },
            "description": "Get a presigned S3 upload URL and create a draft video. Upload the file to the returned uploadUrl with a PUT request. Auto-saves video_id for subsequent requests."
          },
          "response": []
        },
        {
          "name": "Upload Video (direct file)",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 201) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('video_id', json.id);",
                  "    console.log('Saved video_id:', json.id);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "file",
                  "type": "file",
                  "src": "",
                  "description": "Video file to upload (max 500 MB)"
                },
                {
                  "key": "name",
                  "value": "Product Demo",
                  "type": "text",
                  "description": "Display name (optional)"
                },
                {
                  "key": "videoContext",
                  "value": "A walkthrough of the new dashboard features",
                  "type": "text",
                  "description": "Context about the video (optional)"
                }
              ]
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/upload",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "upload"]
            },
            "description": "Upload a video file directly via multipart form-data. The server handles the S3 upload. Max file size: 500 MB. Auto-saves video_id for subsequent requests."
          },
          "response": []
        },
        {
          "name": "List Videos",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/videos?page=1&limit=20",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos"],
              "query": [
                { "key": "page", "value": "1" },
                { "key": "limit", "value": "20" },
                { "key": "status", "value": "completed", "disabled": true }
              ]
            },
            "description": "List all videos with pagination. Optionally filter by status (draft, in_progress, completed)."
          },
          "response": []
        },
        {
          "name": "Get Video",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}"]
            },
            "description": "Get a single video by ID."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Operations",
      "item": [
        {
          "name": "Analyze Video",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 202 || pm.response.code === 200) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('job_id', json.jobId);",
                  "    console.log('Saved job_id:', json.jobId);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"videoContext\": \"Product demo for new dashboard\",\n  \"language\": \"en\",\n  \"tone\": \"professional\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/analyze",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "analyze"]
            },
            "description": "Start async video analysis. Auto-saves job_id for polling."
          },
          "response": []
        },
        {
          "name": "Export Video",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 202 || pm.response.code === 200) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('job_id', json.jobId);",
                  "    console.log('Saved job_id:', json.jobId);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"language\": \"en\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/export",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "export"]
            },
            "description": "Start async video export. Video must be analyzed first."
          },
          "response": []
        },
        {
          "name": "Translate Video",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 202 || pm.response.code === 200) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('job_id', json.jobId);",
                  "    console.log('Saved job_id:', json.jobId);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"language\": \"es\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/translate",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "translate"]
            },
            "description": "Start async translation. Requires Growth plan or higher. Video must be analyzed first."
          },
          "response": []
        },
        {
          "name": "Get Subtitles (JSON)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/subtitles?format=json",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "subtitles"],
              "query": [
                { "key": "format", "value": "json" }
              ]
            },
            "description": "Get subtitles in JSON format. Video must be analyzed first."
          },
          "response": []
        },
        {
          "name": "Get Subtitles (SRT)",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/subtitles?format=srt",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "subtitles"],
              "query": [
                { "key": "format", "value": "srt" }
              ]
            },
            "description": "Get subtitles in SRT format. Video must be analyzed first."
          },
          "response": []
        },
        {
          "name": "Generate Voiceover",
          "event": [
            {
              "listen": "test",
              "script": {
                "exec": [
                  "if (pm.response.code === 202) {",
                  "    var json = pm.response.json();",
                  "    pm.collectionVariables.set('job_id', json.jobId);",
                  "    console.log('Saved job_id:', json.jobId);",
                  "}"
                ],
                "type": "text/javascript"
              }
            }
          ],
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"voiceId\": \"EXAVITQu4vr4xnSDxMaL\",\n  \"language\": \"en\"\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/voiceover",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "voiceover"]
            },
            "description": "Start async voiceover generation. Requires Growth plan or higher. Video must have subtitles."
          },
          "response": []
        },
        {
          "name": "Generate Article",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"regenerate\": false\n}"
            },
            "url": {
              "raw": "{{base_url}}/v1/videos/{{video_id}}/article",
              "host": ["{{base_url}}"],
              "path": ["v1", "videos", "{{video_id}}", "article"]
            },
            "description": "Generate a help article from the video transcript. Synchronous — returns the article directly. Set regenerate to true to force a new article."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Jobs",
      "item": [
        {
          "name": "Get Job Status",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/jobs/{{job_id}}",
              "host": ["{{base_url}}"],
              "path": ["v1", "jobs", "{{job_id}}"]
            },
            "description": "Poll an async job for status, progress, and results."
          },
          "response": []
        }
      ]
    },
    {
      "name": "Usage",
      "item": [
        {
          "name": "Get Usage",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{base_url}}/v1/usage",
              "host": ["{{base_url}}"],
              "path": ["v1", "usage"]
            },
            "description": "Get current billing period usage counters and plan limits."
          },
          "response": []
        }
      ]
    }
  ]
}
