{"openapi":"3.1.0","info":{"title":"NinetyTen Labs API","version":"1.0.0","description":"Upload a recording, edit it into short clips, write captions, and post or schedule to your connected accounts. Every request is scoped to the key's workspace and acts with the seat of the person who made the key. Paid calls reserve credits first and release them if the work fails. Rate limit: 120 requests a minute per key."},"servers":[{"url":"https://app.ninetytenlabs.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Workspace"},{"name":"Accounts"},{"name":"Uploads"},{"name":"Videos"},{"name":"Writing"},{"name":"Publishing"},{"name":"Automations"},{"name":"Results"},{"name":"Credits"},{"name":"Content"}],"paths":{"/api/v1/me":{"get":{"operationId":"getMe","summary":"The key and its workspace","tags":["Workspace"],"description":"The workspace this key belongs to, its scopes, the seat it acts with, whether the plan allows writing, and the rate limit.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"key":{"type":"object","properties":{"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["read","write","publish"]}}},"required":["name","scopes"],"additionalProperties":false},"seat":{"type":"string","enum":["owner","manager","creator","viewer"]},"publishing":{"type":"string","enum":["direct","approval","none"]},"plan":{"type":"object","properties":{"tier":{"type":"string"},"writeAllowed":{"type":"boolean"}},"required":["tier","writeAllowed"],"additionalProperties":false},"rateLimit":{"type":"object","properties":{"perMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["perMinute"],"additionalProperties":false}},"required":["workspace","key","seat","publishing","plan","rateLimit"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/accounts":{"get":{"operationId":"listAccounts","summary":"Connected accounts","tags":["Accounts"],"description":"The social accounts connected to this workspace. Use an account id when posting.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"platform":{"type":"string"},"username":{"type":"string"}},"required":["id","platform","username"],"additionalProperties":false}}},"required":["accounts"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/uploads":{"post":{"operationId":"createUpload","summary":"Get an upload slot","tags":["Uploads"],"description":"A signed slot for one recording (MP4, MOV or WebM up to 5 GB). Send the file with one PUT to upload.url, or resumably (tus) to resumable.endpoint with the headers given. Then call complete. Makes a new video when productionId is left out.\n\nScope: write. A key with the write scope, on a paid plan.","x-scope":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"productionId":{"description":"An existing video waiting for footage. Left out, a new video is made.","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)$"},"title":{"type":"string","minLength":1,"maxLength":120},"template":{"type":"string","enum":["talking_head","list","tier_ranking","challenge","broll"]},"contentType":{"type":"string","enum":["video/mp4","video/quicktime","video/webm","video/x-m4v"]},"size":{"type":"integer","exclusiveMinimum":0,"maximum":5368709120,"description":"Exact size in bytes."}},"required":["contentType","size"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"uploadId":{"type":"string"},"productionId":{"type":"string"},"expiresInSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"upload":{"type":"object","properties":{"method":{"type":"string","const":"PUT"},"url":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["method","url","headers"],"additionalProperties":false},"resumable":{"type":"object","properties":{"protocol":{"type":"string","const":"tus"},"endpoint":{"type":"string"},"chunkSize":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["protocol","endpoint","chunkSize","headers","metadata"],"additionalProperties":false}},"required":["uploadId","productionId","expiresInSeconds","upload","resumable"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/uploads/{id}/complete":{"post":{"operationId":"completeUpload","summary":"Confirm an upload arrived","tags":["Uploads"],"description":"Checks the file arrived whole at the size promised and attaches it to its video. Nothing is edited or charged yet; start the edit next.\n\nScope: write. A key with the write scope, on a paid plan.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false}},"required":["production"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions":{"get":{"operationId":"listProductions","summary":"Videos","tags":["Videos"],"description":"This workspace's videos, newest first.\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"productions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false}}},"required":["productions"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createProduction","summary":"Make a video, or import one from a link","tags":["Videos"],"description":"Makes a video waiting for footage, or, with sourceUrl, imports a recording from a public https link (checked before it is accepted). Choices for the edit are saved; nothing is charged until the edit starts.\n\nScope: write. A key with the write scope, on a paid plan.","x-scope":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":120},"template":{"default":"talking_head","description":"list and tier_ranking add a ranked board with logos.","type":"string","enum":["talking_head","list","tier_ranking","challenge","broll"]},"brief":{"description":"What the video is about, for the editor.","type":"string","maxLength":4000},"sourceUrl":{"description":"A public https link to a video file.","type":"string","maxLength":2048,"format":"uri"},"timezone":{"type":"string","maxLength":80},"options":{"type":"object","properties":{"engine":{"description":"auto picks the quick cut for recordings up to 10 minutes and the full edit for longer ones.","type":"string","enum":["auto","fast_cut","deep"]},"energy":{"description":"How much the picture moves, every move eased. calm (Calm): a slow push only. standard (Smooth, the default): always gently moving, a soft punch-in on key lines. high (Lively): stronger punch-ins on more beats. jumpcut: the framing steps at each cut with a slow creep between. static: no motion.","type":"string","enum":["calm","standard","high","jumpcut","static"]},"layout":{"description":"For horizontal footage: fill crops to vertical, fit keeps the whole frame with text above and below. auto: fit for horizontal, fill for vertical.","type":"string","enum":["auto","fill","fit"]},"broll":{"description":"B-roll cutaways. Off unless asked for; adds to the price.","type":"object","properties":{"images":{"type":"boolean"},"video":{"type":"boolean"}},"additionalProperties":false},"loop":{"description":"A Loop: about 8 seconds of the footage that plays on repeat, one big line of text on screen and a sound under it, for footage with no talking. Left out, a recording with no talking, or a brief that asks for a POV, b-roll or text over footage, becomes one on its own.","type":"boolean"}},"additionalProperties":false}},"required":["title"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false}},"required":["production"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}":{"get":{"operationId":"getProduction","summary":"Video status and progress","tags":["Videos"],"description":"Where a video is: its status, the edit stage, clips rendered, and any message.\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false},"progress":{"anyOf":[{"type":"object","properties":{"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"anyOf":[{"type":"string"},{"type":"null"}]},"startedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"doneAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"object","properties":{"rendered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["rendered","failed","total"],"additionalProperties":false}},"required":["engine","stage","startedAt","doneAt","clips"],"additionalProperties":false},{"type":"null"}]}},"required":["production","progress"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/quote":{"get":{"operationId":"quoteEdit","summary":"Price an edit","tags":["Videos"],"description":"What editing this recording will cost, read from the file itself, and which editor it gets.\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"engine":{"type":"string"},"job":{"type":"string"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["engine","job","credits","balance","seconds"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/edit":{"post":{"operationId":"startEdit","summary":"Start the edit","tags":["Videos"],"description":"Starts editing an uploaded or imported recording into short clips. Priced from the recording; the credits are held when it starts and released if it fails.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"object","properties":{"engine":{"description":"auto picks the quick cut for recordings up to 10 minutes and the full edit for longer ones.","type":"string","enum":["auto","fast_cut","deep"]},"energy":{"description":"How much the picture moves, every move eased. calm (Calm): a slow push only. standard (Smooth, the default): always gently moving, a soft punch-in on key lines. high (Lively): stronger punch-ins on more beats. jumpcut: the framing steps at each cut with a slow creep between. static: no motion.","type":"string","enum":["calm","standard","high","jumpcut","static"]},"layout":{"description":"For horizontal footage: fill crops to vertical, fit keeps the whole frame with text above and below. auto: fit for horizontal, fill for vertical.","type":"string","enum":["auto","fill","fit"]},"broll":{"description":"B-roll cutaways. Off unless asked for; adds to the price.","type":"object","properties":{"images":{"type":"boolean"},"video":{"type":"boolean"}},"additionalProperties":false},"loop":{"description":"A Loop: about 8 seconds of the footage that plays on repeat, one big line of text on screen and a sound under it, for footage with no talking. Left out, a recording with no talking, or a brief that asks for a POV, b-roll or text over footage, becomes one on its own.","type":"boolean"}},"additionalProperties":false},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["production","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/edit/accept":{"post":{"operationId":"acceptEditPrice","summary":"Accept a new edit price","tags":["Videos"],"description":"An edit never costs more than the price confirmed. When the recording turns out dearer (longer than it looked, a length that could not be read, or it needs the longer edit), nothing is charged and the video waits with choice set. This starts it at the new price; if it now costs less, the lower price is charged.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmCredits":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Must equal choice.credits, or nothing runs and the current price comes back."}},"required":["confirmCredits"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["production","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/edit/keep":{"post":{"operationId":"keepEditAsIs","summary":"Keep a video as it is","tags":["Videos"],"description":"Answers a waiting price choice with no. Nothing starts and nothing is charged; the recording stays on the video.\n\nScope: write. A key with the write scope, on a paid plan.","x-scope":"write","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"production":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"template":{"type":"string"},"status":{"type":"string","enum":["waiting_for_footage","uploading","ready_to_edit","editing","checking","ready","failed","posting","posted","scheduled"],"description":"The plain state. state carries the detailed one."},"state":{"type":"string"},"publicationState":{"type":"string"},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"clips":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"anyOf":[{"type":"string"},{"type":"null"}]},"choice":{"anyOf":[{"type":"object","properties":{"engine":{"type":"string","enum":["fast_cut","deep","loop"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The new price."},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The price that was confirmed (0: none yet)."},"reason":{"type":"string"}},"required":["engine","credits","confirmed","reason"],"additionalProperties":false},{"type":"null"}],"description":"Set when an edit would cost more than the price confirmed: nothing was charged and nothing started. Answer with accept (at credits) or keep."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","template","status","state","publicationState","engine","clips","message","choice","createdAt","updatedAt"],"additionalProperties":false}},"required":["production"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/clips":{"get":{"operationId":"listClips","summary":"Clips and versions","tags":["Videos"],"description":"The finished clips of a video. Post one by its id.\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"clips":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The version id to post (for example c1-1)."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The clip key for look changes (c1, c2...). Quick cuts only."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"look":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","key","title","duration","previewUrl","thumbnailUrl","text","engine","look"],"additionalProperties":false}}},"required":["clips"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/clips/{key}/look":{"post":{"operationId":"rerenderClip","summary":"Change a clip's look","tags":["Videos"],"description":"Changes one quick-cut clip (layout, split screen, headline, energy, caption position) and renders just that clip again.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^c\\d{1,2}$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"framing":{"type":"string","enum":["fill","fit"]},"band":{"type":"string","enum":["solid","blur"]},"headline":{"type":"string","maxLength":80},"subline":{"type":"string","maxLength":90},"bottom":{"type":"string","enum":["captions","subline"]},"energy":{"type":"string","enum":["calm","standard","high","jumpcut","static"]},"captionY":{"anyOf":[{"type":"number","minimum":0.1,"maximum":0.82},{"type":"null"}]},"split":{"description":"The split screen layout: mode split puts b-roll in the top half and the speaker below, with the headline across the middle; null or mode full keeps the full frame.","anyOf":[{"type":"object","properties":{"mode":{"default":"full","type":"string","enum":["full","split"]},"headFor":{"default":null,"anyOf":[{"type":"number","minimum":1,"maximum":600},{"type":"null"}]},"pill":{"default":"","type":"string","maxLength":40,"pattern":"^[^<>{}\\\\]*$"},"moments":{"default":null,"anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^\\d{1,2}$"},"additionalProperties":{"type":"string","enum":["full","split"]}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"clip":{"type":"object","properties":{"id":{"type":"string","description":"The version id to post (for example c1-1)."},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The clip key for look changes (c1, c2...). Quick cuts only."},"title":{"anyOf":[{"type":"string"},{"type":"null"}]},"duration":{"anyOf":[{"type":"number"},{"type":"null"}]},"previewUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"thumbnailUrl":{"anyOf":[{"type":"string"},{"type":"null"}]},"text":{"anyOf":[{"type":"string"},{"type":"null"}]},"engine":{"anyOf":[{"type":"string"},{"type":"null"}]},"look":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["id","key","title","duration","previewUrl","thumbnailUrl","text","engine","look"],"additionalProperties":false},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["clip","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/writing/script":{"post":{"operationId":"writeScript","summary":"Write a script from an idea","tags":["Writing"],"description":"A recordable script (three hooks, body, call to action) written from an idea and this workspace's brand brain.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idea":{"type":"string","minLength":3,"maxLength":6000},"audience":{"type":"string","minLength":2,"maxLength":1000},"offer":{"type":"string","minLength":2,"maxLength":1000},"template":{"default":"talking_head","type":"string","enum":["talking_head","list","tier_ranking","challenge","broll"]},"purpose":{"default":"reach","type":"string","enum":["reach","connection","trust","conversion"]},"research":{"description":"Look up current facts first.","type":"boolean"},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["idea"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"script":{"type":"object","properties":{"title":{"type":"string"},"hooks":{"type":"array","items":{"type":"string"}},"body":{"type":"string"},"cta":{"type":"string"}},"required":["title","hooks","body","cta"],"additionalProperties":{}},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["script","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/writing/carousel":{"post":{"operationId":"makeCarousel","summary":"Write a carousel","tags":["Writing"],"description":"A carousel (title, caption, 2 to 10 slides) written from an idea and this workspace's brand brain.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"idea":{"type":"string","minLength":3,"maxLength":6000},"audience":{"type":"string","minLength":2,"maxLength":1000},"offer":{"type":"string","minLength":2,"maxLength":1000},"purpose":{"default":"reach","type":"string","enum":["reach","connection","trust","conversion"]},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["idea"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"carousel":{"type":"object","properties":{"title":{"type":"string"},"caption":{"type":"string"},"slides":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"body":{"type":"string"}},"required":["title","body"],"additionalProperties":{}}}},"required":["title","caption","slides"],"additionalProperties":{}},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["carousel","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/captions":{"post":{"operationId":"writeCaptions","summary":"Write captions per platform","tags":["Writing"],"description":"One caption per platform (and a YouTube title), written from what the video says. The first write for a video is free; rewrites are charged once per call.\n\nScope: write. A key with the write scope, on a paid plan. Paid: the answer says what it cost.","x-scope":"write","x-paid":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["instagram","facebook","tiktok","youtube","linkedin","twitter","threads","bluesky","pinterest","reddit","googlebusiness","snapchat","telegram","whatsapp","discord","slack"]}},"version":{"type":"string","minLength":1,"maxLength":200},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["platforms"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"captions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"caption":{"type":"string"},"title":{"type":"string"}},"required":["caption","title"],"additionalProperties":false}},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["captions","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/NoCredits"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/productions/{id}/posts":{"post":{"operationId":"publishPosts","summary":"Post now or schedule","tags":["Publishing"],"description":"Posts a finished video to chosen accounts, now or at set times, each post with its own caption and sound. A caption left out uses the one saved for that platform. Posting is free on every platform. A key made by a creator seat asks for approval instead of posting.\n\nScope: publish. A key with the publish scope, on a paid plan. From a creator seat, this asks for approval instead.","x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"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)$"}},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timing":{"type":"string","enum":["now","scheduled"]},"timezone":{"type":"string","maxLength":80},"posts":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"accountId":{"type":"string","minLength":1,"maxLength":100},"platform":{"type":"string","enum":["instagram","facebook","tiktok","youtube","linkedin","twitter","threads","bluesky","pinterest","reddit","googlebusiness","snapchat","telegram","whatsapp","discord","slack"]},"version":{"description":"A clip id from list clips. Left out: the chosen cut, else the first clip.","type":"string","minLength":1,"maxLength":200},"at":{"description":"When to post (scheduled only).","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)))$"},"caption":{"type":"string","maxLength":2200},"title":{"description":"YouTube title.","type":"string","maxLength":100},"delivery":{"description":"Instagram: public feed, trial reel, or trial that goes public if it performs.","type":"string","enum":["public","trial","trial_auto"]},"sound":{"description":"A sound for this post only.","anyOf":[{"type":"object","properties":{"kind":{"type":"string","const":"none"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"platform"},"platform":{"type":"string","enum":["instagram","tiktok"]},"id":{"type":"string","pattern":"^[0-9]{1,40}$"},"title":{"type":"string","minLength":1,"maxLength":160},"artist":{"type":"string","maxLength":160},"volume":{"type":"integer","minimum":0,"maximum":100},"videoVolume":{"type":"integer","minimum":0,"maximum":100}},"required":["kind","platform","id","title"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"mix"},"soundId":{"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)$"},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["kind","soundId","title"],"additionalProperties":false}]}},"required":["accountId","platform"],"additionalProperties":false}},"again":{"description":"Post again to an account this video is already posted or scheduled on. Left out: those posts are refused, so nothing goes out twice by accident.","type":"boolean"},"confirmCredits":{"description":"The price you agreed to, in credits. When sent it must equal the current quote, or nothing runs and the new price comes back.","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["timing","posts"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"platform":{"type":"string"},"accountId":{"type":"string"},"status":{"type":"string"},"scheduledFor":{"anyOf":[{"type":"string"},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"approvalId":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","platform","accountId","status","scheduledFor","error","approvalId"],"additionalProperties":false}},"approval":{"type":"boolean","description":"True when these posts wait for a manager or the owner to approve."},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Credits this call cost (a hold is released if the work fails)."},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["posts","approval","credits"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/posts":{"get":{"operationId":"listPosts","summary":"Posts","tags":["Publishing"],"description":"Scheduled and published posts, newest first.\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"parentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"platform":{"anyOf":[{"type":"string"},{"type":"null"}]},"accountId":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","description":"draft, scheduling, scheduled, publishing, published, failed or needs_attention."},"scheduledFor":{"anyOf":[{"type":"string"},{"type":"null"}]},"caption":{"anyOf":[{"type":"string"},{"type":"null"}]},"postUrl":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","parentId","platform","accountId","status","scheduledFor","caption","postUrl"],"additionalProperties":false}}},"required":["posts"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/automations":{"get":{"operationId":"listAutomations","summary":"Comment-to-DM automations","tags":["Automations"],"description":"Automations on this workspace's Instagram and Facebook accounts, with their counts.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"automations":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["automations"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}},"post":{"operationId":"createAutomation","summary":"Make a comment-to-DM automation","tags":["Automations"],"description":"When someone comments a keyword (or replies to a story), they get a DM with up to three link buttons, plus an optional public reply. Needs a manager or owner seat.\n\nScope: publish. A key with the publish scope, on a paid plan.","x-scope":"publish","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"accountId":{"type":"string","minLength":3,"maxLength":80},"trigger":{"type":"string","enum":["comment","story_reply"]},"platformPostId":{"description":"One post only. Left out: every post.","type":"string","maxLength":120},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"matchMode":{"type":"string","enum":["contains","word","exact"]},"alsoMatchInDms":{"type":"boolean"},"dmMessage":{"type":"string","minLength":2,"maxLength":640},"buttons":{"maxItems":3,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":20},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["title","url"],"additionalProperties":false}},"commentReplies":{"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"dmDelaySeconds":{"type":"integer","minimum":0,"maximum":3600}},"required":["name","accountId","dmMessage"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["automation"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/automations/{id}":{"patch":{"operationId":"setAutomation","summary":"Arm or pause an automation","tags":["Automations"],"description":"Turns an automation on (armed) or off. Needs a manager or owner seat.\n\nScope: publish. A key with the publish scope, on a paid plan.","x-scope":"publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-zA-Z0-9_-]{6,64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"}},"required":["active"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"automation":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["automation"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/analytics":{"get":{"operationId":"getAnalytics","summary":"Post and account results","tags":["Results"],"description":"Views, likes, comments, shares and saves for recent posts on this workspace's accounts. A number the platform did not report is null, never zero.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"retrievedAt":{"type":"string"},"totalPosts":{"anyOf":[{"type":"number"},{"type":"null"}]},"posts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["retrievedAt","totalPosts","posts"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/credits":{"get":{"operationId":"getCredits","summary":"Balance and prices","tags":["Credits"],"description":"The credit balance this workspace spends from, its monthly budget, the price of every job (a credit is a cent), and when the credits in the balance expire, soonest first. Plan credits expire at the next monthly grant, top-ups and bonuses 90 days after they land, free credits after 30 days without activity; the soonest to expire are spent first.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"monthlyBudget":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"prices":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"}},"required":["credits","label"],"additionalProperties":false}},"lots":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["plan","topup","free","bonus","legacy"]},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["source","credits","expiresAt"],"additionalProperties":false}}},"required":["balance","monthlyBudget","prices","lots"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/credits/quote":{"get":{"operationId":"quoteJob","summary":"Price a job","tags":["Credits"],"description":"What one job costs before you run it. For an edit of a recording you already uploaded, use the video's quote instead. A month plan is priced by its pieces (pieces, 30 when left out); a caption restyle and a graphics plan by the finished video's length past 10 minutes (sourceMinutes).\n\nScope: read. Any key.","x-scope":"read","parameters":[{"name":"job","in":"query","required":true,"schema":{"type":"string","enum":["written_post","video_script","carousel","clip","fast_cut","fast_cut_rerender","long_form","review_reply","month_plan","decode","ugc","ugc_frame","graphics","graphics_plan","caption_restyle"]}},{"name":"sourceMinutes","in":"query","required":false,"schema":{"description":"The recording's length for a deep edit, or the finished video's for a caption restyle or a graphics plan.","type":"number","minimum":0,"maximum":600},"description":"The recording's length for a deep edit, or the finished video's for a caption restyle or a graphics plan."},{"name":"pieces","in":"query","required":false,"schema":{"description":"A month plan: the pieces in the month (videos, Loops, carousels and posts).","type":"integer","minimum":1,"maximum":60},"description":"A month plan: the pieces in the month (videos, Loops, carousels and posts)."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"string"},"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"balance":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["job","credits","balance"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/offers":{"get":{"operationId":"listOffers","summary":"Offers","tags":["Content"],"description":"The confirmed offers written in Brand brain.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"offers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","description","updatedAt"],"additionalProperties":false}}},"required":["offers"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/guides":{"get":{"operationId":"listGuides","summary":"Guides","tags":["Content"],"description":"Published guides and their public links.\n\nScope: read. Any key.","x-scope":"read","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"guides":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"views":{"anyOf":[{"type":"number"},{"type":"null"}]},"publishedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","title","url","views","publishedAt"],"additionalProperties":false}}},"required":["guides"],"additionalProperties":false}}}},"400":{"$ref":"#/components/responses/Invalid"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/RateLimited"}}}},"/api/v1/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","tags":["Workspace"],"security":[],"description":"The OpenAPI 3.1 description of this API. No key needed.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"webhooks":{"production.ready":{"post":{"summary":"Video ready","description":"An edit finished and its clips are ready to review and post. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"production.failed":{"post":{"summary":"Video failed","description":"An edit stopped and needs attention. Any held credits were released. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"post.published":{"post":{"summary":"Post published","description":"A post went live on its platform. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"post.failed":{"post":{"summary":"Post failed","description":"A post could not go out, or its outcome needs checking. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"automation.dm_sent":{"post":{"summary":"Automation sent DMs","description":"A comment-to-DM automation sent new DMs since the last check (checked every few minutes). Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"credits.low":{"post":{"summary":"Credits low","description":"The balance dropped below the threshold set on the endpoint. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"lead.captured":{"post":{"summary":"New lead from a DM flow","description":"Someone started one of your DM flows: their name, handle, the flow and any answers so far. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}},"lead.updated":{"post":{"summary":"Lead answered or moved","description":"A lead tapped an answer in a DM flow, or you moved them to a new stage. Signed: verify the x-ntl-signature header (t=timestamp,v1=HMAC-SHA256 of \"timestamp.body\" with the endpoint secret).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"200":{"description":"Any 2xx answer marks the delivery done."}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A workspace key from Settings, Developer: Authorization: Bearer ntl_live_..."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Send the same value when retrying a POST. The first answer is returned again (for 24 hours) instead of doing, or charging for, the work twice."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Stable machine-readable code, for example insufficient_scope, insufficient_credits, price_changed, not_found, rate_limited."},"message":{"type":"string","description":"What happened, in plain words."},"hint":{"type":"string","description":"What to do next."},"credits":{"description":"The current price, on price_changed and confirmation errors.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["code","message","hint"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"WebhookEvent":{"type":"object","required":["id","type","created","workspace","data"],"properties":{"id":{"type":"string","description":"The event id. Deliveries of one event share it."},"type":{"type":"string","enum":["production.ready","production.failed","post.published","post.failed","automation.dm_sent","credits.low","lead.captured","lead.updated"]},"created":{"type":"string","format":"date-time"},"workspace":{"type":"string"},"test":{"type":"boolean"},"data":{"type":"object"}}}},"responses":{"Invalid":{"description":"The request did not validate. code: invalid_request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"No key, or the key is revoked. code: unauthorized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key lacks the scope, the seat cannot do this, or the plan reads only. code: insufficient_scope, seat_not_allowed or plan_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not in this workspace. code: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"The thing changed or is not ready, or the price changed. code: conflict, not_ready or price_changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NoCredits":{"description":"Not enough credits. code: insufficient_credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests. code: rate_limited. Wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}