License YOLO
Ultralytics Platform

Object Detection API Without Training Using Ultralytics VLM

Send an image and a list of class names to the Ultralytics Platform API and get bounding boxes and labels back, with no custom model to train first.

Glenn Jocher7 min read

Listen to this article

Send an image and a list of class names to the Ultralytics Platform API and get bounding boxes and labels back, with no custom model to train first.

Use Ultralytics VLM through Ultralytics Platform’s POST /v1/predict endpoint to get bounding boxes and labels from an image and a list of class names. You need a Platform API key and one image per request. You can make your first request without a project, dataset, deployment or custom training.

Use vlm-2b for the faster variant or vlm-4b for the higher-accuracy variant. On the December 2, 2026 Ultralytics VLM Leaderboard, the two scored 0.435 and 0.460 mAP50, with median per-image requests of 0.31 s and 0.39 s. Test both if your classes are hard to distinguish. Both run on Ultralytics Platform without a third-party provider key.

For a browser-based example, start with the VLM1 2B model page. The Ultralytics VLM launch announcement shows how the same detections can become labels for Ultralytics YOLO training.

How class-prompted detection works#

A class-prompted model detects the classes you name in text at request time, instead of a fixed list learned during training. This is zero-shot, open-vocabulary detection: write "forklift" or "person in a high-vis vest" and the model looks for each one. The VLM Leaderboard compares their accuracy and speed on UL37, using real-world detection datasets.

Before you start#

  • An API key. In Platform, go to Settings > API Keys, click Add Key, keep Ultralytics as the provider and create the key. Store it in an environment variable, never in code.
  • An image. Keep the complete multipart request under 4.5 MB, including the image and form fields.
  • A model ID. Use vlm-2b or vlm-4b. The examples below use vlm-4b. Create your key in Platform API Keys.

The examples read your key from ULTRALYTICS_API_KEY.

Send an image and class names#

The endpoint is POST https://api.ultralytics.com/v1/predict. It takes a multipart form with four fields:

FieldTypeDescription
modelstringModel ID, such as vlm-4b
filefileImage to run the model on, one per request
classesstringRepeat this field for each of 1–200 class names
normalizebooleanReturn box coordinates from 0 to 1 instead of pixels

model, file and classes are required. Other fields, including conf, iou and imgsz, are rejected with 400.

With curl:

curl -X POST \
  -H "Authorization: Bearer $ULTRALYTICS_API_KEY" \
  -F "model=vlm-4b" \
  -F "file=@image.jpg" \
  -F "classes=forklift" \
  -F "classes=person" \
  https://api.ultralytics.com/v1/predict

With Python and requests:

import os

import requests

url = "https://api.ultralytics.com/v1/predict"
headers = {"Authorization": f"Bearer {os.environ['ULTRALYTICS_API_KEY']}"}
data = {"model": "vlm-4b", "classes": ["forklift", "person"]}

with open("image.jpg", "rb") as f:
    response = requests.post(url, headers=headers, data=data, files={"file": f}, timeout=130)

response.raise_for_status()
for result in response.json()["images"][0]["results"]:
    print(result["name"], result["box"])

The Ultralytics Platform Python SDK wraps the same call as client.inference.predict(model=..., file=..., classes=[...]) from ultralytics-platform>=0.1.125.

Read the response#

The response has the same shape as standard model inference on Platform. Each entry in images carries shape (the original [height, width]), speed (timings in milliseconds) and results. Each result has:

  • name: the class name you sent
  • class: its index in your classes list
  • box: x1, y1, x2, y2, the top-left and bottom-right corners
{
  "images": [
    {
      "shape": [1080, 1920],
      "results": [
        { "class": 0, "name": "forklift", "box": { "x1": 412, "y1": 230, "x2": 905, "y2": 760 } }
      ]
    }
  ]
}

Illustrative values; speed and metadata omitted.

Results have no confidence score, so you cannot filter or rank boxes by score. An empty results list is a valid response, but it does not prove that none of the requested objects is present. Review predictions for missed objects and false positives.

Coordinate formats#

By default, boxes are in the pixels of the image you uploaded, as corner coordinates. Send normalize=true to get the same corners scaled from 0 to 1.

The conversion below assumes the default pixel response, with normalize omitted or false. Platform datasets store boxes as normalized [x_center, y_center, width, height]. If you requested normalized corners, calculate centers and dimensions directly without dividing by the image width or height again.

prediction = response.json()["images"][0]
height, width = prediction["shape"]
for result in prediction["results"]:
    box = result["box"]
    x1, y1, x2, y2 = (box[key] for key in ("x1", "y1", "x2", "y2"))
    yolo_box = [
        (x1 + x2) / (2 * width),
        (y1 + y2) / (2 * height),
        (x2 - x1) / width,
        (y2 - y1) / height,
    ]
    print(result["class"], *yolo_box)

