File size: 1,914 Bytes
ff3e3e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
HTTP API Documentation

- Base URL: https://logicgoinfotechspaces-object-remover.hf.space
- Auth (optional): set API_TOKEN on server; send Authorization: Bearer <API_TOKEN>

Endpoints
- GET /health
- POST /upload-image (form-data: image=file) -> {"id":"<image_id>","filename":"..."}
- POST /upload-mask (form-data: mask=file) -> {"id":"<mask_id>","filename":"..."}
- POST /inpaint (JSON: { "image_id": "...", "mask_id": "..." }) -> returns image/png directly
- POST /inpaint-multipart (form-data: image, mask) -> {"result":"output_xxx.png"}
- GET /download/{filename} (only needed if you have a filename)

Curl examples

Health:
curl -H "Authorization: Bearer <API_TOKEN>" https://logicgoinfotechspaces-object-remover.hf.space/health

Upload image:
curl -H "Authorization: Bearer <API_TOKEN>" \
  -F image=@image.png \
  https://logicgoinfotechspaces-object-remover.hf.space/upload-image

Upload mask (PNG recommended):
curl -H "Authorization: Bearer <API_TOKEN>" \
  -F mask=@mask.png \
  https://logicgoinfotechspaces-object-remover.hf.space/upload-mask

Inpaint (IDs) — returns image directly:
curl -H "Authorization: Bearer <API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"image_id":"<image_id>","mask_id":"<mask_id>"}' \
  https://logicgoinfotechspaces-object-remover.hf.space/inpaint \
  -o result.png

Inpaint (multipart) — returns filename:
curl -H "Authorization: Bearer <API_TOKEN>" \
  -F image=@image.png \
  -F mask=@mask.png \
  https://logicgoinfotechspaces-object-remover.hf.space/inpaint-multipart

Download (only if you have a filename):
curl -H "Authorization: Bearer <API_TOKEN>" \
  -L https://logicgoinfotechspaces-object-remover.hf.space/download/output_xxx.png \
  -o result.png

Notes
- For masks: RGBA with alpha=0 = remove; otherwise any pixel > 0 = remove.
- 404 Not Found on /inpaint usually means the server restarted and IDs expired — re-upload to get fresh IDs.