{"openapi":"3.1.0","info":{"title":"VideoPDFs API","version":"1.0.0","summary":"Turn public HTTPS videos into readable, searchable PDFs via REST API.","description":"$1 USD per source-video minute, including API usage. Measured per second of source video: each video is rounded to the nearest second, minimum 1 second. Failed conversions are not charged. Your first 20 minutes are free. Receive $20 in introductory credit when you verify your email. (20 minutes = 20000000 USD micros at $1.00/minute). Per-video limits: the service sets a per-video length limit of 10 minutes (600 seconds) and a 500 MB source size limit; longer or larger videos are rejected with video_too_long or source_too_large and are not charged.","contact":{"name":"VideoPDFs Support","email":"support@calnflow.com","url":"https://videopdfs.com/#api"}},"externalDocs":{"description":"VideoPDFs quickstart and human-readable API reference","url":"https://videopdfs.com/#api"},"servers":[{"url":"https://api.snapclap.app/api/snapclap/v1","description":"Production VideoPDFs REST API (powered by SnapClap)"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key returned once by POST /signup/verify."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique client-generated string (1–200 characters) per logical write operation. Retrying the identical request replays the original result; reusing a key with a different payload returns 409 idempotency_conflict.","schema":{"type":"string","minLength":1,"maxLength":200}},"JobId":{"name":"jobId","in":"path","required":true,"description":"Unique conversion job identifier returned by POST /jobs.","schema":{"type":"string"}}},"schemas":{"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","verification_failed","verification_expired","unauthorized","signup_closed","account_suspended","output_expired","not_found","idempotency_conflict","not_ready","credit_already_granted","purchase_unavailable","purchase_already_completed","rate_limited","billing_unavailable","email_verification_unavailable","controls_unavailable","internal_error"]},"message":{"type":"string"}}}}},"Job":{"type":"object","required":["id","jobType","status","videoUrl","createdAt"],"properties":{"id":{"type":"string"},"jobType":{"type":"string","const":"video_to_pdf"},"status":{"type":"string","enum":["queued","running","succeeded","failed","rejected"]},"videoUrl":{"type":["string","null"],"format":"uri"},"error":{"type":["string","null"]},"errorCode":{"type":["string","null"],"description":"Set when status is rejected (video_too_long, source_too_large, insufficient_credit, spending_limit, platform_budget) or failed (processing error). Rejected and failed jobs are not charged."},"sourceDurationSeconds":{"type":["number","null"]},"billableSeconds":{"type":["integer","null"],"minimum":1},"billableMinutes":{"type":["string","null"],"description":"Decimal source minutes billed at $1.00/minute."},"segmentSeconds":{"type":"integer","enum":[300,600],"description":"PDF part length used for this job: 300 (5 minutes) or 600 (10 minutes); defaults to 600."},"segmentation":{"type":"object","properties":{"segmentSeconds":{"type":"integer","enum":[300,600]},"segmentMinutes":{"type":"number","enum":[5,10]},"optionsSeconds":{"type":"array","items":{"type":"integer"},"example":[300,600]}}},"amountUsdMicros":{"type":["string","null"],"description":"Billed USD micros (1,000,000 micros = $1.00 USD); null when uncharged."},"parts":{"type":"array","items":{"type":"object","additionalProperties":true}},"outputUrl":{"type":["string","null"],"description":"Relative path on https://api.snapclap.app with 15-minute signed exp and sig query parameters when status is succeeded. For multipart jobs it points at part 1."},"manifestUrl":{"type":["string","null"],"description":"Relative path to the 15-minute signed machine-readable manifest when status is succeeded (Video → PDF jobs)."},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":["string","null"],"format":"date-time"}}}}},"paths":{"/signup":{"post":{"operationId":"requestSignupCode","summary":"Request an email verification code for a new API account","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email"],"properties":{"name":{"type":"string","minLength":2,"maxLength":80},"email":{"type":"string","format":"email"}}},"example":{"name":"Acme Corp","email":"dev@example.com"}}}},"responses":{"202":{"description":"Verification code emailed (valid for 30 minutes).","content":{"application/json":{"schema":{"type":"object","required":["verificationRequired","email","message"],"properties":{"verificationRequired":{"type":"boolean","const":true},"email":{"type":"string","format":"email"},"message":{"type":"string"}}}}}},"400":{"description":"Invalid company name or email.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public signup disabled.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Email already received introductory credit (credit_already_granted).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Signup rate limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Email verification unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/signup/verify":{"post":{"operationId":"verifySignupCode","summary":"Confirm verification code, issue API key secret once, and grant $20 introductory credit","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","minLength":20,"maxLength":200}}}}}},"responses":{"201":{"description":"Organization created with $20.00 introductory credit (20,000,000 USD micros) and API key secret.","content":{"application/json":{"schema":{"type":"object","required":["organization","apiKey","pricing","quickstart"],"properties":{"organization":{"type":"object","required":["id","name","promotionalCreditRemainingMicros"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"promotionalCreditRemainingMicros":{"type":"string","example":"20000000"}}},"apiKey":{"type":"object","required":["id","prefix","secret"],"properties":{"id":{"type":"string"},"prefix":{"type":"string"},"secret":{"type":"string","description":"Shown once; store securely for Bearer authentication."}}},"pricing":{"type":"object","additionalProperties":true},"quickstart":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Invalid or expired verification code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Public signup disabled (signup_closed).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Email already received introductory credit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Email verification or service safety controls unavailable (email_verification_unavailable, controls_unavailable).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs":{"post":{"operationId":"createVideoToPdfJob","summary":"1. Send a video link","description":"Submits a public HTTPS video URL for Video → PDF conversion. Metered at $1.00 USD per source-video minute (rounded to the nearest second, 1-second minimum). Failed or rejected jobs are not charged.","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"name":"X-SnapClap-Wait","in":"header","required":false,"description":"Set to \"1\" to wait synchronously for conversion completion before returning.","schema":{"type":"string","enum":["1"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["videoUrl"],"properties":{"videoUrl":{"type":"string","format":"uri","description":"Publicly reachable HTTPS URL of the source video, within the per-video length limit (600 seconds / 10 minutes) and 500 MB."},"captionText":{"type":"string","maxLength":500000,"description":"Optional timed SRT or WebVTT caption text (must contain \"-->\")."},"segmentSeconds":{"type":"integer","enum":[300,600],"default":600,"description":"PDF part length: 300 (5-minute parts) or 600 (10-minute parts, default). Does not change the $1 per source-video minute price."}}},"example":{"videoUrl":"https://example.com/video.mp4","segmentSeconds":300}}}},"responses":{"200":{"description":"Idempotent replay of a previously submitted job with the same Idempotency-Key and request payload.","content":{"application/json":{"schema":{"type":"object","required":["job","replay"],"properties":{"job":{"$ref":"#/components/schemas/Job"},"replay":{"type":"boolean","const":true}}}}}},"202":{"description":"New conversion job accepted.","content":{"application/json":{"schema":{"type":"object","required":["job","replay"],"properties":{"job":{"$ref":"#/components/schemas/Job"},"replay":{"type":"boolean","const":false}}}}}},"400":{"description":"Missing Idempotency-Key or non-HTTPS videoUrl.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Account paused or service closed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency-Key reused with a different payload (idempotency_conflict).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{jobId}":{"get":{"operationId":"getVideoToPdfJob","summary":"2. Check the job","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/JobId"}],"responses":{"200":{"description":"Current job state. When status is \"succeeded\", outputUrl contains a 15-minute signed download path for part 1 and manifestUrl contains the signed machine-readable manifest.","content":{"application/json":{"schema":{"type":"object","required":["job"],"properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}},"401":{"description":"Missing or invalid Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Job not found for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{jobId}/manifest":{"get":{"operationId":"getVideoToPdfJobManifest","summary":"Machine-readable manifest for selecting only the PDF portions you need","description":"Returns one entry per PDF part. Each entry maps the part to its source start/end seconds, page range, first/last timestamp, signed pdfUrl, byte size and sha256. The $1 per source-video minute price is unchanged by segmentation. Available with the API key or a signed exp + sig from job.manifestUrl.","security":[{"bearerAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/JobId"},{"name":"fromSeconds","in":"query","required":false,"description":"Return only parts overlapping this source second.","schema":{"type":"number","minimum":0}},{"name":"toSeconds","in":"query","required":false,"description":"Return only parts overlapping up to this source second.","schema":{"type":"number","minimum":0}},{"name":"exp","in":"query","required":false,"description":"Signed manifest expiry epoch milliseconds from job.manifestUrl.","schema":{"type":"string"}},{"name":"sig","in":"query","required":false,"description":"Signed manifest HMAC token from job.manifestUrl.","schema":{"type":"string"}}],"responses":{"200":{"description":"Manifest for a succeeded job. segments may be filtered by fromSeconds/toSeconds.","content":{"application/json":{"schema":{"type":"object","required":["manifestVersion","jobId","status","source","billing","segments"],"properties":{"manifestVersion":{"type":"string","const":"videopdfs.job-manifest/v1"},"jobId":{"type":"string"},"status":{"type":"string"},"source":{"type":"object","properties":{"videoUrl":{"type":["string","null"],"format":"uri"},"durationSeconds":{"type":["number","null"]},"billableSeconds":{"type":["integer","null"]},"sampling":{"type":"object","properties":{"framesPerSecond":{"type":"number","const":1},"scaleFilter":{"type":"string","const":"scale=720:-2"},"jpegQuality":{"type":"integer","const":3},"additionalCompression":{"type":"boolean","const":false}}},"segmentation":{"type":"object","properties":{"segmentSeconds":{"type":"integer","enum":[300,600]},"segmentMinutes":{"type":"number"},"optionsSeconds":{"type":"array","items":{"type":"integer"}},"defaultSeconds":{"type":"integer","const":600}}}}},"billing":{"type":"object","properties":{"currency":{"type":"string","const":"usd"},"pricePerMinuteUsd":{"type":"string","const":"1.00"},"billableSeconds":{"type":["integer","null"]},"billableMinutes":{"type":["string","null"]},"amountUsdMicros":{"type":["string","null"]},"segmentCount":{"type":"integer"},"priceIndependentOfSegmentation":{"type":"boolean","const":true}}},"segments":{"type":"array","items":{"type":"object","required":["index","startSeconds","endSeconds","mapPage","pageOffset","pdfUrl"],"properties":{"index":{"type":"integer","minimum":1},"startSeconds":{"type":"number"},"endSeconds":{"type":"number"},"durationSeconds":{"type":"number"},"mapPage":{"type":"integer","const":1},"firstFramePage":{"type":"integer","const":2},"lastFramePage":{"type":["integer","null"]},"pageCount":{"type":["integer","null"]},"pageOffset":{"type":"number","description":"page = sourceSecond + pageOffset inside this part."},"firstTimestamp":{"type":"string","example":"5:00"},"lastTimestamp":{"type":"string","example":"9:59"},"pdfUrl":{"type":["string","null"],"description":"Part-bound signed PDF URL (15 minutes)."},"pdfBytes":{"type":["integer","null"]},"pdfSha256":{"type":["string","null"]}}}},"selection":{"type":"object","additionalProperties":true}}}}}},"400":{"description":"Invalid fromSeconds/toSeconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Signed manifest link expired or tampered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Job not found for this organization.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"The job has not succeeded yet (not_ready).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/jobs/{jobId}/pdf":{"get":{"operationId":"downloadVideoPdf","summary":"3. Download the PDF","description":"Downloads the generated PDF using either Bearer authentication or the 15-minute signed exp + sig query parameters from job.outputUrl.","security":[{"bearerAuth":[]},{}],"parameters":[{"$ref":"#/components/parameters/JobId"},{"name":"part","in":"query","required":false,"description":"1-based PDF part number (defaults to 1).","schema":{"type":"integer","minimum":1,"default":1}},{"name":"exp","in":"query","required":false,"description":"Signed link expiry epoch milliseconds from job.outputUrl.","schema":{"type":"string"}},{"name":"sig","in":"query","required":false,"description":"Signed link HMAC token from job.outputUrl.","schema":{"type":"string"}}],"responses":{"200":{"description":"Generated PDF document.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing Bearer API key when exp/sig are not supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Signed outputUrl has expired (output_expired).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Job not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Job has not yet succeeded (not_ready).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/billing":{"get":{"operationId":"getBillingSummary","summary":"Read remaining introductory and prepaid credit balances and usage summary","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Organization credit balances (in USD micros; 1,000,000 micros = $1.00 USD = 1 minute of source video) and active pricing schedule.","content":{"application/json":{"schema":{"type":"object","required":["organization","credits","pricing","month"],"properties":{"organization":{"type":"object","required":["id","promotionalCreditRemainingMicros"],"properties":{"id":{"type":"string"},"promotionalCreditRemainingMicros":{"type":"string"}}},"credits":{"type":"object","required":["prepaidUsdMicros"],"properties":{"prepaidUsdMicros":{"type":"string"}}},"pricing":{"type":"object","additionalProperties":true},"month":{"type":"object","additionalProperties":true}}}}}},"401":{"description":"Missing or invalid Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}},"/billing/credits/checkout":{"post":{"operationId":"createPrepaidCreditCheckout","summary":"Create a checkout session to purchase prepaid USD credits ($1.00 per minute)","security":[{"bearerAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountUsd"],"properties":{"amountUsd":{"type":"string","description":"USD amount in whole cents, at least \"0.50\" ($1.00 = 1 source-video minute).","example":"25.00"}}}}}},"responses":{"201":{"description":"Checkout session created.","content":{"application/json":{"schema":{"type":"object","required":["purchaseId","kind","amountUsdMicros","checkoutUrl"],"properties":{"purchaseId":{"type":"string"},"kind":{"type":"string","const":"prepaid_usd"},"amountUsdMicros":{"type":"string","example":"25000000"},"checkoutUrl":{"type":"string","format":"uri"}}}}}},"400":{"description":"Missing Idempotency-Key or invalid amountUsd (< $0.50 or fractional cents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid Bearer API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Idempotency-Key conflict or purchase already completed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"Credit checkout unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"default":{"description":"Any other error, including 500 internal_error and 503 controls_unavailable. Body is the error envelope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}}}}}