Errors and limits#

Common responses when calling /v1/predict with vlm-2b or vlm-4b include the following.

StatusMeaning on /v1/predict
400Missing or invalid form fields, an unsupported model ID, or an unsupported field such as conf
401Missing, malformed or revoked API key
413Multipart request exceeds 4.5 MB
422Image could not be read
429Rate limit exceeded
503Prediction service unavailable or inference timed out

A 429 response includes a Retry-After header; wait that many seconds before retrying. The API docs include a backoff example.

Send 1–200 class names per request. See the Inference API reference for the multipart schema and current limits.

Single-image inference vs batch annotation#

/v1/predict is for one image you hold locally. It returns boxes to your code without requiring a Platform dataset. When you want labels for a whole dataset, use batch annotation instead:

POST /v1/datasets/{owner}/{dataset}/predict/batch
POST /v1/predictPOST /v1/datasets/{owner}/{dataset}/predict/batch
InputOne uploaded imageEligible unlabeled images in a Platform dataset by default
ClassesSent in the requestThe dataset's own classes, subject to the selected batch model's limits
OutputJSON returned to youLabels saved to the dataset
Model fieldmodelmodelId
Response200 with results202; the run continues asynchronously

For a detection dataset with 1–200 classes, send {"modelId": "vlm-2b"} or use vlm-4b in the batch request body. Set maxImages to limit a first run to the oldest eligible images. Set includeAnnotated to true to also process images that already have labels. Batch Annotation preserves existing labels and saves a version when the dataset supports versioning. Use GET on the same path to check progress or DELETE to cancel an in-flight job.

Use Batch Annotation in Platform to preview sample predictions and review the saved boxes before training.

When to move to a trained Ultralytics YOLO model#

A trained detector is usually the better fit when you need:

  • Speed and throughput for video, many cameras or high request volumes
  • Confidence scores and thresholds, which trained YOLO models return and accept as conf and iou
  • Edge or offline inference on your own hardware

Use Batch Annotation to label a dataset, review and correct the boxes, then train Ultralytics YOLO26. For hosted inference, deploy the trained model to a dedicated endpoint. For deployment on your own hardware, export in a format your target supports.

Frequently asked questions

  • Yes. Ultralytics Platform's POST /v1/predict takes an image and class names, runs a supported class-prompted model, and returns detected boxes and labels. No project, dataset or deployment is needed. Start with Ultralytics VLM and check its current request limits.

  • Ultralytics VLM is built for this: you name the classes and it returns boxes and labels. Compare hosted models on the VLM Leaderboard and test on your own images.

  • Yes. The batch endpoint accepts vlm-2b or vlm-4b as the modelId and saves detections in a Platform dataset. Use Inference API reference when you want boxes and labels returned directly to your code for a single image.

  • No. Class-prompted models use model-specific thresholds and return no confidence field, and conf or iou fields are rejected. If you need scores and thresholds, train an Ultralytics YOLO model on reviewed labels.

  • For production traffic with fixed classes, evaluate a trained Ultralytics YOLO model on a dedicated endpoint. It supports confidence scores, and direct calls bypass the Platform API rate limiter while remaining subject to endpoint capacity. Measure accuracy and throughput for your workload.

Written by

Glenn Jocher
Glenn Jocher

Founder & CEO · Ultralytics

Glenn Jocher is Founder and CEO of Ultralytics, where he leads the development of Ultralytics YOLO, the world's most widely adopted computer vision models. His work isn't just about building faster, more accurate models; it's about empowering people everywhere to solve meaningful problems with vision AI.

Comments

Ask a question, share your results, or help someone else.

Similar articles

Can VLMs Detect Objects? VLMs, Open-Vocabulary Detectors, and YOLO

Can VLMs Detect Objects? VLMs, Open-Vocabulary Detectors, and YOLO

Can VLMs detect objects? Compare prompted detection with open-vocabulary detectors and trained Ultralytics YOLO models, and learn when each approach fits.
Learn more
Zero-Shot Object Detection Models and Grounding DINO Alternatives

Zero-Shot Object Detection Models and Grounding DINO Alternatives

Compare Ultralytics VLM, Grounding DINO, OWLv2, and SAM by detection accuracy, prompt type, output and deployment requirements.
Learn more
How to Auto-Label Images from Class Names with Ultralytics VLM

How to Auto-Label Images from Class Names with Ultralytics VLM

