{"openapi":"3.0.3","info":{"title":"DeepAny API","version":"1","description":"Image, image edit, inpaint, face swap and video generation. Docs: https://deepany.ai/api/ · Terms: https://deepany.ai/api-terms/","termsOfService":"https://deepany.ai/api-terms/"},"servers":[{"url":"https://api.deepany.ai/api/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"dak_... key from https://deepany.ai/profile/ (never in the URL)"}},"schemas":{"Job":{"type":"object","properties":{"id":{"type":"string","example":"job_k3x9m2p7q1r8s4t6u0v5"},"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled","expired"]},"progress":{"type":"number","nullable":true},"queue_position":{"type":"integer","nullable":true},"credits":{"type":"integer"},"usd":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time","nullable":true},"result_url":{"type":"string","nullable":true},"callback_url":{"type":"string","nullable":true},"replayed":{"type":"boolean","description":"Present when an Idempotency-Key matched an earlier job."}}},"JobRequest":{"type":"object","required":["service"],"properties":{"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"prompt":{"type":"string","maxLength":20000},"negative_prompt":{"type":"string","maxLength":20000},"style":{"type":"string","enum":["standard","anime"],"description":"image, inpaint. Image: standard 1, anime 2 (high quality 3) credits."},"quality":{"type":"string","description":"image: low|medium|high (default high). image-edit: standard (1) | detail (2 credits)."},"aspect_ratio":{"type":"string","description":"image, image-edit: 1:1|16:9|9:16|4:3|3:2. video: 1:1|2:3|3:2|3:4|4:3|9:16|16:9|21:9."},"seed":{"type":"integer","description":"image, video; video accepts -1 for random"},"duration":{"type":"integer","minimum":5,"maximum":15,"description":"video seconds, default 5"},"resolution":{"type":"string","enum":["480p","540p","640p","720p","960p","1080p"],"description":"video; credits per second: 480p 2, 540p 2, 640p 3, 720p 4, 960p 6, 1080p 8"},"mask_prompt":{"type":"string","description":"inpaint: what to repaint when no mask file is sent"},"callback_url":{"type":"string","format":"uri","description":"https, public host, port 443; signed webhook on job.completed/failed/cancelled/expired and balance.low"},"image":{"type":"string","format":"binary","description":"image-edit, inpaint, face-swap, video (optional start frame); PNG, JPEG or WebP up to 25 MB (face swap: PNG)"},"mask":{"type":"string","format":"binary","description":"inpaint: PNG, white = repaint"},"face":{"type":"string","format":"binary","description":"face-swap: the face photo, PNG"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}},"security":[{"apiKey":[]}],"paths":{"/jobs":{"post":{"summary":"Create a job","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":128},"description":"Repeat a request safely: the same key on the same API key returns the first job instead of starting another."}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["service"],"properties":{"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"prompt":{"type":"string","maxLength":20000},"negative_prompt":{"type":"string","maxLength":20000},"style":{"type":"string","enum":["standard","anime"],"description":"image, inpaint. Image: standard 1, anime 2 (high quality 3) credits."},"quality":{"type":"string","description":"image: low|medium|high (default high). image-edit: standard (1) | detail (2 credits)."},"aspect_ratio":{"type":"string","description":"image, image-edit: 1:1|16:9|9:16|4:3|3:2. video: 1:1|2:3|3:2|3:4|4:3|9:16|16:9|21:9."},"seed":{"type":"integer","description":"image, video; video accepts -1 for random"},"duration":{"type":"integer","minimum":5,"maximum":15,"description":"video seconds, default 5"},"resolution":{"type":"string","enum":["480p","540p","640p","720p","960p","1080p"],"description":"video; credits per second: 480p 2, 540p 2, 640p 3, 720p 4, 960p 6, 1080p 8"},"mask_prompt":{"type":"string","description":"inpaint: what to repaint when no mask file is sent"},"callback_url":{"type":"string","format":"uri","description":"https, public host, port 443; signed webhook on job.completed/failed/cancelled/expired and balance.low"},"image":{"type":"string","format":"binary","description":"image-edit, inpaint, face-swap, video (optional start frame); PNG, JPEG or WebP up to 25 MB (face swap: PNG)"},"mask":{"type":"string","format":"binary","description":"inpaint: PNG, white = repaint"},"face":{"type":"string","format":"binary","description":"face-swap: the face photo, PNG"}}}},"application/json":{"schema":{"type":"object","required":["service"],"properties":{"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"prompt":{"type":"string","maxLength":20000},"negative_prompt":{"type":"string","maxLength":20000},"style":{"type":"string","enum":["standard","anime"],"description":"image, inpaint. Image: standard 1, anime 2 (high quality 3) credits."},"quality":{"type":"string","description":"image: low|medium|high (default high). image-edit: standard (1) | detail (2 credits)."},"aspect_ratio":{"type":"string","description":"image, image-edit: 1:1|16:9|9:16|4:3|3:2. video: 1:1|2:3|3:2|3:4|4:3|9:16|16:9|21:9."},"seed":{"type":"integer","description":"image, video; video accepts -1 for random"},"duration":{"type":"integer","minimum":5,"maximum":15,"description":"video seconds, default 5"},"resolution":{"type":"string","enum":["480p","540p","640p","720p","960p","1080p"],"description":"video; credits per second: 480p 2, 540p 2, 640p 3, 720p 4, 960p 6, 1080p 8"},"mask_prompt":{"type":"string","description":"inpaint: what to repaint when no mask file is sent"},"callback_url":{"type":"string","format":"uri","description":"https, public host, port 443; signed webhook on job.completed/failed/cancelled/expired and balance.low"},"image":{"type":"string","format":"binary","description":"image-edit, inpaint, face-swap, video (optional start frame); PNG, JPEG or WebP up to 25 MB (face swap: PNG)"},"mask":{"type":"string","format":"binary","description":"inpaint: PNG, white = repaint"},"face":{"type":"string","format":"binary","description":"face-swap: the face photo, PNG"}}}}}},"responses":{"200":{"description":"The queued job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"job_k3x9m2p7q1r8s4t6u0v5"},"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled","expired"]},"progress":{"type":"number","nullable":true},"queue_position":{"type":"integer","nullable":true},"credits":{"type":"integer"},"usd":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time","nullable":true},"result_url":{"type":"string","nullable":true},"callback_url":{"type":"string","nullable":true},"replayed":{"type":"boolean","description":"Present when an Idempotency-Key matched an earlier job."}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Missing or bad key"},"402":{"description":"Not enough API credits on this key"},"429":{"description":"Rate limit (60 starts per 10 min, 600 reads per min)"},"503":{"description":"No worker free right now; retry shortly"}}},"get":{"summary":"Recent jobs","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","default":50,"maximum":200}}],"responses":{"200":{"description":"Jobs","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"job_k3x9m2p7q1r8s4t6u0v5"},"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled","expired"]},"progress":{"type":"number","nullable":true},"queue_position":{"type":"integer","nullable":true},"credits":{"type":"integer"},"usd":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time","nullable":true},"result_url":{"type":"string","nullable":true},"callback_url":{"type":"string","nullable":true},"replayed":{"type":"boolean","description":"Present when an Idempotency-Key matched an earlier job."}}}}}}}}}}}},"/jobs/{id}":{"get":{"summary":"Job status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"job_k3x9m2p7q1r8s4t6u0v5"},"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled","expired"]},"progress":{"type":"number","nullable":true},"queue_position":{"type":"integer","nullable":true},"credits":{"type":"integer"},"usd":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time","nullable":true},"result_url":{"type":"string","nullable":true},"callback_url":{"type":"string","nullable":true},"replayed":{"type":"boolean","description":"Present when an Idempotency-Key matched an earlier job."}}}}}},"404":{"description":"Unknown job"}}}},"/jobs/{id}/result":{"get":{"summary":"Download the result","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"PNG or MP4","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"409":{"description":"Not completed yet"}}}},"/jobs/{id}/cancel":{"post":{"summary":"Cancel a job","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"job_k3x9m2p7q1r8s4t6u0v5"},"service":{"type":"string","enum":["image","image-edit","inpaint","video","face-swap"]},"status":{"type":"string","enum":["queued","processing","completed","failed","cancelled","expired"]},"progress":{"type":"number","nullable":true},"queue_position":{"type":"integer","nullable":true},"credits":{"type":"integer"},"usd":{"type":"number"},"error":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"},"finished_at":{"type":"string","format":"date-time","nullable":true},"result_url":{"type":"string","nullable":true},"callback_url":{"type":"string","nullable":true},"replayed":{"type":"boolean","description":"Present when an Idempotency-Key matched an earlier job."}}}}}}}}},"/me":{"get":{"summary":"This key: label, scope, balance","responses":{"200":{"description":"Key"}}}}},"x-pricing":{"usd_per_credit":0.1,"credits":{"image":1,"image-anime":2,"image-anime-high":3,"image-edit":1,"image-edit-detail":2,"inpaint":2,"face-swap":2,"video-480p":2,"video-540p":2,"video-640p":3,"video-720p":4,"video-960p":6,"video-1080p":8},"webhooks":{"signature":"X-DeepAny-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(webhook_secret, t + \".\" + body)>","events":["job.completed","job.failed","job.cancelled","job.expired","balance.low"]}}}