{"name":"cf-media-worker","status":"ok","service":"cf-media-worker","note":"All endpoints share the same external auth (bearer / X-API-Key / signed). Internal callbacks at /jobs/:id/callback require X-Internal-Key.","auth":{"bearer":"Authorization: Bearer <API_TOKEN>","apiKey":"X-API-Key: <API_TOKEN>","signed":["x-rmbg-timestamp: <unix-seconds>","x-rmbg-signature: <hex hmac sha256 of timestamp + method + path + body>"]},"endpoints":{"health":"GET /health","image":{"removeBackground":{"method":"POST /remove-background","body":{"sourceUrl":"https://example.com/product.png","sourceR2Key":"uploads/input.png","outputR2Key":"outputs/input-rmbg.png","format":"image/png","quality":90},"note":"Provide exactly one of sourceUrl or sourceR2Key. If outputR2Key is omitted, the Worker streams the transformed image back."},"inpaint":{"method":"POST /inpaint","body":{"sourceUrl":"https://example.com/photo.png","sourceR2Key":"uploads/photo.png","mask":[0,255,0,255],"prompt":"a blue sky","outputR2Key":"outputs/inpainted.png","format":"image/png","quality":90}},"generate":{"method":"POST /generate","body":{"prompt":"a photo of a cat sitting on a couch","model":"flux-1-schnell","width":1024,"height":1024,"steps":4,"guidance":3.5,"outputR2Key":"outputs/generated.png"}},"img2img":{"method":"POST /img2img","body":{"sourceUrl":"https://example.com/photo.png","sourceR2Key":"uploads/photo.png","prompt":"a photo of a cat in a forest","strength":0.75,"outputR2Key":"outputs/img2img.png","format":"image/png","quality":90}},"detectObjects":{"method":"POST /detect-objects","body":{"sourceUrl":"https://example.com/photo.png","sourceR2Key":"uploads/photo.png"}},"edit":{"method":"POST /edit","body":{"sourceUrl":"https://example.com/photo.png","sourceR2Key":"uploads/photo.png","maskUrl":"https://example.com/mask.png","maskR2Key":"uploads/mask.png","ref2Url":"https://example.com/ref2.png","ref3Url":"https://example.com/ref3.png","prompt":"remove the area marked in image 1 from image 0","outputR2Key":"outputs/edited.png"}},"upload":{"method":"POST /upload","contentType":"image/* or multipart/form-data"},"queryModeExample":"/remove-background?url=https://example.com/product.png&format=image/webp"},"video":{"tasks":"GET /tasks","process":"POST /process/:task","pipeline":"POST /pipeline","jobs":"POST /jobs","jobStatus":"GET /jobs/:id","jobCallback":"POST /jobs/:id/callback","files":"GET /files/:key","tasksAvailable":["getVideoInfo","getVideoDuration","getImageInfo","addWatermarkToVideo","addWatermarkToImage","extractThumbnail","convertFormat"]}}}