Detect objects
This endpoint doesn't just say what's in a photo — it draws a box around each object and hands you the coordinates. If your workflow needs to count, crop, blur or measure something inside an image, bounding boxes are the piece that makes it possible.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
Why location matters, not just presence
Knowing a photo 'contains a car' is often not enough — you need to know where the car is, how big it is relative to the frame, and whether there's more than one. That's the gap between classification and detection: a warehouse camera counting boxes on a shelf, a retail app measuring shelf space, or a redaction tool blurring faces all need coordinates, not just a yes/no answer. image.detect_objects returns exactly that — a bounding box, a label and a confidence score for every object it finds.
What the response looks like
POST to /image/detect-objects with an image and get back a list of detections, each one a rectangle (defined by its corner coordinates) paired with the object label inside it and a confidence score. A single photo can return zero, one or dozens of detections depending on what's actually in the frame — a street scene might return pedestrians, vehicles and signage all in one pass.
From a research problem to a routine API call
Locating multiple objects within a single image, rather than labeling the image as a whole, was for years a much harder computer-vision problem than simple classification — it required models built specifically to propose and score regions of an image, not just describe it. That complexity is now behind a single asynchronous endpoint: submit the image, get a task_id back immediately, and receive the detections once processing finishes, without operating any detection model yourself.
Built for pipelines, not single lookups
Because detection work varies wildly in how long it takes depending on image complexity, every request is async: it queues, processes, and delivers by webhook the moment it's done, or through a signed link you can fetch for 24 hours. That means a batch of ten thousand warehouse photos and a single spot-check both use the same call, just at different volumes.
Where it plugs in
Detection is often step one of a bigger job: crop each bounding box to feed into image.classify for a finer-grained label, blur the boxes returned around faces or plates for privacy, or count detections per frame for inventory and crowd-density use cases. Pricing is a small base fee per request plus a per-image rate, both published up front, and a request that fails after three automatic retries is never charged — only a clear error comes back.
What you can do with it
Inventory and shelf monitoring
Count and locate products on shelf-camera images to flag out-of-stock sections without a person walking the aisle.
Privacy and redaction pipelines
Detect faces or license plates and use their bounding boxes to automatically blur them before publishing an image.
Security and access footage review
Locate people or vehicles in still frames pulled from camera feeds to speed up manual review of flagged events.
Automated cropping and thumbnails
Use the returned bounding boxes to crop tight, subject-centered thumbnails from product or listing photos automatically.
FAQ
What does the object detection API return exactly?
A list of detections, each with a bounding box, an object label and a confidence score, for every object found in the image.
How many objects can be detected in one image?
As many as the image actually contains — from zero to dozens — since each detection is returned independently rather than a single fixed count.
Is bounding box detection free?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How is object detection priced?
A small per-request base fee plus a per-image rate, both published on this page — no tokens or hidden credits.
Can I run object detection on a large batch of images?
Yes, each image is submitted as its own async task, so you can queue large batches and collect results by webhook as they finish.
What format are the bounding box coordinates in?
Each detection includes corner coordinates for its rectangle along with the label and confidence, ready to use for cropping, blurring or measuring.
How is detection different from classification?
Classification assigns one label to the whole image; detection locates and labels every individual object within it, with a box for each.
What happens if a detection request fails?
It's retried automatically up to three times; if it still fails you get a clear error and pay nothing for that request.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/image/detect-objects \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"image":"https://ejemplo.com/imagen.jpg"}'const res = await fetch("https://api.kit.forhosting.com/image/detect-objects", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"image": "https://ejemplo.com/imagen.jpg"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/detect-objects",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"image": "https://ejemplo.com/imagen.jpg"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/detect-objects", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"image":"https://ejemplo.com/imagen.jpg"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"image":"https://ejemplo.com/imagen.jpg"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/detect-objects", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"image": "https://ejemplo.com/imagen.jpg"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "image.detect_objects",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 15 |
max_megapixels | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
422 | task_failed | The task failed after 3 retries. You are never charged for it. |