{"openapi":"3.1.0","info":{"title":"Boltgen Developer API","version":"1.0.0","description":"Create video jobs and livestreams, then poll job and pair status. Paid execution is subject to account credits and current service readiness."},"servers":[{"url":"/","description":"Current Boltgen origin (works with local development and deployed environments)"}],"tags":[{"name":"Videos","description":"Video generation and job status."},{"name":"Starting images","description":"Upload an image for use as a generation starting frame."},{"name":"Livestreams","description":"Create, control, and request segments from a livestream."},{"name":"Livestream pairs","description":"Manage two-segment pair execution for pair-mode livestreams."}],"paths":{"/v1/videos":{"post":{"tags":["Videos"],"operationId":"createVideo","summary":"Create a video job","description":"Requires a unique Idempotency-Key for each request. Reuse it when retrying the same request. A newly accepted job returns 202; an idempotent replay returns 200.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRequest"}}}},"responses":{"200":{"description":"Existing job returned for an idempotent replay.","headers":{"Idempotency-Key":{"description":"Idempotency-Key used for this submission.","schema":{"type":"string"}},"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAdmission"}}}},"202":{"description":"Video job accepted.","headers":{"Idempotency-Key":{"description":"Idempotency-Key used for this submission.","schema":{"type":"string"}},"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoAdmission"}}}},"400":{"description":"Invalid request, idempotency key, or expired starting image (START_IMAGE_EXPIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Account has insufficient or frozen credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Idempotency or billing environment conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}}},"413":{"description":"Request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use JSON for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}},"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}}},"503":{"description":"Admission or generation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"X-Request-Id":{"description":"Correlation ID for a request that reached video admission.","schema":{"type":"string"}}}}}}},"/v1/videos/lookup":{"get":{"tags":["Videos"],"operationId":"lookupVideoSubmission","summary":"Recover a submission by idempotency key","description":"Use the original Idempotency-Key. A 404 means the submission is not visible yet and may still commit.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Submission found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoSubmissionLookup"}}}},"400":{"description":"Invalid or missing idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Submission is not visible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Lookup is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/video-start-images":{"post":{"tags":["Starting images"],"operationId":"uploadStartingImage","summary":"Upload a starting image","description":"Upload one PNG, JPEG, or WebP image up to 2 MiB. Use the returned owner-scoped key as startingImageKey in a video request.","security":[{"ApiKeyAuth":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary","description":"PNG, JPEG, or WebP image. Maximum 2 MiB."}},"additionalProperties":false}}}},"responses":{"201":{"description":"Starting image uploaded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartingImage"}}}},"400":{"description":"Image file is missing, invalid, or has unsupported fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Image exceeds the size limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use multipart/form-data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Upload request limit or starting-image storage quota reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Seconds to wait when the upload request rate limit is reached."}}},"503":{"description":"Image storage is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams":{"post":{"tags":["Livestreams"],"operationId":"createStream","summary":"Create a livestream","description":"Requires a unique Idempotency-Key. Livestreams generate fixed 15-second segments. Pair mode optionally accepts an owner-scoped startingImageKey and its SHA-256 digest.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamRequest"}}}},"responses":{"200":{"description":"Existing livestream returned for an idempotent replay.","headers":{"Idempotency-Key":{"description":"Idempotency-Key used for this submission.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamCreated"}}}},"201":{"description":"Livestream created.","headers":{"Idempotency-Key":{"description":"Idempotency-Key used for this submission.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamCreated"}}}},"400":{"description":"Invalid request, idempotency key, or expired starting image (START_IMAGE_EXPIRED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Account has insufficient or frozen credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Idempotency or billing environment conflict.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use JSON for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"Livestream execution is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams/lookup":{"get":{"tags":["Livestreams"],"operationId":"lookupStreamSubmission","summary":"Recover a submission by idempotency key","description":"Use the original Idempotency-Key. A 404 means the submission is not visible yet and may still commit.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"Submission found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSubmissionLookup"}}}},"400":{"description":"Invalid or missing idempotency key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Submission is not visible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Lookup is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams/{id}":{"get":{"tags":["Livestreams"],"operationId":"getStreamStatus","summary":"Read livestream status","description":"Returns the current stream state and latest published sequence. Keep the watch URL from stream creation for playback.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Livestream state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamStatus"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Livestream status is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}},"patch":{"tags":["Livestreams"],"operationId":"stopStream","summary":"Stop a livestream","description":"Stops the stream after its active segment drains. The only accepted body is { status: \"stopped\" }.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopStreamRequest"}}}},"responses":{"200":{"description":"Livestream stop accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamStopped"}}}},"400":{"description":"Invalid request body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"413":{"description":"Request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use JSON for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Livestream could not be stopped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams/{id}/segments":{"post":{"tags":["Livestreams"],"operationId":"createStreamSegment","summary":"Request a livestream segment","description":"Request the next 15-second segment in order. Request another segment only after the preceding segment has published.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSegmentRequest"}}}},"responses":{"200":{"description":"Existing segment returned for a replay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSegmentAdmission"}}}},"202":{"description":"Segment accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSegmentAdmission"}}}},"400":{"description":"Invalid sequence number.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Account has insufficient or frozen credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Segment is out of order, the stream cannot accept work, or pair execution is required.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiError"},{"$ref":"#/components/schemas/StreamSegmentConflict"}]}}}},"413":{"description":"Request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use JSON for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"Segment admission is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams/{id}/pairs":{"post":{"tags":["Livestream pairs"],"operationId":"createStreamPair","summary":"Request a two-segment pair","description":"Request two adjacent segments. firstSequence must be a positive odd number. Available for pair-mode streams.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPairRequest"}}}},"responses":{"200":{"description":"Previously admitted pair returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPairAdmission"}}}},"202":{"description":"Pair accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPairAdmission"}}}},"400":{"description":"firstSequence must be a positive odd integer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"402":{"description":"Account has insufficient credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"408":{"description":"The request body took too long to arrive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Pair sequence conflicts or the stream is stopped or still has a pending segment.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiError"},{"$ref":"#/components/schemas/StreamPairAdmissionConflict"}]}}}},"413":{"description":"Request body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"415":{"description":"Use JSON for this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"Pair admission is temporarily unavailable or execution is closed.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ApiError"},{"$ref":"#/components/schemas/StreamPairExecutionClosed"}]}}}}}}},"/v1/streams/{id}/pair-activation":{"post":{"tags":["Livestream pairs"],"operationId":"activateStreamPair","summary":"Activate a pair-mode livestream","description":"Starts the scheduler for an already created pair-mode livestream.","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Scheduler activated or stream already stopped.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PairActivation"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"Livestream is not a pair-mode stream or is incomplete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Pair activation is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/streams/{id}/pairs/{firstSequence}":{"get":{"tags":["Livestream pairs"],"operationId":"getStreamPair","summary":"Get pair status","security":[{"ApiKeyAuth":[]}],"parameters":[{"$ref":"#/components/parameters/ResourceId"},{"name":"firstSequence","in":"path","required":true,"description":"Positive odd first sequence number for the pair.","schema":{"type":"integer","minimum":1,"maximum":2147483646,"not":{"multipleOf":2},"example":1}}],"responses":{"200":{"description":"Current pair and segment status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamPairStatus"}}}},"400":{"description":"firstSequence must be a positive odd integer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"401":{"description":"API key is missing or invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Livestream pair was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"Pair status is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}},"/v1/videos/{id}":{"get":{"operationId":"getVideo","summary":"Get video job status","description":"Returns status only for jobs owned by the authenticated API key. Successful jobs include a short-lived playback URL.","tags":["Videos"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","description":"Resource UUID."}}],"responses":{"200":{"description":"Current job status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStatus"}}}},"401":{"description":"401","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"404","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"503":{"description":"503","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"ApiKeyAuth":[]}]}}},"webhooks":{"videoCompleted":{"post":{"summary":"Receive a signed video completion event","description":"Operator-configured HTTPS destinations receive video.succeeded or video.failed events with retries. Verify the signature and deduplicate by event ID.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","format":"uuid"}},{"in":"header","name":"X-Boltgen-Timestamp","required":true,"schema":{"type":"string"},"description":"Unix timestamp in seconds."},{"in":"header","name":"X-Boltgen-Signature","required":true,"schema":{"type":"string"},"description":"v1= followed by the hex HMAC-SHA256 of timestamp, a period, and the raw body."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoWebhookEvent"}}}},"responses":{"2XX":{"description":"Event accepted."}}}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"http","scheme":"bearer","bearerFormat":"Boltgen API key","description":"Use Authorization: Bearer <api-key>."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Unique key for this operation; reuse it to safely retry the same request.","schema":{"type":"string","minLength":1,"maxLength":200,"pattern":"^[\\w:.\\-]+$"}},"ResourceId":{"name":"id","in":"path","required":true,"description":"Resource UUID.","schema":{"type":"string","format":"uuid"}}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"VideoRequest":{"type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"upscale":{"default":false,"type":"boolean"},"recavsrScale":{"type":"integer","enum":[2,3,4],"description":"Optional ReCaVSR scale. Requires upscale: true and an enabled signed-in account. Omit to use SoL."},"durationSeconds":{"type":"integer","minimum":5,"maximum":15,"default":15},"resolution":{"type":"string","enum":["448x256","512x288","512x320","480x864","864x480","352x640","256x448"],"default":"480x864"},"seed":{"type":"integer","minimum":0,"maximum":2147483647},"startingImageKey":{"type":"string","description":"Owner-scoped key returned by POST /v1/video-start-images."}},"required":["prompt"],"additionalProperties":false},"VideoAdmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]}},"required":["id","status"],"additionalProperties":false},"StartingImage":{"type":"object","required":["startingImageKey","startingImageSha256"],"properties":{"startingImageKey":{"type":"string"},"startingImageSha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"additionalProperties":false},"StreamRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"type":"string","minLength":1,"maxLength":4000},"upscale":{"default":false,"type":"boolean"},"resolution":{"default":"480x864","type":"string","enum":["448x256","512x288","512x320","480x864","864x480","352x640","256x448"]},"startingImageKey":{"description":"Owner-scoped image key; supported for pair mode.","type":"string"},"executionMode":{"default":"single","type":"string","enum":["single","pair"]},"startingImageSha256":{"description":"SHA-256 returned by the starting image upload endpoint.","type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["prompt"],"additionalProperties":false},"StreamStatus":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streamId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["starting","buffering","live","draining","stopped","failed"]},"latestPublishedSequence":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483647},{"type":"null"}]},"playbackAvailable":{"type":"boolean"}},"required":["streamId","status","latestPublishedSequence","playbackAvailable"],"additionalProperties":false},"VideoSubmissionLookup":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false},"StreamSubmissionLookup":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streamId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["starting","buffering","live","draining","stopped","failed"]}},"required":["streamId","status"],"additionalProperties":false},"VideoWebhookEvent":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string","enum":["video.succeeded","video.failed"]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"data":{"type":"object","properties":{"videoId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["videoId"],"additionalProperties":false}},"required":["id","type","createdAt","data"],"additionalProperties":false},"StreamCreated":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streamId":{"type":"string","format":"uuid"},"watchUrl":{"type":"string","format":"uri"},"status":{"type":"string","enum":["starting","buffering","live","draining","stopped","failed"]},"executionMode":{"type":"string","const":"pair"},"segmentDurationSeconds":{"type":"number","const":15}},"required":["streamId","watchUrl","status","segmentDurationSeconds"],"additionalProperties":false},"StreamSegmentRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sequence":{"type":"integer","minimum":1,"maximum":2147483647}},"required":["sequence"],"additionalProperties":false},"StreamSegmentAdmission":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sequence":{"type":"integer","minimum":1,"maximum":2147483647},"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]},"duplicate":{"type":"boolean"},"published":{"type":"boolean"}},"required":["sequence","jobId","status"],"additionalProperties":false},"StreamSegmentConflict":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sequence":{"type":"integer","minimum":1,"maximum":2147483647},"jobId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["segment_pending","stopped"]},"duplicate":{"type":"boolean"},"published":{"type":"boolean"}},"required":["sequence","status"],"additionalProperties":false},"StopStreamRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","const":"stopped"}},"required":["status"],"additionalProperties":false},"StreamStopped":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"streamId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["stopped","draining","failed"]}},"required":["streamId","status"],"additionalProperties":false},"StreamPairRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"firstSequence":{"anyOf":[{"type":"integer","minimum":1,"maximum":2147483646,"not":{"multipleOf":2}},{"type":"string","pattern":"^(?:[1-9]\\d{0,8})?[13579]$","description":"Canonical decimal representation of a positive odd integer at most 2147483646."}]}},"required":["firstSequence"],"additionalProperties":false},"StreamPairAdmission":{"type":"object","required":["status","batchId","items","duplicate"],"properties":{"status":{"type":"string","enum":["reserved","claimed","dispatching","queued","running","partial","completed","held","cancelled","resolved"]},"batchId":{"type":"string","format":"uuid"},"items":{"type":"array","minItems":2,"maxItems":2,"items":{"type":"object","required":["sequence","jobId"],"properties":{"sequence":{"type":"integer"},"jobId":{"type":"string","format":"uuid"}},"additionalProperties":false}},"duplicate":{"type":"boolean"}},"additionalProperties":false},"StreamPairAdmissionConflict":{"type":"object","required":["status","firstSequence"],"properties":{"status":{"type":"string","enum":["segment_pending","stopped"]},"firstSequence":{"type":"integer"},"schedulerWarning":{"type":"string","enum":["policy_unavailable","execution_closed"]}},"additionalProperties":false},"StreamPairExecutionClosed":{"type":"object","required":["status","firstSequence","schedulerWarning"],"properties":{"status":{"type":"string","const":"execution_closed"},"firstSequence":{"type":"integer"},"schedulerWarning":{"type":"string","enum":["policy_unavailable","execution_closed"]}},"additionalProperties":false},"PairActivation":{"type":"object","properties":{"streamId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["activated","stopped"]}},"required":["streamId","status"],"additionalProperties":false},"StreamPairStatus":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"firstSequence":{"type":"integer","minimum":1,"maximum":2147483646,"not":{"multipleOf":2}},"schedulerWarning":{"anyOf":[{"type":"string","enum":["policy_unavailable","execution_closed"]},{"type":"null"}]},"status":{"type":"string","const":"completed"},"generatorReconciled":{"type":"boolean"},"items":{"type":"array","prefixItems":[{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":true},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false},{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":true},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2}},"required":["batchId","firstSequence","status","generatorReconciled","items"],"additionalProperties":false},{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"firstSequence":{"type":"integer","minimum":1,"maximum":2147483646,"not":{"multipleOf":2}},"schedulerWarning":{"anyOf":[{"type":"string","enum":["policy_unavailable","execution_closed"]},{"type":"null"}]},"status":{"type":"string","const":"cancelled"},"generatorReconciled":{"type":"boolean","const":false},"items":{"type":"array","prefixItems":[{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":false},"jobStatus":{"type":"string","const":"failed"}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false},{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":false},"jobStatus":{"type":"string","const":"failed"}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2}},"required":["batchId","firstSequence","status","generatorReconciled","items"],"additionalProperties":false},{"type":"object","properties":{"batchId":{"type":"string","format":"uuid"},"firstSequence":{"type":"integer","minimum":1,"maximum":2147483646,"not":{"multipleOf":2}},"schedulerWarning":{"anyOf":[{"type":"string","enum":["policy_unavailable","execution_closed"]},{"type":"null"}]},"status":{"type":"string","enum":["reserved","claimed","dispatching","queued","running","partial","held","resolved"]},"generatorReconciled":{"type":"boolean","const":false},"items":{"anyOf":[{"type":"array","prefixItems":[{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":false},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false},{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":false},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2},{"type":"array","prefixItems":[{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":true},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false},{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":false},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2},{"type":"array","prefixItems":[{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":true},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false},{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobId":{"type":"string","format":"uuid"},"published":{"type":"boolean","const":true},"jobStatus":{"type":"string","enum":["queued","running","upscaling","succeeded","failed","cancelled"]}},"required":["sequence","jobId","published","jobStatus"],"additionalProperties":false}],"items":false,"minItems":2,"maxItems":2}]}},"required":["batchId","firstSequence","status","generatorReconciled","items"],"additionalProperties":false}]},"VideoStatus":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"const":"queued"},"workerStarting":{"const":true},"queuePosition":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["id","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["running","upscaling","held"],"type":"string"}},"required":["id","status"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"const":"succeeded"},"playbackUrl":{"type":"string","format":"uri","description":"Expiring signed playback URL."},"expiresInSeconds":{"type":"integer","minimum":1,"maximum":9007199254740991,"description":"Playback URL lifetime in seconds."}},"required":["id","status","playbackUrl","expiresInSeconds"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"enum":["failed","cancelled"],"type":"string"},"errorCode":{"type":"string"}},"required":["id","status"],"additionalProperties":false}]}}}}