{"openapi":"3.1.0","info":{"title":"Lanternaut API","version":"1","description":"List, play, embed, encode and upload Lanternaut media. Every response carries an `x-request-id` header. The API only returns JSON, and only your server should call it.\n\n**Hosts.** Everything a viewer's browser loads is on the playback domain, https://media.lanternaut.com: HLS playlists and segments, captions, posters, images and the short-lived links they redirect to, embed pages and the player module. It is the one host to allow in a Content-Security-Policy (frame-src for embeds; connect-src and media-src for your own HLS player; img-src for images and posters).\n\n**Defaults.** A playback token lives 6 hours unless `ttlSeconds` says otherwise (at most 24 hours; an operator can change the default, so read `expiresAt`). The API allows 300 requests a minute per key and 1,200 per account; past either it answers 429 with `Retry-After`. Upload part URLs last an hour. An upload left unfinished is closed after 48 hours (`upload.expired`)."},"servers":[{"url":"https://lanternaut.com/v1"}],"security":[{"apiKey":[]}],"paths":{"/projects":{"get":{"summary":"List projects","description":"Restricted keys see only their own project.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"$ref":"#/components/schemas/Project"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create project","description":"Requires account-wide access and assets:write.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (a UUID, say). The same request sent again with the same key within 24 hours gets the first answer back, with `Idempotent-Replayed: true`, instead of being done twice. The same key on a different request: 422 `idempotency_key_reused`; while the first is still being answered: 409 `idempotency_key_in_use`.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}":{"get":{"summary":"Get project and deletion progress","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename project","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete project and contents, or retry failed deletion","description":"Revokes linked keys immediately. Asynchronous deletion preserves existing holds and audit records. Requires account-wide access and assets:write.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["confirmationName"],"properties":{"confirmationName":{"type":"string","description":"Exact project name."}}}}}},"responses":{"202":{"description":"Deletion accepted","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"$ref":"#/components/schemas/Project"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{id}/project":{"patch":{"summary":"Move file without changing its ID or embed links","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project_id"],"properties":{"project_id":{"type":["string","null"],"description":"Project ID; null selects Main."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys":{"get":{"summary":"List keys without secrets","description":"Restricted keys may view only themselves.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Create an additional key","description":"Preserves existing keys. Requires an account-wide key. The raw secret is returned once.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"projectId":{"type":["string","null"],"description":"Project ID; null selects Main."},"restrictToProject":{"type":"boolean","description":"On creation, defaults to true for a project, false for Main. Restricted keys cannot manage other keys, webhooks, or admin routes."},"scopes":{"type":"array","minItems":1,"items":{"type":"string","enum":["assets:read","assets:write","usage:read","settings:write","billing:write"]}},"rateLimitPerMinute":{"type":["integer","null"],"minimum":1,"maximum":100000}}}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"apiKey":{"$ref":"#/components/schemas/ApiKey"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/{id}":{"patch":{"summary":"Update key settings","description":"Requires account-wide access. Omitted settings are preserved.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"projectId":{"type":["string","null"],"description":"Project ID; null selects Main."},"restrictToProject":{"type":"boolean","description":"On creation, defaults to true for a project, false for Main. Restricted keys cannot manage other keys, webhooks, or admin routes."},"scopes":{"type":"array","minItems":1,"items":{"type":"string","enum":["assets:read","assets:write","usage:read","settings:write","billing:write"]}},"rateLimitPerMinute":{"type":["integer","null"],"minimum":1,"maximum":100000}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"apiKey":{"$ref":"#/components/schemas/ApiKey"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Revoke a key","description":"Restricted keys may revoke only themselves.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"boolean"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/keys/{id}/rotate":{"post":{"summary":"Rotate only this key","description":"Preserves its name, location, restriction, scopes, and rate limit. Requires account-wide access. Returns the new secret once.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"},"apiKey":{"$ref":"#/components/schemas/ApiKey"}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not permitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Project is being deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets":{"get":{"summary":"List assets","description":"Newest first. Excludes deleted assets.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":200,"default":50}},{"name":"cursor","in":"query","description":"The previous page’s `nextCursor`.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Comma-separated states, e.g. `ready` for what can play now.","schema":{"type":"string","example":"ready"}},{"name":"kind","in":"query","schema":{"type":"string","enum":["video","image"]}},{"name":"project_id","in":"query","description":"Project ID or main. Omitted: all locations for an unrestricted key, or the restricted key’s location.","schema":{"type":"string"}},{"name":"ids","in":"query","description":"Up to 200 comma-separated asset IDs: the state of many in one request. Deleted assets are included (status `deleted`).","schema":{"type":"string"}},{"name":"updated_since","in":"query","description":"Only assets changed at or after this time, deleted ones included. Send the first page’s `asOf` from the previous poll.","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["assets","nextCursor","asOf"],"properties":{"assets":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/Asset"},{"type":"object","properties":{"encoding":{"oneOf":[{"$ref":"#/components/schemas/Encoding"},{"type":"null"}],"description":"A video’s encode under way, as `GET /assets/{id}` gives it."}}}]}},"nextCursor":{"type":["string","null"]},"asOf":{"type":"string","format":"date-time","description":"A little before this list was read: the next poll’s `updated_since`. A poll may repeat an asset; compare `updatedAt`."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/assets/{id}":{"get":{"summary":"Get an asset","description":"With `encoding` while an encode is under way: its stage, percent and time left. Null otherwise.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"encoding":{"oneOf":[{"$ref":"#/components/schemas/Encoding"},{"type":"null"}]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Keep or stop keeping the source file","description":"A kept original counts toward storage like the streams do, and can be downloaded (`GET /assets/{id}/original`). Not kept: it is deleted 7 days after the encode is verified, and cannot be re-encoded at a higher quality later.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["keep_original"],"properties":{"keep_original":{"type":"boolean"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Delete an asset","description":"Removes its streams and original for good, and stops playback at the edge.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/playback-token":{"post":{"summary":"Create a playback link","description":"A short-lived signed HLS link (video) or image URLs. Stops working at `expiresAt`, even mid-playback. A first encode under way gets one once its first minutes are encoded: it plays what is encoded so far, growing as the encode goes (`encoding` is set).","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ttlSeconds":{"type":"integer","minimum":1,"maximum":86400},"domains":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Hostnames it may play on; narrows the account’s allowed domains."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybackToken"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The asset cannot play yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotReady"}}}}}}},"/assets/{id}/embed":{"get":{"summary":"Get the embed","description":"For a video, the permanent iframe: add `&background=1`, or `&autoplay=1&muted=1`, `&loop=1`, to its URL, or any of Vimeo’s look options (`&color=ff0066`, `&title=0`, `&controls=0`, `&t=1m30s`…; see /docs). For an image, its permanent links: `url` (the widest width), `html` (an `<img>` with every width in its `srcset`) and `variants`. None of these expire.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"posterUrl":{"type":"string","format":"uri","description":"A video only: its current poster (the chosen thumbnail, or a frame), as a link that never expires and shows only on the allowed domains."},"html":{"type":"string"},"variants":{"type":"array","description":"An image only: one permanent link per width, smallest first.","items":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"url":{"type":"string","format":"uri"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The video is not published yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotReady"}}}}}}},"/player":{"get":{"summary":"Get the player look","description":"How every video looks and behaves when embedded: colours, which controls show, the start screen, a logo, how it starts, and the end screen. Every setting, defaults filled in. Needs an account-wide key.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerLook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Change the player look","description":"Any settings; `colors`, `show` and `endScreen` merge one level down. Refused whole (400, with `errors`) when anything is wrong. Reaches embeds within a minute.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerLook"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerLook"}}}}}},"400":{"description":"Invalid settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/projects/{id}/player":{"get":{"summary":"Get the look a project’s videos play with","description":"`own`: the project’s own look; false: it uses the account’s look (`GET /player`).","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerLook"},"own":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Give a project its own look, or change it","description":"The same settings as `PATCH /player`. The first change starts from the account’s look; afterwards, changes to the account’s look no longer reach this project. A key limited to the project may name only its files.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerLook"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerLook"},"own":{"const":true}}}}}},"400":{"description":"Invalid settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Put a project back on the account’s look","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerLook"},"own":{"const":false}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/player":{"get":{"summary":"Get a video’s chapters, cards, end screen and email form","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerExtras"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Not a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a video’s chapters, cards, end screen or email form","description":"Each field sent replaces what was there; `endScreen: null` uses the account’s, `leadForm: null` removes the form.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlayerExtras"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"player":{"$ref":"#/components/schemas/PlayerExtras"}}}}}},"400":{"description":"Invalid settings","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Not a video","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/leads":{"get":{"summary":"List answers to email forms","description":"Newest first. Needs an account-wide key.","parameters":[{"name":"asset_id","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"before","in":"query","description":"The `next` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"leads":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"total":{"type":"integer"},"next":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/leads/{leadId}":{"delete":{"summary":"Delete an answer to an email form","parameters":[{"name":"leadId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/encode":{"post":{"summary":"Encode or re-encode","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityOptions"}}}},"responses":{"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"job":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"The balance does not cover it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not included in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/encode-quote":{"get":{"summary":"What encoding (or re-encoding) a stored video will use or cost","description":"The arithmetic that charges it, against the plan’s standard minutes left and the live prices. Options left out keep what the video has.","parameters":[{"$ref":"#/components/parameters/AssetId"},{"name":"max_height","in":"query","required":false,"schema":{"type":"integer","enum":[240,480,720,1080,1440,2160]}},{"name":"delivery_mode","in":"query","required":false,"schema":{"type":"string","enum":["adaptive","single"]}},{"name":"single_resolution","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"`quote` is null for a stored video never encoded (`durationKnown: false`, with `perMinute`) and in the free sandbox (`sandbox: true`).","properties":{"quote":{"type":["object","null"],"properties":{"billedSeconds":{"type":"number"},"mode":{"type":"string","enum":["adaptive","single","switch"]},"quality":{"type":"string","enum":["standard","2k","4k"]},"topRung":{"type":"integer"},"resolutionMultiplier":{"type":"number"},"modeFactor":{"type":"number"},"weight":{"type":"number","description":"Standard minutes per minute of video."},"standardMinutes":{"type":"number"},"fromAllowanceMinutes":{"type":"number"},"allowanceLeftMinutes":{"type":"number"},"walletUsd":{"type":"number"},"text":{"type":"string"},"breakdown":{"type":"string"},"upTo":{"type":"boolean","description":"The size was assumed, not known."}}},"durationKnown":{"type":"boolean"},"sandbox":{"type":"boolean"},"perMinute":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/encode-quote":{"get":{"summary":"What encoding a file will use or cost, before it is uploaded","description":"Without width and height it assumes the video reaches what you asked for (`upTo: true`): the most it can cost.","parameters":[{"name":"duration_seconds","in":"query","required":true,"schema":{"type":"number","exclusiveMinimum":0}},{"name":"width","in":"query","required":false,"schema":{"type":"integer"}},{"name":"height","in":"query","required":false,"schema":{"type":"integer"}},{"name":"max_height","in":"query","required":false,"schema":{"type":"integer","enum":[240,480,720,1080,1440,2160]}},{"name":"delivery_mode","in":"query","required":false,"schema":{"type":"string","enum":["adaptive","single"]}},{"name":"single_resolution","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","description":"`quote` is null for a stored video never encoded (`durationKnown: false`, with `perMinute`) and in the free sandbox (`sandbox: true`).","properties":{"quote":{"type":["object","null"],"properties":{"billedSeconds":{"type":"number"},"mode":{"type":"string","enum":["adaptive","single","switch"]},"quality":{"type":"string","enum":["standard","2k","4k"]},"topRung":{"type":"integer"},"resolutionMultiplier":{"type":"number"},"modeFactor":{"type":"number"},"weight":{"type":"number","description":"Standard minutes per minute of video."},"standardMinutes":{"type":"number"},"fromAllowanceMinutes":{"type":"number"},"allowanceLeftMinutes":{"type":"number"},"walletUsd":{"type":"number"},"text":{"type":"string"},"breakdown":{"type":"string"},"upTo":{"type":"boolean","description":"The size was assumed, not known."}}},"durationKnown":{"type":"boolean"},"sandbox":{"type":"boolean"},"perMinute":{"type":"object"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/assets/{id}/renditions":{"delete":{"summary":"Remove the encoded files, keeping the original","description":"Back to `uploaded`, to encode again later. Free. Playback and embeds stop at once; captions are kept and return with the next encode.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"removed":{"type":"array","items":{"type":"integer"}},"captionsKept":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"`not_encoded`, `encode_in_progress`, `transcription_in_progress`, `original_deleted` or `asset_held`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Storage unavailable; nothing was changed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{id}/delivery-mode":{"post":{"summary":"Switch between adaptive and single-stream delivery","description":"Adaptive → single is free and immediate (200, `outcome: \"switched\"`). Single → adaptive makes the lower rungs and is charged as an encode (202, `outcome: \"queued\"`, with the `job`).","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["delivery_mode"],"properties":{"delivery_mode":{"type":"string","enum":["adaptive","single"]},"single_resolution":{"type":"integer"}}}}}},"responses":{"200":{"description":"Switched","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Queued","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"The balance does not cover it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Not included in the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/original":{"get":{"summary":"A download link for a kept original","description":"Valid 15 minutes, straight from storage. Each billing cycle, downloads up to the total size of your kept originals are free; past that the wallet pays, or 402.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"},"bytes":{"type":"integer"},"allowance":{"type":"object"},"chargedUsd":{"type":"number"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Past the free allowance and the wallet cannot cover it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Not kept, or not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{id}/transcribe":{"post":{"summary":"Caption a playing video","description":"Charged per source-minute from the wallet. Captions appear in the player, off by default; asking again replaces them.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":["string","null"],"description":"The spoken language (e.g. `en`); null or left out detects it."}}}}}},"responses":{"202":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"The balance does not cover it","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/transcript":{"get":{"summary":"The transcript: full text and timed segments","parameters":[{"$ref":"#/components/parameters/AssetId"},{"name":"format","in":"query","required":false,"description":"`vtt` returns the WebVTT file instead.","schema":{"type":"string","enum":["vtt"]}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"transcript":{"type":"object"}}}},"text/vtt":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/imports/vimeo/videos":{"get":{"summary":"A page of the connected Vimeo library","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"videos":{"type":"array","items":{"type":"object"}},"total":{"type":"integer"},"page":{"type":"integer"},"hasMore":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/imports/vimeo":{"post":{"summary":"Import videos from the connected Vimeo account","description":"At most 500 at once. Videos already imported are skipped.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (a UUID, say). The same request sent again with the same key within 24 hours gets the first answer back, with `Idempotent-Replayed: true`, instead of being done twice. The same key on a different request: 422 `idempotency_key_reused`; while the first is still being answered: 409 `idempotency_key_in_use`.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["videos"],"properties":{"videos":{"type":"array","maxItems":500,"items":{"type":"object","required":["id"],"properties":{"id":{"type":"string"},"title":{"type":"string"}}}},"project_id":{"type":["string","null"],"description":"Project ID; null selects Main."},"encode":{"type":"boolean","default":true},"keep_original":{"type":"boolean"}}},{"$ref":"#/components/schemas/QualityOptions"}]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"imports":{"type":"array","items":{"$ref":"#/components/schemas/Import"}},"skipped":{"type":"array","items":{"type":"object"}},"switchCredit":{"type":["object","null"]}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/billing/checkout":{"post":{"summary":"A hosted checkout for a plan","description":"Needs `billing:write`, which new keys do not have. The plan starts once the payment is confirmed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["planId"],"properties":{"planId":{"type":"string","description":"A plan key from GET /catalog."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","format":"uri"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The key lacks billing:write","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"That plan cannot be bought yet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/plan":{"post":{"summary":"Change plan","description":"Needs `billing:write`. Up at once (the prorated difference is charged); down at the next renewal, and only if what you store fits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["plan"],"properties":{"plan":{"type":"string"}}}}}},"responses":{"200":{"description":"Upgraded (`outcome: \"upgraded\"`)","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Scheduled for the renewal (`outcome: \"scheduled\"`)","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The key lacks billing:write","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No such plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/invoice":{"get":{"summary":"This period’s invoice: the plan, and what the wallet pays past it","description":"Needs `billing:write`.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"invoice":{"type":"object"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The key lacks billing:write","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/topups":{"post":{"summary":"Buy wallet credit","description":"Needs `billing:write`. Answers 402 with a `checkoutUrl`; the credit is added once the payment is confirmed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["amountMicros"],"properties":{"amountMicros":{"type":"integer","description":"One of the catalog’s amounts, or any between its minimum and maximum (micro-dollars)."}}}}}},"responses":{"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"description":"Pay at checkoutUrl","content":{"application/json":{"schema":{"type":"object","properties":{"checkoutUrl":{"type":"string","format":"uri"}}}}}},"403":{"description":"The key lacks billing:write","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/billing/topups/{id}/refund":{"post":{"summary":"Refund the unused part of a top-up","description":"Needs `billing:write`. Inside the catalog’s refund window; spent credit is never refunded.","parameters":[{"name":"id","in":"path","required":true,"description":"The top-up’s id.","schema":{"type":"string"}}],"responses":{"202":{"description":"Refund under way","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"refundMicros":{"type":"integer"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Outside the refund window, or nothing left to refund","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/imports":{"post":{"summary":"Import a file from a link (or one video from the connected Vimeo account)","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (a UUID, say). The same request sent again with the same key within 24 hours gets the first answer back, with `Idempotent-Replayed: true`, instead of being done twice. The same key on a different request: 422 `idempotency_key_reused`; while the first is still being answered: 409 `idempotency_key_in_use`.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"url":{"type":"string","description":"A link that downloads the file itself."},"vimeo_video_id":{"type":"string","description":"Instead of url."},"title":{"type":"string"},"project_id":{"type":["string","null"],"description":"Project ID; null selects Main."},"encode":{"type":"boolean","default":true},"keep_original":{"type":"boolean"}}},{"$ref":"#/components/schemas/QualityOptions"}]}}}},"responses":{"201":{"description":"Waiting","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/Import"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}},"get":{"summary":"List imports, newest first","parameters":[{"name":"status","in":"query","schema":{"type":"string"},"example":"failed"},{"name":"limit","in":"query","schema":{"type":"integer","maximum":200}},{"name":"cursor","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"imports":{"type":"array","items":{"$ref":"#/components/schemas/Import"}},"nextCursor":{"type":["string","null"]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/imports/{id}":{"get":{"summary":"Get an import","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/Import"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Cancel an import still waiting or copying","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/Import"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/imports/{id}/retry":{"post":{"summary":"Try a failed import again","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"import":{"$ref":"#/components/schemas/Import"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/captions":{"post":{"summary":"Add captions from a WebVTT or SubRip file (free)","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["language","captions"],"properties":{"language":{"type":"string","example":"en"},"captions":{"type":"string","description":"The whole .vtt or .srt file."}}}}}},"responses":{"201":{"description":"Published","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/requeue":{"post":{"summary":"Send a stuck file again","description":"For a file whose processing has not moved for a while: its job goes back in line and an encoder is asked for at once. Nothing new is charged. `running`: an encoder holds it now, so it was left alone.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"An encoder is working on it","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["running"]},"jobId":{"type":"string"}}}}}},"202":{"description":"Sent again","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["requeued","waiting"]},"jobId":{"type":"string"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Nothing is being processed for this file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/assets/{id}/thumbnail":{"get":{"summary":"Get a video’s thumbnail","description":"Null while the video shows its automatic frame.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"thumbnail":{"oneOf":[{"$ref":"#/components/schemas/Thumbnail"},{"type":"null"}]}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"patch":{"summary":"Set or reset a video’s thumbnail","description":"Any ready image in the library becomes the thumbnail at once; `null` goes back to the automatic frame.","parameters":[{"$ref":"#/components/parameters/AssetId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image_id"],"properties":{"image_id":{"type":["string","null"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/assets/{id}/analytics":{"get":{"summary":"Get a video’s analytics","parameters":[{"$ref":"#/components/parameters/AssetId"},{"name":"days","in":"query","required":false,"description":"The period: the last 7, 30 or 90 UTC days, today included.","schema":{"type":"integer","enum":[7,30,90],"default":30}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"assetId":{"type":"string"},"title":{"type":"string"},"days":{"type":"integer"},"startDay":{"type":"string","format":"date"},"endDay":{"type":"string","format":"date"},"totals":{"$ref":"#/components/schemas/PlaybackTotals"},"previous":{"oneOf":[{"$ref":"#/components/schemas/PlaybackTotals"},{"type":"null"}]},"daily":{"type":"array","items":{"$ref":"#/components/schemas/PlaybackDay"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/analytics":{"get":{"summary":"Get analytics for all videos","description":"Plays and watch time, from the player’s own reports, kept 90 days. `previous` is the period before (null for 90 days). Videos are ranked by plays, 50 a page.","parameters":[{"name":"days","in":"query","required":false,"description":"The period: the last 7, 30 or 90 UTC days, today included.","schema":{"type":"integer","enum":[7,30,90],"default":30}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"integer"},"startDay":{"type":"string","format":"date"},"endDay":{"type":"string","format":"date"},"totals":{"$ref":"#/components/schemas/PlaybackTotals"},"previous":{"oneOf":[{"$ref":"#/components/schemas/PlaybackTotals"},{"type":"null"}]},"daily":{"type":"array","items":{"$ref":"#/components/schemas/PlaybackDay"}},"videos":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/PlaybackTotals"},{"type":"object","properties":{"assetId":{"type":"string"},"title":{"type":"string"}}}]}},"page":{"type":"integer"},"hasMore":{"type":"boolean"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/creator/uploads":{"post":{"summary":"Start a thumbnail, GIF or sticker","description":"Thumbnails and stickers are a still PNG (16–2,048 px a side); GIFs an animated GIF (at most 640 px a side, 15 s, 180 frames). At most 20 MB. Returns an ordinary multipart upload: send its parts and complete it, then queue the creation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["kind","title","size"],"properties":{"kind":{"type":"string","enum":["thumbnail","sticker","gif"]},"title":{"type":"string","minLength":1,"maxLength":120},"size":{"type":"integer","minimum":1,"maximum":20971520},"thumbnail_for":{"type":["string","null"],"description":"The video it is for."},"source_asset_id":{"type":["string","null"]},"project_id":{"type":["string","null"],"description":"Project ID; null selects Main."}}}}}},"responses":{"201":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"upload":{"type":"object","properties":{"assetId":{"type":"string"}}},"creation":{"$ref":"#/components/schemas/Creation"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"503":{"description":"Creations cannot be hosted right now","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/creator/{id}/queue":{"post":{"summary":"Queue a creation","description":"Once its upload is complete. A thumbnail applies itself when ready.","parameters":[{"name":"id","in":"path","required":true,"description":"The creation’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"creation":{"$ref":"#/components/schemas/Creation"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Its upload is not complete","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/creator/{id}":{"get":{"summary":"Get a creation","parameters":[{"name":"id","in":"path","required":true,"description":"The creation’s asset id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"creation":{"$ref":"#/components/schemas/Creation"},"variants":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/creator":{"get":{"summary":"List creations","description":"The 100 newest.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"creations":{"type":"array","items":{"$ref":"#/components/schemas/Creation"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/webhooks":{"get":{"summary":"List webhooks","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}},"post":{"summary":"Add a webhook","description":"The signing `secret` is returned once. Each delivery is a POST of `{ id, type, createdAt, data }` with `X-Lanternaut-Signature-V2: t=<unix seconds>,v2=<hex>`, the HMAC-SHA256 of `<t>.<raw body>` with the secret; refuse one whose `t` is more than 5 minutes off. (`X-Lanternaut-Signature: sha256=<hex>` of the body alone is still sent.) A delivery not answered 2xx within 5 seconds is tried again 1 min, 5 min, 30 min and 2 h after the attempt before: five attempts in all, each with the same event id. `data` per event: see the WebhookEventData schemas.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["asset.ready","asset.errored","asset.deleted","transcript.ready","transcript.errored","lead.captured","upload.expired","usage.warning","balance.low"]}}}}}}},"responses":{"201":{"description":"Added","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/webhooks/{id}":{"patch":{"summary":"Change, pause or resume a webhook","description":"Any of `url`, `events`, `active`; what is left out stays.","parameters":[{"name":"id","in":"path","required":true,"description":"The webhook’s id.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","minProperties":1,"properties":{"active":{"type":"boolean"},"url":{"type":"string","format":"uri"},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["asset.ready","asset.errored","asset.deleted","transcript.ready","transcript.errored","lead.captured","upload.expired","usage.warning","balance.low"]}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Remove a webhook","parameters":[{"name":"id","in":"path","required":true,"description":"The webhook’s id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/webhooks/{id}/rotate-secret":{"post":{"summary":"Replace a webhook’s signing secret","description":"The new secret is returned once and signs every attempt from now on, retries included. Accept both secrets while you switch; a refused delivery is retried on the usual schedule.","parameters":[{"name":"id","in":"path","required":true,"description":"The webhook’s id.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"secret":{"type":"string"},"webhook":{"$ref":"#/components/schemas/Webhook"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/usage":{"get":{"summary":"This billing cycle’s usage and balance","description":"Needs `usage:read`. What is stored now, delivered and encoded this cycle, against the plan; what is left; whether delivery is slowed or uploads refused; and the wallet.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"The key lacks usage:read","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/deliveries":{"get":{"summary":"List recent deliveries","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":200,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/webhooks/deliveries/{id}/resend":{"post":{"summary":"Resend a failed delivery","description":"Sent again unchanged (same event id), within a minute.","parameters":[{"name":"id","in":"path","required":true,"description":"The delivery’s id.","schema":{"type":"string"}}],"responses":{"202":{"description":"Resent","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Not failed, or its webhook is paused","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/settings":{"get":{"summary":"Get the account’s settings","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"$ref":"#/components/schemas/Settings"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"A key for one location cannot read them","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change the account’s settings","description":"Needs the `settings:write` scope. `allowed_domains` replaces the whole list (at most 20; empty plays anywhere). What is left out stays.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allowed_domains":{"type":"array","items":{"type":"string"},"maxItems":100},"keep_original":{"type":"boolean"},"delivery_mode":{"type":"string","enum":["adaptive","single"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"$ref":"#/components/schemas/Settings"}}}}}},"400":{"description":"Not hostnames, or too many","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Missing settings:write, or a key for one location","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads":{"post":{"summary":"Start an upload","description":"Videos: any video/… type (MP4, MOV, WebM, MKV, AVI, MPEG-TS, 3GP…; H.264, HEVC, VP8, VP9, AV1, ProRes). Images: image/jpeg, image/png, image/webp, image/gif, image/avif, image/tiff. HEIC, SVG, sound-only files and documents are refused here, 415 `unsupported_format`, before anything is sent; with `application/octet-stream` the filename's extension decides.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Any unique string (a UUID, say). The same request sent again with the same key within 24 hours gets the first answer back, with `Idempotent-Replayed: true`, instead of being done twice. The same key on a different request: 422 `idempotency_key_reused`; while the first is still being answered: 409 `idempotency_key_in_use`.","schema":{"type":"string","minLength":1,"maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","required":["filename","size","content_type"],"properties":{"filename":{"type":"string"},"size":{"type":"integer","description":"Exact size in bytes."},"content_type":{"type":"string","example":"video/mp4"},"project_id":{"type":["string","null"],"description":"Omitted uses the key’s upload destination; null explicitly selects Main."},"title":{"type":"string"},"encode":{"type":"boolean","default":true},"keep_original":{"type":"boolean"},"transcribe":{"type":"boolean"}}},{"$ref":"#/components/schemas/QualityOptions"}]}}}},"responses":{"201":{"description":"Started","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"upload":{"$ref":"#/components/schemas/Upload"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"413":{"description":"Over the upload size, or the storage allowance","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"415":{"description":"A file type that cannot be processed (`accepted` lists them)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}":{"get":{"summary":"An upload’s shape again, to resume it","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"upload":{"$ref":"#/components/schemas/Upload"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"delete":{"summary":"Abandon an upload","description":"Its parts are discarded and the asset is deleted.","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"aborted":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"The upload is no longer open","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/uploads/{id}/parts":{"get":{"summary":"Parts already stored","description":"For resuming: send only the parts not listed.","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"type":"object","properties":{"partNumber":{"type":"integer"},"etag":{"type":"string"},"size":{"type":"integer"}}}}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}},"post":{"summary":"URLs for many parts at once","description":"For a browser that sends the file itself: your server signs the parts and hands it the URLs, so the API key stays on the server. Storage accepts PUTs from any origin and exposes `ETag`. Each URL lasts an hour; sign the rest again when they run out.","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["partNumbers"],"properties":{"partNumbers":{"type":"array","minItems":1,"maxItems":1000,"items":{"type":"integer","minimum":1}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"parts":{"type":"array","items":{"$ref":"#/components/schemas/PartUrl"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/uploads/{id}/parts/{partNumber}":{"post":{"summary":"Get the URL to send one part to","description":"PUT the part’s bytes to `url` directly; it is not sent through the API.","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}},{"name":"partNumber","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartUrl"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}},"/uploads/{id}/complete":{"post":{"summary":"Complete an upload","parameters":[{"name":"id","in":"path","required":true,"description":"The upload’s asset id (`upload.assetId`).","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"encodeQueued":{"type":"boolean"}}}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API keys in the dashboard."}},"parameters":{"AssetId":{"name":"id","in":"path","required":true,"schema":{"type":"string"}}},"responses":{"Unauthorized":{"description":"No key, or not a valid one","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such asset or endpoint","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadRequest":{"description":"The request is not valid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"PlayerLook":{"type":"object","description":"See /docs for every setting.","properties":{"colors":{"type":"object","properties":{"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"controls":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"background":{"type":"string","pattern":"^#[0-9a-f]{6}$"}}},"controls":{"type":"boolean"},"show":{"type":"object","additionalProperties":{"type":"boolean"}},"playButton":{"type":"string","enum":["auto","center","bottom"]},"byline":{"type":"string","maxLength":60},"bylineUrl":{"type":["string","null"],"format":"uri"},"portraitImageId":{"type":["string","null"]},"logoImageId":{"type":["string","null"]},"logoUrl":{"type":["string","null"],"format":"uri"},"skippingForward":{"type":"boolean"},"captionsOn":{"type":"boolean"},"preload":{"type":"string","enum":["auto","metadata","none","metadata_on_hover","auto_on_hover"]},"initialQuality":{"type":["integer","null"]},"maxQuality":{"type":["integer","null"]},"minQuality":{"type":["integer","null"]},"autopause":{"type":"boolean"},"endScreen":{"$ref":"#/components/schemas/EndScreen"}}},"EndScreen":{"type":"object","properties":{"type":{"type":"string","enum":["replay","thumbnail","loop","share","more_videos","cta","image"]},"heading":{"type":"string","maxLength":80},"text":{"type":"string","maxLength":300},"buttonLabel":{"type":"string","maxLength":30},"url":{"type":["string","null"],"format":"uri"},"imageId":{"type":["string","null"]},"videoIds":{"type":"array","maxItems":6,"items":{"type":"string"}}}},"PlayerExtras":{"type":"object","properties":{"chapters":{"type":"array","maxItems":100,"items":{"type":"object","properties":{"start":{"type":["number","string"]},"title":{"type":"string"}}}},"cards":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"start":{"type":["number","string"]},"duration":{"type":"integer","minimum":3,"maximum":60},"title":{"type":"string","maxLength":60},"text":{"type":"string","maxLength":140},"url":{"type":"string","format":"uri"},"imageId":{"type":["string","null"]}}}},"endScreen":{"oneOf":[{"$ref":"#/components/schemas/EndScreen"},{"type":"null"}]},"leadForm":{"type":["object","null"],"properties":{"at":{"oneOf":[{"type":"string","enum":["start","end"]},{"type":"number"}]},"heading":{"type":"string"},"text":{"type":"string"},"buttonLabel":{"type":"string"},"askName":{"type":"boolean"},"required":{"type":"boolean"}}}}},"Lead":{"type":"object","properties":{"id":{"type":"string"},"asset_id":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"at_seconds":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"}}},"Project":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["active","deleting","deletion_failed","deleted"]},"deletionError":{"type":["string","null"]},"videoCount":{"type":"integer"},"imageCount":{"type":"integer"},"storedBytes":{"type":"integer"},"linkedKeyCount":{"type":"integer"},"createdAt":{"type":"string","format":"date-time"}}},"ApiKey":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"keyPrefix":{"type":"string"},"projectId":{"type":["string","null"],"description":"Project ID; null selects Main."},"restrictToProject":{"type":"boolean"},"scopes":{"type":"array","items":{"type":"string"}},"rateLimitPerMinute":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"},"revokedAt":{"type":["string","null"]},"lastUsedAt":{"type":["string","null"]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}},"NotReady":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"status":{"type":"string"},"statusDetail":{"$ref":"#/components/schemas/StatusDetail"}}}]},"StatusDetail":{"type":"object","required":["playable","message","nextStep"],"properties":{"playable":{"type":"boolean"},"message":{"type":"string"},"nextStep":{"type":"string","enum":["none","wait","finish_upload","encode","top_up","upload_again","contact_support"]}}},"Asset":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":["string","null"],"description":"Project ID; null selects Main."},"title":{"type":"string"},"kind":{"type":"string","enum":["video","image"]},"status":{"type":"string","enum":["created","uploading","uploaded","queued","processing","ready","errored","blocked","awaiting_funds","deleted"],"description":"`created` (an upload is being opened), `uploading` (parts being sent; closed after 48 h), `uploaded` (stored, not encoding: sent with encode:false, or its encoded files were removed), `queued` (waiting for an encoder), `processing` (encoding), `ready` (playable), `errored` (failed; see errorReason), `blocked` (refused by moderation; never charged), `awaiting_funds` (the wallet did not cover the encode: top up, then POST /assets/{id}/encode), `deleted` (listed only with `ids` or `updated_since`)."},"statusDetail":{"$ref":"#/components/schemas/StatusDetail"},"errorReason":{"type":["string","null"]},"durationSeconds":{"type":["number","null"]},"width":{"type":["integer","null"]},"height":{"type":["integer","null"]},"maxHeight":{"type":["integer","null"]},"deliveryMode":{"type":"string","enum":["adaptive","single"]},"keepOriginal":{"type":"boolean"},"masterBytes":{"type":["integer","null"],"description":"The source file’s size."},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","description":"Moves on every change of status."},"readyAt":{"type":["string","null"],"format":"date-time"}}},"PlaybackToken":{"type":"object","required":["token","url","expiresIn","expiresAt"],"properties":{"token":{"type":"string"},"url":{"type":["string","null"],"format":"uri"},"posterUrl":{"type":["string","null"],"format":"uri","description":"A video only: its poster (the chosen thumbnail, or a frame) on the same lifetime and domains. Null while a first encode is under way."},"variants":{"type":"array","description":"Images only: each width.","items":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"url":{"type":"string"}}}},"expiresIn":{"type":"integer","description":"Seconds."},"expiresAt":{"type":"string","format":"date-time"},"domains":{"type":"array","items":{"type":"string"}},"encoding":{"$ref":"#/components/schemas/Encoding","description":"Only for a video still encoding: `url` plays what is encoded so far."}}},"Encoding":{"type":"object","description":"An encode under way.","required":["jobId","stage","percent","etaSeconds","watchableSeconds"],"properties":{"jobId":{"type":"string"},"stage":{"type":"string","enum":["waiting","downloading","encoding","finishing"]},"percent":{"type":"number","minimum":0,"maximum":100},"etaSeconds":{"type":["integer","null"],"description":"Seconds until ready; null while it cannot be estimated."},"watchableSeconds":{"type":"number","description":"Seconds of a first encode that can be watched already."},"durationSeconds":{"type":["number","null"]},"updatedAt":{"type":["string","null"],"format":"date-time"}}},"Import":{"type":"object","properties":{"id":{"type":"string"},"source":{"type":"string","enum":["url","vimeo"]},"status":{"type":"string","enum":["waiting","copying","copied","done","failed","cancelled"]},"title":{"type":"string"},"assetId":{"type":["string","null"]},"assetStatus":{"type":["string","null"],"description":"What became of the file after the copy: the asset’s own status."},"url":{"type":["string","null"]},"vimeoVideoId":{"type":["string","null"]},"bytesTotal":{"type":["integer","null"]},"bytesCopied":{"type":"integer"},"percent":{"type":"integer"},"error":{"type":["string","null"]},"captions":{"type":"string","enum":["none","pending","done","failed"]},"thumbnail":{"type":"string","enum":["none","pending","done","failed"]},"createdAt":{"type":"string","format":"date-time"},"finishedAt":{"type":["string","null"]}}},"Upload":{"type":"object","properties":{"assetId":{"type":"string"},"uploadId":{"type":["string","null"]},"key":{"type":"string","description":"Where the file is stored. Not a URL."},"declaredBytes":{"type":"integer"},"partSize":{"type":"integer","description":"Every part but the last is this size."},"partCount":{"type":"integer"},"encodeRequested":{"type":"boolean"}}},"PartUrl":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"PUT the part’s bytes here."},"method":{"const":"PUT"},"partNumber":{"type":"integer"},"expiresAt":{"type":"string","format":"date-time"}}},"Usage":{"type":"object","properties":{"plan":{"type":["string","null"]},"planName":{"type":["string","null"]},"planVersion":{"type":["integer","null"]},"sandbox":{"type":"boolean"},"period":{"type":"object","properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"storageGb":{"type":"number","description":"Stored now."},"storageGbMonths":{"type":"number","description":"Billed so far, time-weighted."},"deliveryGb":{"type":"number"},"encodeMinutes":{"type":"number","description":"Source minutes encoded."},"encodeAllowanceMinutesUsed":{"type":"number","description":"Standard minutes used."},"limits":{"type":"object","properties":{"storageGb":{"type":"number"},"deliveryGb":{"type":"number"},"deliveryGraceGb":{"type":"number"},"encodeMin":{"type":"number"}}},"remaining":{"type":"object","additionalProperties":{"type":"number"}},"over":{"type":"object","additionalProperties":{"type":"boolean"}},"throttled":{"type":"boolean","description":"Delivery is slowed: past allowance and grace with an empty wallet."},"uploadsBlocked":{"type":"boolean"},"uploadsBlockedReason":{"type":["string","null"],"enum":["storage","nonpayment",null]},"balance":{"type":"object","properties":{"availableUsd":{"type":"number"},"heldUsd":{"type":"number","description":"Reserved by encodes under way."},"overageSpendUsd":{"type":"number"}}}}},"WebhookEventData":{"description":"`data` of each event type.","oneOf":[{"title":"asset.ready","type":"object","properties":{"assetId":{"type":"string"},"jobId":{"type":"string"},"kind":{"type":"string","enum":["initial","reencode"]},"durationSeconds":{"type":["number","null"]}}},{"title":"asset.errored","type":"object","properties":{"assetId":{"type":"string"},"jobId":{"type":"string"},"kind":{"type":"string","enum":["initial","reencode"]},"status":{"type":"string","description":"`errored` or `blocked`."},"errorReason":{"type":["string","null"]}}},{"title":"asset.deleted","type":"object","properties":{"assetId":{"type":"string"}}},{"title":"transcript.ready","type":"object","properties":{"assetId":{"type":"string"},"jobId":{"type":"string"},"language":{"type":["string","null"]},"segmentCount":{"type":["integer","null"]}}},{"title":"transcript.errored","type":"object","properties":{"assetId":{"type":"string"},"jobId":{"type":"string"},"errorReason":{"type":["string","null"]}}},{"title":"lead.captured","type":"object","properties":{"leadId":{"type":"string"},"assetId":{"type":"string"},"email":{"type":"string"},"name":{"type":["string","null"]},"atSeconds":{"type":["integer","null"]},"createdAt":{"type":"string","format":"date-time"}}},{"title":"upload.expired","type":"object","properties":{"assetId":{"type":"string"},"title":{"type":"string"},"declaredBytes":{"type":"integer"},"startedAt":{"type":"string","format":"date-time"},"errorReason":{"const":"upload_abandoned"}}},{"title":"usage.warning","type":"object","description":"Once per stage per dimension per billing cycle; checked every 15 minutes.","properties":{"dimension":{"type":"string","enum":["storage","delivery","encode"]},"stage":{"type":"string","enum":["near","reached","throttled"],"description":"80% of the allowance, 100%, or delivery slowed."},"used":{"type":"number"},"limit":{"type":"number"},"unit":{"type":"string","enum":["GB","standard minutes"]},"percent":{"type":"integer"},"message":{"type":"string"},"walletAvailableUsd":{"type":"number"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"}}},{"title":"balance.low","type":"object","description":"Once per billing cycle: the wallet holds less than the smallest top-up while delivery or encoding is nearly used up.","properties":{"availableUsd":{"type":"number"},"heldUsd":{"type":"number"},"overageSpendUsd":{"type":"number"},"topupMinimumUsd":{"type":"number"},"message":{"type":"string"},"periodStart":{"type":"string","format":"date-time"},"periodEnd":{"type":"string","format":"date-time"}}}]},"QualityOptions":{"type":"object","properties":{"max_height":{"type":"integer","enum":[240,480,720,1080,1440,2160],"description":"Top of the adaptive ladder. Omitted: up to 1080p. 1440 and 2160 (2K/4K) need a plan with them."},"delivery_mode":{"type":"string","enum":["adaptive","single"]},"single_resolution":{"type":"integer"}}},"Thumbnail":{"type":"object","properties":{"imageId":{"type":"string"},"width":{"type":"integer"},"height":{"type":"integer"},"sizes":{"type":"array","description":"One permanent link per width, smallest first.","items":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"url":{"type":"string","format":"uri"}}}}}},"Creation":{"type":"object","properties":{"assetId":{"type":"string"},"kind":{"type":"string","enum":["thumbnail","sticker","gif"]},"status":{"type":"string","enum":["uploading","queued","processing","ready","failed"]},"title":{"type":"string"},"thumbnailFor":{"type":["string","null"]},"sourceAssetId":{"type":["string","null"]},"error":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"}}},"PlaybackTotals":{"type":"object","properties":{"plays":{"type":"integer","description":"Sessions that started playing."},"watchedSeconds":{"type":"number"},"completed":{"type":"integer","description":"Plays that reached the end."},"errors":{"type":"integer"}}},"PlaybackDay":{"allOf":[{"$ref":"#/components/schemas/PlaybackTotals"},{"type":"object","properties":{"day":{"type":"string","format":"date"}}}]},"Webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"WebhookDelivery":{"type":"object","properties":{"id":{"type":"string"},"webhookId":{"type":"string"},"url":{"type":"string","format":"uri"},"eventType":{"type":"string"},"payload":{"type":"object"},"status":{"type":"string","enum":["pending","delivered","failed"]},"attempts":{"type":"integer"},"responseCode":{"type":["integer","null"]},"lastAttemptAt":{"type":["string","null"],"format":"date-time"},"nextAttemptAt":{"type":["string","null"],"format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"Settings":{"type":"object","properties":{"allowedDomains":{"type":"array","items":{"type":"string"},"description":"Where videos may play and be embedded; empty means anywhere."},"defaults":{"type":"object","properties":{"keepOriginal":{"type":"boolean"},"deliveryMode":{"type":"string","enum":["adaptive","single"]}}}}}}}}