Auto-label images from class names with Ultralytics VLM. Test representative images, review and correct the boxes, and train an Ultralytics YOLO26 model.
Learn more
Auto annotation tool for 10,000 images: how VLMs compare on accuracy and speed

Auto annotation tool for 10,000 images: how VLMs compare on accuracy and speed

Ultralytics VLM1 4B needs about 65 minutes of estimated model time for 10,000 images. Compare VLM accuracy and speed with Gemini, GPT and Claude.
Learn more
Ultralytics VLM: Object detection at a speed VLMs have never reached.  No training data required.

Ultralytics VLM: Object detection at a speed VLMs have never reached. No training data required.

Meet Ultralytics VLM: describe objects in plain words and get detections in seconds, faster than most frontier VLMs. Then train Ultralytics YOLO on them.
Learn more
Thermal image of a person beside a car, with an auto-labeled bounding box around the person

Thermal image annotation: how to label and auto-label infrared images

How to export, label and auto-annotate thermal and infrared images, with VLM scores on two thermal datasets and steps to train an Ultralytics YOLO26 model.
Learn more
Qwen 4 launch art with Ultralytics UL37 results: 0.474 mAP50 overall and 0.4975 on wrist X-rays, best of 51 models

Qwen4-Max for auto-annotation: standout datasets, uneven gains

Qwen4-Max ranks 14th of 51 in our auto-annotation benchmark, first on wrist X-rays and second on retail shelves. Accuracy, cost and how to run it.
Learn more
OpenAI's GPT-6.2 Astra and Sol launch artwork on a star field, with Ultralytics UL37 object detection scores: Astra 0.543 and Sol 0.539 mAP50

GPT-6.2 Sol vs Astra for Auto-Annotation: Similar Scores, Different Strengths

GPT-6.2 Astra and Sol score 0.543 and 0.539 mAP50 on 36 detection datasets, but Sol costs $8.10 per 1,000 images vs $31.88. Here's which to use.
Learn more
Ultralytics Platform fullscreen viewer showing an annotated crosswalk image from above, next to a table of EXIF orientation values with value 6, rotate 90 degrees clockwise, highlighted, on a black gradient cover titled EXIF orientation explained

EXIF orientation in Ultralytics YOLO: why sideways photos break datasets

EXIF orientation values 5 to 8 swap an image's width and height. Learn how a missed tag misaligns labels, and how Ultralytics now reads tagged images upright.
Learn more
Google's Gemini 4 Hydrogen launch artwork with an Ultralytics Platform tile showing 0.539 mAP50, its overall score on the UL37 object detection benchmark

Gemini 4 Hydrogen auto-annotation: cheaper per token, less so per image

Gemini 4 Hydrogen ranks fourth of 46 VLMs on our 36-dataset object detection benchmark at 0.539 mAP50, with top scores on plant disease, soccer and X-ray.
Learn more
Ultralytics Platform training GPU list with hourly prices beside an illustrative comparison of a cloud RTX 4090 at $0.89 per hour and an assumed $3,000 RTX 4090 workstation, breaking even at about 3,800 hours

Managed Training Platforms vs Self-Hosted GPUs for Computer Vision, Compared

Compare managed GPU training platforms, cloud ML services, rented GPUs and your own hardware for computer vision: costs, setup, break-even and when each fits.
Learn more
Ultralytics Platform deployment page with live request metrics and a masked endpoint URL, beside steps showing an Amazon S3 bucket connected, a YOLO26 model completed and a hosted API ready

How to Train YOLO on Amazon S3 Data and Deploy a Hosted API with Ultralytics Platform

Train Ultralytics YOLO26 on images in your Amazon S3 bucket and deploy it as a hosted API with Ultralytics Platform, step by step, compared with SageMaker.
Learn more
Gemini 4 Carbon key art with an Ultralytics detection box around the crystal, labeled crystal 0.97

Gemini 4 Carbon auto-annotation: the new leader on our VLM Leaderboard

Gemini 4 Carbon tops 45 models on our 36-dataset detection benchmark with 0.584 mAP50 and the best precision and recall. Is it worth 6x GPT-6.1 Terra?
Learn more
The Ultralytics Agents canvas: an input image goes to a YOLO26 Detect people block and a Person detected Gate set to detection count of person, branching to Captured images and Notify Slack

How to Turn YOLO Detections into Alerts Without Code Using Ultralytics Agents

Turn Ultralytics YOLO detections into Slack alerts, webhooks and dataset captures without code, using a Gate condition in Ultralytics Agents.
Learn more
Claude Fable 5.2 is here, and it refuses to look at security X-rays

Claude Fable 5.2 is here, and it refuses to look at security X-rays

