Object & Label Detection API

Tag objects, scenes, activities, and concepts in any image with one REST call. The detect-labels service returns a scored list of labels with their categories as JSON — ready for image search, auto-tagging, and content discovery.

Published 2026-05-21 · Updated 2026-10-26

A photo of a golden retriever on a beach at sunset, linked to two label chips: Dog 99.4 and Beach 96.8.
One image in, a list of labels with confidence scores out — tags for the whole image, the same JSON contract for one label or fifty.

TL;DR. To detect objects in an image with an API, POST the image as multipart/form-data to Pixicular's image analysis API with services=detect-labels. The response is one JSON document with a list of labels, each carrying a name, a confidence percentage, and its categories. It tells you what the image contains, not where: there are no bounding boxes.

How does object and label detection work?

Label detection is the inverse of image search. Image search takes a label and finds matching images; label detection takes an image and returns the labels that describe it. The Pixicular detect-labels service analyses the whole frame and returns the labels it recognises, each with a confidence score and one or more category names, in a single JSON response.

The output mixes kinds of label on purpose. Objects are the concrete things present in the image (dog, bicycle, coffee cup). Scenes describe where the photo was taken (beach, city, kitchen). Activities and concepts describe what is happening or what the image conveys (cycling, cooking, sunset). A single photo usually picks up labels of several kinds in the same response, which is what makes the service useful for search, recommendations, and discovery rather than only literal object tagging. What it does not do is localise: the response says the image contains a dog, not where the dog is or how many there are.

Four-step label detection pipeline: Upload one image, Recognise objects and scenes, Score labels with a confidence per label, then JSON with name and categories, from POST /v1/detect with services=detect-labels.
Upload to JSON in one round-trip — recognition, a confidence score per label, then names and categories.

What does the label detection API return?

A request returns one JSON document with a key per requested service under services. For detect-labels the value contains a labels array. Each entry carries the label name, a confidence percentage from 0 to 100, and a categories array naming the broader groups the label belongs to, such as "Animals and Pets". That is the whole shape: there are no bounding boxes, instance counts, or parent hierarchies.

{
  "success": true,
  "requestId": "req_T8bWq2nZ5kLr7Yc1Xv",
  "services": {
    "detect-labels": {
      "labels": [
        { "name": "Dog", "confidence": 99.4, "categories": ["Animals and Pets"] },
        { "name": "Beach", "confidence": 96.8, "categories": ["Nature and Outdoors"] },
        { "name": "Sea", "confidence": 93.1, "categories": ["Nature and Outdoors"] },
        { "name": "Pet", "confidence": 90.7, "categories": ["Animals and Pets"] },
        { "name": "Sunset", "confidence": 86.2, "categories": ["Nature and Outdoors"] },
        { "name": "Outdoors", "confidence": 84.5, "categories": ["Nature and Outdoors"] }
      ]
    }
  },
  "photo": { "id": "photo_Lp4sD9fG2hJk6Mn8Qr", "status": "COMPLETED" },
  "creditCost": 1,
  "processingTimeMs": 1090,
  "processedAt": "2026-10-26T09:30:00.000Z"
}

The categories field is the hook for faceted navigation: you can group "Dog" and "Pet" under "Animals and Pets" without maintaining a taxonomy yourself. Do not rely on the order of the list; sort by confidence when you need the strongest labels first. The full field reference, error codes, and multi-service response shape are documented in the API documentation.

What kinds of labels can the API detect?

The vocabulary covers the categories most product teams reach for when building image search, auto-tagging, and content discovery. The table below lists 20 representative labels grouped by theme. It is a sample, not the complete vocabulary, which is much broader.

