Find and box people, cars, dogs and 77 other kinds of object in any image.
Object Detector finds the objects in an image, from people, cars and traffic lights to dogs, laptops and cups, and returns each one's label, a numeric confidence and its bounding box in pixels and as fractions of the image, plus a count per label. Filter by minimum confidence or by the labels you care about.
Try it — live request, no key required
No key required to try it. Get a key to use it in your app.
{
"status": "ok",
"error": null,
"data": {
"imageWidth": 640,
"imageHeight": 480,
"objectCount": 5,
"counts": {
"cat": 2,
"remote": 2,
"couch": 1
},
"objects": [
{
"label": "cat",
"confidence": 0.999,
"box": {
"x": 4,
"y": 51,
"width": 320,
"height": 417
},
"normalizedBox": {
"x": 0.0063,
"y": 0.1062,
"width": 0.5,
"height": 0.8688
}
},
{
"label": "cat",
"confidence": 0.9987,
"box": {
"x": 331,
"y": 20,
"width": 309,
"height": 350
},
"normalizedBox": {
"x": 0.5172,
"y": 0.0417,
"width": 0.4828,
"height": 0.7292
}
},
{
"label": "remote",
"confidence": 0.9984,
"box": {
"x": 329,
"y": 67,
"width": 42,
"height": 128
},
"normalizedBox": {
"x": 0.5141,
"y": 0.1396,
"width": 0.0656,
"height": 0.2667
}
},
{
"label": "remote",
"confidence": 0.9975,
"box": {
"x": 29,
"y": 68,
"width": 160,
"height": 50
},
"normalizedBox": {
"x": 0.0453,
"y": 0.1417,
"width": 0.25,
"height": 0.1042
}
},
{
"label": "couch",
"confidence": 0.9961,
"box": {
"x": 0,
"y": 0,
"width": 636,
"height": 472
},
"normalizedBox": {
"x": 0,
"y": 0,
"width": 0.9938,
"height": 0.9833
}
}
],
"minConfidence": 0.5,
"labels": null
}
}
About the Object Detector API
Detection runs DETR ResNet-50, an object detection model from Meta AI trained on the COCO dataset's 80 everyday object classes and released under the Apache 2.0 licence. APIVerve runs it on its own servers, so images are never sent to a third-party AI provider, and photos are turned upright from their EXIF orientation before detection so boxes match the image as it is displayed.
Each object has a confidence from 0 to 1, a pixel box (x, y, width, height from the top-left corner) and the same box as fractions of the image width and height, so you can draw it at any display size. counts gives the number of each label found, ready for inventory, traffic or occupancy counts.
How it works
Detection uses DETR (DEtection TRansformer) with a ResNet-50 backbone, trained by Meta AI on COCO 2017 and released under Apache 2.0, run as an 8-bit quantized ONNX model on APIVerve's servers. The image is decoded, turned upright from its EXIF orientation and, if larger, scaled so its longer side is at most 1,333 pixels, which is the most the model reads. DETR predicts 100 candidate objects per image directly, with no anchor boxes or non-maximum suppression; candidates below minConfidence are dropped and the rest are mapped back to the original image size.
confidence is the model's class probability, 0 to 1, rounded to 4 places. box is in pixels of the upright image: x and y are the top-left corner, measured from the top-left of the image. normalizedBox divides those by imageWidth and imageHeight. Objects are sorted by confidence, and counts tallies the returned objects by label, after the labels filter.
labels accepts the 80 COCO class names (traffic light, cell phone, dining table and so on), case-insensitive, with underscores or hyphens for spaces, simple plurals and common synonyms (sofa, television, phone, bike, motorbike, fridge). An unknown label returns 400 naming it. URLs are downloaded by APIVerve from public hosts only, with a 10 MB limit; the image service never fetches caller URLs itself.
What people use it for
- Counting and Occupancy
- Count people, cars or bicycles in camera snapshots to measure footfall, parking use or traffic.
- Image Tagging
- Tag uploaded photos with the objects they contain so they can be searched and filtered in a media library.
- Content Checks
- Confirm that listing photos actually show the item for sale, such as a car, bicycle or couch, before they are published.
- Smart Cropping
- Crop images around the main subject using its bounding box instead of the centre of the frame.
Ways to call it
One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.
- JSON
- Default REST response
- XML
- Markup format
- YAML
- Human-readable
- CSV
- Tabular export
- GraphQL
- Query language
- MCP
- For AI agents
Other ways to use Object Detector
Same data, same APIVerve account, same credit balance — one key works on all of them.
Which objects can it detect?
How do I read the bounding boxes?
Can I look for only some kinds of object?
Which model is used, and where does my image go?
How much does a detection cost?
Request parameters — POST /v1/objectdetector
Sent as JSON in the request body. Premium parameters are accepted on every plan but only take effect on plans that include them. Anything not listed here is dropped rather than passed through.
Optional
| Parameter | Type | Example | Description |
|---|---|---|---|
imageOptional | string | The image file to analyse (JPG, PNG, GIF or WebP, up to 10 MB), or a public image URL | |
minConfidenceOptional | number | 0.5 | Lowest confidence to return, from 0.05 to 1 default 0.5 · range 0.05-1 |
labelsOptionalPremium | string | person,car | Comma-separated object labels to keep, such as person,car,dog; all 80 labels when omitted length 0-500 |
curl -X POST "https://api.apiverve.com/v1/objectdetector" \
-H "x-api-key: YOUR_API_KEY" \
-F "image=@photo.jpg" \
-F "minConfidence=0.5" \
-F "labels=person,car"Authentication
Send your key in the x-api-key header. That is the only auth step — no token exchange, and no per-endpoint scope to configure.
| Header | When | Value |
|---|---|---|
x-api-keyRequired | Every request | Your API key. Header names are case-insensitive, so X-API-Key is the same header. |
AuthorizationAlternate | Instead of the above | Bearer <key> — for clients that only expose bearer auth. Resolves to the same account and the same billing. |
content-typeRequired | POST body | application/json |
A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.
Response — POST /v1/objectdetector
Every APIVerve endpoint returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape.
{
"status": "ok",
"error": null,
"data": {
"imageWidth": 640,
"imageHeight": 480,
"objectCount": 5,
"counts": {
"cat": 2,
"remote": 2,
"couch": 1
},
"objects": [
{
"label": "cat",
"confidence": 0.999,
"box": {
"x": 4,
"y": 51,
"width": 320,
"height": 417
},
"normalizedBox": {
"x": 0.0063,
"y": 0.1062,
"width": 0.5,
"height": 0.8688
}
},
{
"label": "cat",
"confidence": 0.9987,
"box": {
"x": 331,
"y": 20,
"width": 309,
"height": 350
},
"normalizedBox": {
"x": 0.5172,
"y": 0.0417,
"width": 0.4828,
"height": 0.7292
}
},
{
"label": "remote",
"confidence": 0.9984,
"box": {
"x": 329,
"y": 67,
"width": 42,
"height": 128
},
"normalizedBox": {
"x": 0.5141,
"y": 0.1396,
"width": 0.0656,
"height": 0.2667
}
},
{
"label": "remote",
"confidence": 0.9975,
"box": {
"x": 29,
"y": 68,
"width": 160,
"height": 50
},
"normalizedBox": {
"x": 0.0453,
"y": 0.1417,
"width": 0.25,
"height": 0.1042
}
},
{
"label": "couch",
"confidence": 0.9961,
"box": {
"x": 0,
"y": 0,
"width": 636,
"height": 472
},
"normalizedBox": {
"x": 0,
"y": 0,
"width": 0.9938,
"height": 0.9833
}
}
],
"minConfidence": 0.5,
"labels": null
}
}
Response fields
Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.
| Field | Type | Example | Description |
|---|---|---|---|
imageWidth | number | 640 | Width of the upright image in pixels |
imageHeight | number | 480 | Height of the upright image in pixels |
objectCount | number | 5 | Number of objects returned |
counts | object | {...} | Number of objects per label, such as {"car": 3} |
cat | number | 2 | |
remote | number | 2 | |
couch | number | 1 | |
objects | array[5] | Detected objects, highest confidence first | |
label | string | "cat" | Object class, one of the 80 COCO labels |
confidence | number | 0.999 | Model confidence from 0 to 1 |
box | object | {...} | Bounding box in pixels: x, y (top-left), width, height |
x | number | 4 | Left edge in pixels |
y | number | 51 | Top edge in pixels |
width | number | 320 | Box width in pixels |
height | number | 417 | Box height in pixels |
normalizedBox | object | {...} | The same box as fractions (0-1) of image width and height |
xPremium | number | 0.0063 | Left edge as a fraction of image width |
yPremium | number | 0.1062 | Top edge as a fraction of image height |
widthPremium | number | 0.5 | Box width as a fraction of image width |
heightPremium | number | 0.8688 | Box height as a fraction of image height |
minConfidence | number | 0.5 | Confidence threshold applied |
labels | object | null | Labels the results were filtered to, or null for all |
Response headers
Every response carries your balance, so your own code always knows where it stands without polling anything. All four are exposed to browsers through CORS.
| Header | What it carries |
|---|---|
x-api-remaining-credits | Credits left in the current cycle |
x-api-credits-used | Credits spent in the current cycle |
x-api-max-credits | The allowance for the cycle |
x-api-version | Version of the endpoint that answered |
Errors
Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change.
| Status | Meaning | What to do |
|---|---|---|
400 | Input was rejected | Read error; it names the parameter that has to change. |
401 | Key missing or invalid | Check the header name and the key value. |
403 | Key valid, but not permitted here | A key restriction or an IP allow-list — never a bad key. |
429 | Rate limited, or out of credits | Read error to tell them apart, then back off or top up. |
What a call costs — 10 credits per call
Credits are shared across every APIVerve API — one balance, one key, one bill. Failed requests never count against it, so a rejected input costs nothing.
| Plan | Per month | Credits | Object Detector calls | Per 1,000 calls |
|---|---|---|---|---|
| Free | Free | 200 | 20 | Free |
| Starter | $29.99 | 200,000 | 20,000 | $1.50 |
| Pro | $99.99 | 1,000,000 | 100,000 | $1.00 |
| Mega | $299.99 | 4,000,000 | 400,000 | $0.75 |
Calls are what the credits buy at this API's rate — spend them here, on any of the other APIs, or across both. Nothing is reserved per endpoint.
Call it from cURL — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
curl "https://api.apiverve.com/v1/objectdetector" \
-H "x-api-key: YOUR_API_KEY"Resources
Call it from Node.js — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
const res = await fetch("https://api.apiverve.com/v1/objectdetector", {
headers: { "x-api-key": "YOUR_API_KEY" },
});
const { data } = await res.json();
console.log(data);Resources
Call it from Python — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
import requests
res = requests.get(
"https://api.apiverve.com/v1/objectdetector",
headers={"x-api-key": "YOUR_API_KEY"},
)
print(res.json()["data"])Resources
Call it from C# / .NET — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "YOUR_API_KEY");
var json = await client.GetStringAsync("https://api.apiverve.com/v1/objectdetector");
Console.WriteLine(json);Resources
Call it from Go — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/objectdetector", nil)
req.Header.Set("x-api-key", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))Resources
Call it from PHP — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
$ch = curl_init("https://api.apiverve.com/v1/objectdetector");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-api-key: YOUR_API_KEY"]);
$response = curl_exec($ch);
echo $response;Resources
Call it from Ruby — POST /v1/objectdetector
No SDK to install — this is a plain HTTPS call to /v1/objectdetector with your key in the x-api-key header. Swap in a real key and it runs as-is.
require "net/http"
uri = URI("https://api.apiverve.com/v1/objectdetector")
req = Net::HTTP::Get.new(uri)
req["x-api-key"] = "YOUR_API_KEY"
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |h| h.request(req) }
puts res.bodyResources
Zero-code embed — one snippet, no backend
Drop an interactive Object Detector form onto any page. The widget calls the API for you, so no key ever appears in your markup and there is nothing to deploy.
Changelog — Object Detector API
Every change to this endpoint, newest first. Breaking changes ship as a new version and the previous one keeps serving — response fields are added, never removed or retyped in place, so an integration written against v1 keeps working.
Entries are picked up from dated catalog snapshots, so the first one appears after the next snapshot that moves something. A period where nothing changed produces no entry — silence is a valid changelog for the Object Detector API.
Images
- Background Remover
- Barcode Reader
- Face Detector
- HEIC Converter
- Image Converter
- NSFW Image Detector
- Object Detector
- QR Code Reader
- SVG Converter
- WebP Converter