curl "https://api.hooked.so/v1/image/media_abc123" \
-H "x-api-key: your_api_key_here"
const response = await fetch('https://api.hooked.so/v1/image/media_abc123', {
headers: { 'x-api-key': 'your_api_key_here' }
});
const { data } = await response.json();
if (data.backgroundRemoval.status === 'COMPLETED') console.log(data.backgroundRemoval.url);
{
"success": true,
"message": "Image details fetched successfully",
"data": {
"id": "media_abc123",
"name": "portrait.jpg",
"status": "COMPLETED",
"url": "https://.../portrait.jpg",
"aspectRatio": null,
"backgroundRemoval": {
"status": "COMPLETED",
"url": "https://.../media_abc123-1726560000000.png"
},
"usedCredits": 0.5,
"createdAt": "2026-09-17T10:00:00.000Z",
"updatedAt": "2026-09-17T10:00:12.000Z"
}
}
Images
Get Image
An image of your library and how its background removal or expansion went
GET
/
v1
/
image
/
{mediaId}
curl "https://api.hooked.so/v1/image/media_abc123" \
-H "x-api-key: your_api_key_here"
const response = await fetch('https://api.hooked.so/v1/image/media_abc123', {
headers: { 'x-api-key': 'your_api_key_here' }
});
const { data } = await response.json();
if (data.backgroundRemoval.status === 'COMPLETED') console.log(data.backgroundRemoval.url);
{
"success": true,
"message": "Image details fetched successfully",
"data": {
"id": "media_abc123",
"name": "portrait.jpg",
"status": "COMPLETED",
"url": "https://.../portrait.jpg",
"aspectRatio": null,
"backgroundRemoval": {
"status": "COMPLETED",
"url": "https://.../media_abc123-1726560000000.png"
},
"usedCredits": 0.5,
"createdAt": "2026-09-17T10:00:00.000Z",
"updatedAt": "2026-09-17T10:00:12.000Z"
}
}
Overview
Returns an image of your library with the state of the edits started on it: the image itself (status is PROCESSING while an expansion paints it) and its background removal (backgroundRemoval.status). Poll it after Remove Image Background or Expand Image until the state you wait for is COMPLETED.
Path Parameters
string
required
The library image, as returned by the endpoint that started the edit.
curl "https://api.hooked.so/v1/image/media_abc123" \
-H "x-api-key: your_api_key_here"
const response = await fetch('https://api.hooked.so/v1/image/media_abc123', {
headers: { 'x-api-key': 'your_api_key_here' }
});
const { data } = await response.json();
if (data.backgroundRemoval.status === 'COMPLETED') console.log(data.backgroundRemoval.url);
{
"success": true,
"message": "Image details fetched successfully",
"data": {
"id": "media_abc123",
"name": "portrait.jpg",
"status": "COMPLETED",
"url": "https://.../portrait.jpg",
"aspectRatio": null,
"backgroundRemoval": {
"status": "COMPLETED",
"url": "https://.../media_abc123-1726560000000.png"
},
"usedCredits": 0.5,
"createdAt": "2026-09-17T10:00:00.000Z",
"updatedAt": "2026-09-17T10:00:12.000Z"
}
}
Response Fields
string
PROCESSING, COMPLETED or FAILED — the image itself. Pending while an expansion is being painted.string
Signed URL of the image;
null while it is still being made.object
status is NONE, PROCESSING, COMPLETED or FAILED; url is the signed PNG with transparency when COMPLETED.Status Codes
| Status | Code | Description |
|---|---|---|
| Success | 200 | Image found |
| Unauthorized | 401 | Missing or invalid API key |
| Not found | 404 | No such image in your library |