ThemeExample labelWhere developers use it
ObjectsCoffee CupCafe and kitchen photography, lifestyle blogs, e-commerce stock
ObjectsLaptopRemote-work shots, product reviews, office stock libraries
PeoplePersonGroup photos, portraits, people-or-no-people filters for galleries
PeopleChildFamily content and education imagery; pair with detect-age for age signals
VehiclesCarClassifieds, insurance claims, parking and mobility apps
VehiclesBicycleMobility apps, sport content, urban-scene tagging
AnimalsDogPet marketplaces, social feeds, animal welfare datasets
AnimalsCatPet content, adoption sites, stock imagery libraries
FoodPizzaDelivery apps, restaurant menus, recipe sites and UGC food feeds
FoodCoffeeHospitality content, cafe directories, breakfast photography
ScenesBeachTravel sites, holiday-rental listings, lifestyle stock photography
ScenesCityUrban content, location-aware feeds, street photography
ActivitiesCyclingSport and fitness apps, route content, event coverage
ActivitiesCookingRecipe platforms, home content, instructional video thumbnails
NatureMountainTravel and adventure content, outdoor gear sites
NatureForestTravel listings, environmental content, hiking and trail apps
IndoorLiving RoomReal-estate listings, furniture e-commerce, interior design feeds
IndoorKitchenReal-estate photos, recipe content, appliance product imagery
OutdoorGardenReal-estate listings, gardening content, landscaping portfolios
ConceptsSunsetStock libraries, travel content, mood-based image search and filters
Three category columns under the heading labels[].categories: Animals and Pets with the labels Dog and Cat, Food and Beverage with Pizza and Salad, and Vehicles and Automotive with Car and Bicycle.
Each label lists the categories it belongs to, so you can group labels into facets without storing a taxonomy yourself.

What do the confidence scores actually mean?

Each label carries a confidence from 0 to 100. It is the model's estimate that the label applies to the image — not a statistical guarantee and not a calibrated probability across every possible image. Treat it as a ranking signal first and a decision input second. A label at 97 is the model telling you it is very sure; a label at 60 is the model telling you it is plausible but contested.

A practical starting point is three bands rather than a single global threshold, tuned later on your own images. Keep labels at 90 or above for display and search indexing. Treat labels between 70 and 90 as soft signals — useful for personalisation, related-content recommendations, or low-stakes filters, but not as primary tags. Drop anything below 70 for end-user display unless you specifically need a long tail of fallback hints. Persist the request ID: you can fetch the stored result again from the history endpoint and re-evaluate it when your thresholds change.

How do you call the label detection API?

Authentication is a bearer token in the Authorization header. Send the image as multipart/form-data with a file part; JPEG, PNG, WebP, AVIF, and TIFF are accepted up to 10 MB and between 100×100 and 4096×4096 pixels. Pass the service name in the services field, or a comma-separated list if you want labels alongside moderation, OCR, or other services in the same call. For images that are already online, send their URL to /v1/detect-from-url instead.

curl

curl -X POST https://api.pixicular.com/v1/detect \
  -H "Authorization: Bearer $PIXICULAR_API_KEY" \
  -F "file=@./beach-photo.jpg" \
  -F "services=detect-labels"

TypeScript — typed auto-tagging with confidence thresholding

interface DetectedLabel {
  name: string;
  confidence: number; // 0-100
  categories: string[];
}