Claude Fable 5.2 is out, and it refuses to label the IEDXray security X-ray dataset on Ultralytics Platform: all 10 scans blocked, while open models answered.
Learn more
How to choose a VLM for auto-annotation using precision and recall

How to choose a VLM for auto-annotation using precision and recall

Pick a VLM for auto-annotation by precision and recall: which models leave fewer stray boxes, which miss fewer objects, and how to test on your own data.
Learn more
HIPAA compliant AI for medical imaging: what a BAA covers and how to train on patient data

HIPAA compliant AI for medical imaging: what a BAA covers and how to train on patient data

Learn what HIPAA compliant AI requires for medical imaging, what an Ultralytics BAA covers, and how to annotate, train and deploy with patient data.
Learn more
Ultralytics Platform training charts with the Weights & Biases import panel for connecting a W&B API key

How to migrate Ultralytics YOLO models from W&B to Ultralytics Platform

Import Ultralytics YOLO models from Weights & Biases (W&B) into Ultralytics Platform without retraining, then compare experiments, export, and deploy.
Learn more
GPT-6.1 Terra takes #1 for auto-annotation, beating OpenAI's own flagships

GPT-6.1 Terra takes #1 for auto-annotation, beating OpenAI's own flagships

GPT-6.1 Terra auto-annotation tops 39 models on our VLM Leaderboard: 0.559 mAP50 for $4.36 per 1,000 images, ahead of GPT-6.1 Sol and Gemini 4 Argon.
Learn more
MiniMax-M3.1-Flash auto-annotation: why less reasoning drew better boxes

MiniMax-M3.1-Flash auto-annotation: why less reasoning drew better boxes

MiniMax-M3.1-Flash auto-annotation in Ultralytics Platform: 0.289 mAP50 at $1.84 per 1,000 images after tuning, with 0.86 on SAR ship detection.
Learn more
Kimi K3.1 Pro auto-annotation: a third better than K3, at high effort

Kimi K3.1 Pro auto-annotation: a third better than K3, at high effort

Kimi K3.1 Pro auto-annotation scores 0.410 mAP50 on UL37, a third above Kimi K3. See why we run it at high effort, what it costs, and where it wins.
Learn more
Gemini 4 Argon auto-annotation: the most precise boxes of 39 models

Gemini 4 Argon auto-annotation: the most precise boxes of 39 models

Gemini 4 Argon auto-annotation on Ultralytics Platform: #2 of 39 models, top precision (0.671), first in 6 of 12 domains, and $15.19 per 1,000 images.
Learn more
Ultralytics Platform Monitoring: Keep vision AI deployments on track

Ultralytics Platform Monitoring: Keep vision AI deployments on track

Monitor deployed vision AI models with Ultralytics Platform. Track endpoint health, latency, errors, logs, and live prediction statistics.
Learn more
Introducing Ultralytics Agents: Build visual AI workflows faster

Introducing Ultralytics Agents: Build visual AI workflows faster

Build visual AI workflows with Ultralytics Agents. Connect YOLO models, vision-language models, conditions, datasets, and Slack alerts on one canvas.
Learn more
Introducing Ultralytics AutoTrain: Simplify vision AI model training

Introducing Ultralytics AutoTrain: Simplify vision AI model training

Train, compare, and improve Ultralytics YOLO models with AutoTrain in Ultralytics Platform, from initial baseline to production deployment.
Learn more
Exporting Ultralytics YOLO models on Ultralytics Platform

How to export Ultralytics YOLO models using Ultralytics Platform

Export vision AI models with ease using Ultralytics Platform. Explore how to prepare models in a few clicks for edge, mobile, and cloud deployment.
Learn more
Polygon annotation with Ultralytics Platform

A guide to polygon annotation with Ultralytics Platform

Discover polygon annotation, how it enables precise object segmentation, and how to create annotations easily with Ultralytics Platform.
Learn more
Monitoring deployed computer vision models on Ultralytics Platform

Monitoring deployed computer vision models on Ultralytics Platform

Learn how to monitor deployed computer vision models on Ultralytics Platform, from request volume, P95 latency, and error rates to logs and health checks.
Learn more
Picking a cloud GPU for vision AI training on Ultralytics Platform

How to pick a cloud GPU for vision AI training on Ultralytics Platform

Learn how to pick the right cloud GPU for computer vision training on Ultralytics Platform based on factors such as dataset size, model complexity, and cost.
Learn more
Dedicated inference endpoints vs shared inference for deployment

Dedicated inference endpoints vs shared inference for deployment

Explore when to choose dedicated inference endpoints on the Ultralytics Platform for scalable, low-latency vision AI deployment over shared inference.
Learn more

Let's build the future of AI together!

Begin your journey with the future of machine learning