{"openapi":"3.1.0","info":{"title":"Asynpulse API","version":"1.0.0","description":"Break down video ads second by second, write shooting plans for your own product and get prompts for AI video tools. A breakdown spends your workspace's credits by the ad's length (20 plus 2.5 a second), the same as on the website. Errors are JSON: {error: {code, message}}. Any route can answer 401 (no key, or a revoked one), 402 (not enough credits, or the plan does not include the API), 404, 409 (the breakdown is not finished yet), 429 (more than 120 requests a minute with one key) and 500. An upload can answer 413 (file too large) and 415 (not MP4, MOV or WebM); the PDF route 503 when PDF export is unavailable."},"servers":[{"url":"https://app.asynpulse.com/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"An API key from /app/api-keys: ap_live_…"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"Breakdown":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["analyzing","ready","failed"]},"progress":{"type":["integer","null"],"description":"0 to 100 while analyzing."},"stage":{"type":["string","null"]},"error":{"type":["string","null"]},"credits":{"type":"integer","description":"Credits charged (held while it runs; 0 when it failed)."},"platform":{"type":"string"},"link":{"type":["string","null"]},"createdAt":{"type":"string","format":"date-time"},"webUrl":{"type":"string","description":"The report in the browser."},"videoUrl":{"type":["string","null"],"description":"Signed for a day."},"breakdown":{"type":["object","null"],"description":"The full analysis once ready: takeaway, measured (shots, format, sound), speech, screenText, roles, moments, keyMoments, hook, sellingPoints, offers, checklist, why, borrow, avoid."},"plans":{"type":"array","items":{"type":"object"}}}}}},"paths":{"/breakdowns":{"get":{"summary":"List breakdowns","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}}],"responses":{"200":{"description":"Newest first, without the full analysis."},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"summary":"Start a breakdown","description":"From a link (JSON) or an uploaded video (multipart). Returns 202 while it runs; poll GET /breakdowns/{id}, or pass wait (seconds, up to 55).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","rights_confirmed"],"properties":{"url":{"type":"string"},"name":{"type":"string"},"rights_confirmed":{"type":"boolean","description":"The ad is public, or you may analyze it."},"wait":{"type":"integer","maximum":55}}}},"multipart/form-data":{"schema":{"type":"object","required":["file","rights_confirmed"],"properties":{"file":{"type":"string","format":"binary","description":"MP4, MOV or WebM, up to 200 MB."},"name":{"type":"string"},"rights_confirmed":{"type":"string","enum":["true"]},"wait":{"type":"integer"}}}}}},"responses":{"200":{"description":"Done, or already broken down by this workspace (existing: true).","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Breakdown"},"existing":{"type":"boolean"}}}}}},"202":{"description":"Started."},"400":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Not enough credits, or no paid plan."}}}},"/breakdowns/{id}":{"get":{"summary":"Get a breakdown","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"adt_vsyj2115z58hxo1k"},{"name":"wait","in":"query","schema":{"type":"integer","maximum":55}}],"responses":{"200":{"description":"The breakdown.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Breakdown"}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/breakdowns/{id}/plans":{"post":{"summary":"Write a shooting plan for your product","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"adt_vsyj2115z58hxo1k"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["product_name"],"properties":{"product_name":{"type":"string"},"description":{"type":"string"},"scope":{"type":"string","enum":["structure","hook","moment"],"default":"structure"},"moment_id":{"type":"string"}}}}}},"responses":{"201":{"description":"The plan (with a video prompt per shot) and the same plan as text."},"409":{"description":"Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/breakdowns/{id}/prompts":{"get":{"summary":"Video prompts per moment","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"adt_vsyj2115z58hxo1k"},{"name":"format","in":"query","schema":{"type":"string","enum":["json","text"]}}],"responses":{"200":{"description":"Prompts with the negative prompt; text to paste with format=text."}}}},"/breakdowns/{id}/pdf":{"get":{"summary":"Download a PDF","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"adt_vsyj2115z58hxo1k"},{"name":"doc","in":"query","schema":{"type":"string","enum":["brief","plan"]}},{"name":"plan","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"application/pdf"}}}},"/usage":{"get":{"summary":"Credits left","responses":{"200":{"description":"credits, planCredits, packCredits, resetsAt and the pricing rule."}}}}}}