// Auto-tag an uploaded image: strong labels become tags, borderline ones go to review.
async function tagImage(file: Blob) {
  const body = new FormData();
  body.append("file", file);
  body.append("services", "detect-labels");

  const res = await fetch("https://api.pixicular.com/v1/detect", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.PIXICULAR_API_KEY}` },
    body,
  });
  // 202 means the request was queued under load: poll its statusUrl (see the docs).
  if (res.status === 202) return null;
  if (!res.ok) throw new Error(`Pixicular returned ${res.status}`);
  const result = await res.json();

  const labels: DetectedLabel[] = result.services["detect-labels"]?.labels ?? [];
  const sorted = [...labels].sort((a, b) => b.confidence - a.confidence);

  return {
    tags: sorted.filter((l) => l.confidence >= 90).map((l) => l.name),
    review: sorted
      .filter((l) => l.confidence >= 70 && l.confidence < 90)
      .map((l) => l.name),
    facets: [...new Set(sorted.flatMap((l) => l.categories))],
  };
}

Combine detect-labels with other services for richer workflows — for example labels plus moderation on seller-uploaded photos, as covered in the e-commerce product moderation guide, or labels plus OCR on insurance claim photos in the insurance claim photo analysis guide. The image is uploaded once and the services run in parallel; each one counts as one operation.

Where the API fits in a developer stack

Three audiences reach for label detection most often. Teams building image search use labels as the index: every uploaded photo becomes a set of weighted tags that a search query can match directly, without a human curation step. Teams building auto-tagging on user-generated content use labels as a starter set of tags that the uploader can confirm or refine, cutting the cold-start cost of empty metadata. Teams building content discovery — for example a feed that surfaces recipe-like images to users who engaged with cooking content — use labels as features for downstream similarity and recommendation.

The service composes with the other capabilities of Pixicular's image analysis API. Pair labels with content moderation flags for safety-aware tagging, with OCR text lines for caption-and-keyword indexing, or with face emotion scores for mood-tagged discovery — all in the same request. See the pricing page for plans and included operations.

Limits, edge cases, and what is not supported

The label model is general-purpose: wide, not deep. It will tell you that an image contains a dog with high confidence; treat any finer label, such as a breed, as a hint rather than a fact. It will recognise a car; it will not return the make, the model year, or the licence plate. It will recognise a shop sign; it will not read the text on the sign — that is the detect-text service's job, and the two compose in a single call. And because labels describe the whole image, there are no positions or counts: if you need to know where an object is or how many there are, label detection is the wrong tool.

Some things are out of scope. Labels such as "Person" say that someone is in the photo, never who: there is no face or celebrity recognition. Brand names and exact product SKUs are not returned; for product catalogues, use labels alongside your own product data. It is not a tool for medical or forensic conclusions. For NSFW and explicit-content signals, request the detect-moderation service in the same call rather than trying to infer them from labels.

Pixicular does not publish an accuracy figure for label detection. Harder inputs lower the scores rather than failing outright: extreme close-ups, heavy occlusion, motion blur, very low resolution, abstract or artistic compositions, and rare or visually ambiguous concepts all reduce confidence. That is what the confidence field is for: design around the noise by thresholding rather than expecting every label to be correct.

Frequently asked questions

How do you detect objects in an image with an API?

POST the image as multipart/form-data to https://api.pixicular.com/v1/detect with services=detect-labels. Pixicular analyses the image and returns a JSON document with a labels array; each label has a name, a confidence percentage (for example 99.4), and a categories array such as Animals and Pets. Label detection tells you what the image contains, not where: the response has no bounding boxes or object counts. One request, one JSON response, no SDK required.

What does the label detection API return?

Under services["detect-labels"], a labels array. Every label has a name (for example Dog, Beach, Cycling, or Indoors), a confidence from 0 to 100, and a categories array naming the broader groups it belongs to, which you can use for faceted navigation. Sort by confidence yourself if you need the strongest labels first. The response envelope also carries a requestId for log correlation, the creditCost, and processingTimeMs.

How accurate is image label detection?

Pixicular does not publish an accuracy figure for label detection. Common objects and everyday scenes in clear, well-lit photos at good resolution tend to get high-confidence labels; heavy occlusion, motion blur, extreme close-ups, abstract compositions, and rare concepts lower the scores. Threshold on confidence instead of trusting every label: for example, keep labels at 90 or above for display, treat 70 to 90 as soft signals, and tune the bands on images like your own.

What is not supported by the object detection API?

detect-labels returns whole-image labels only: no bounding boxes, positions, or object counts. It does not identify who a person is, read brand names, return exact product models or licence plates, and it is not a medical or forensic tool. For text in the image use detect-text, for explicit-content flags use detect-moderation, and for per-face age estimates use detect-age. You can combine several services in one call when you need more than labels.

Can I request label detection together with other image services?

Yes. Pass a comma-separated list in the services field, for example services=detect-labels,detect-moderation,detect-text. The image is uploaded once, the services run in parallel, and the response has one key per service under services. Each service on each image counts as one operation, so that request uses three, but it saves the latency of three round-trips. This is the usual pattern for auto-tagging, content discovery, and moderation pipelines.

Add object and label detection to your pipeline

The fastest way to evaluate the detect-labels service is to POST a handful of representative images with a single curl command and look at the JSON. Pick a plan on the pricing page, follow the API documentation for authentication and rate limits, and combine this label guide with the e-commerce product moderation and insurance claim photo analysis pages for use-case-specific detail.