{"slug": "openrouter-object-detection-with-roboflow-workflows", "title": "OpenRouter Object Detection with Roboflow Workflows", "summary": "Roboflow published a guide for building an OpenRouter object-detection pipeline in Roboflow Workflows, comparing six vision-language models on a construction-site image and configuring bounding-box formats before training an RF-DETR detector. The walkthrough uses the OpenRouter block with model ID amazon/nova-pro-v1, Task Type set to Unprompted Object Detection, classes hard_hat and safety_vest, and the default Detection Format of Named keys, 0–1. Roboflow notes that models may return differing coordinate orders such as xyxy or yxyx, miss small objects, or box the wrong regions, so detections should be inspected and saved as draft annotations before training.", "body_md": "You can use vision-language models to detect objects before training a custom detector. Give a supported model an image and a list of classes, such as hard hats and safety vests, and ask it to return bounding boxes. OpenRouter provides access to models from multiple providers through one API, making it easier to test which models work on your images.\n\nGetting useful detections takes more than choosing a model. Models can return different coordinate formats, miss small objects, or draw boxes around the wrong regions. Your application needs consistent predictions, and you need a way to inspect their accuracy.\n\nIn this guide, we’ll build an OpenRouter object detection pipeline with Roboflow Workflows (opens in a new tab). We’ll compare six models on a construction-site image, configure bounding-box formats, and visualize the results. Then, we’ll show how to save detections as draft annotations, review them, and train an RF-DETR model for repeated inference on your own images.\n\nCan OpenRouter models do object detection?\n\nYes. Many vision-language models available through OpenRouter can detect objects in images. In Roboflow Workflows, you can select Unprompted Object Detection under Task Type in the OpenRouter block's configuration, if your chosen model supports it. The model can identify objects in the image and return coordinates showing where they appear.\n\nThese coordinates can be returned in formats such as xyxy, which gives the left, top, right, and bottom edges of a box. Other models can use yxyx or name each coordinate separately.\n\nEven with the correct format, a model might miss a safety vest or draw a box around the wrong object. Always check the detections before using them.\n\nObject detection with the OpenRouter Block\n\nFor our construction-site example, we'll use the OpenRouter block in Roboflow Workflows with these settings:\n\nModel ID: amazon/nova-pro-v1.\n\nTask Type: Select Unprompted Object Detection.\n\nClasses: Enter hard_hat, safety_vest to tell the model which objects to find.\n\nDetection Format: Select Named keys, 0–1 (default).\n\nThe Detection Format setting tells Roboflow how to read the model's coordinates. The default (Named keys, 0–1) expects named coordinates such as x_min and y_min, with values between 0 and 1. Other options include xyxy_0_1000 and yxyx_0_1000, which use a scale of 0 to 1000 but arrange the coordinates differently.\n\nThe OpenRouter block returns the detected objects and their bounding-box coordinates through its predictions output. You can use these results directly in other Workflow blocks without adding the older VLM as Detector block (opens in a new tab).\n\nHow OpenRouter bounding-box formats work\n\nConsider a 640 × 480 image with an object whose bounding box starts at pixel (100, 50) and ends at pixel (300, 250).\n\nThe same box can be represented in several formats:\n\nFormat\n\nCoordinate order\n\nValues\n\nPixel XYXY\n\nLeft, top, right, bottom\n\n[100, 50, 300, 250]\n\nPixel YXYX\n\nTop, left, bottom, right\n\n[50, 100, 250, 300]\n\nNormalized XYXY\n\nLeft, top, right, bottom\n\n[0.156, 0.104, 0.469, 0.521]\n\nNormalized YXYX\n\nTop, left, bottom, right\n\n[0.104, 0.156, 0.521, 0.469]\n\nNormalization divides horizontal coordinates by the image width and vertical coordinates by its height. This converts the coordinates into values between 0 and 1. XYXY stores the horizontal coordinates first, followed by the vertical coordinates. YXYX reverses that order.\n\nThe Detection Format setting tells the OpenRouter block which bounding-box format to request and how to read the model's response. The model's response must follow that format. If the coordinate order or scale differs, the bounding boxes may appear shifted or incorrectly scaled.\n\nDirect OpenRouter API example\n\nYou can send an image directly to OpenRouter's Chat Completions API and request object detections in a defined JSON format using JSON Schema.\n\nThe following example demonstrates what an OpenRouter request would look like.\n\nShell\n\n```\ncurl -X POST https://openrouter.ai/api/v1/chat/completions \\\n  -H \"Authorization: Bearer $OPENROUTER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"YOUR_SUPPORTED_VISION_MODEL\",\n    \"provider\": {\n      \"require_parameters\": true\n    },\n    \"messages\": [\n      {\n        \"role\": \"user\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"Detect all visible hard hats and safety vests. Return one detection per object, with bounding-box coordinates normalized between 0 and 1. Use the top-left corner as the coordinate origin.\"\n          },\n          {\n            \"type\": \"image_url\",\n            \"image_url\": {\n              \"url\": \"https://example.com/construction-site.jpg\"\n            }\n          }\n        ]\n      }\n    ],\n    \"response_format\": {\n      \"type\": \"json_schema\",\n      \"json_schema\": {\n        \"name\": \"object_detections\",\n        \"strict\": true,\n        \"schema\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"detections\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"object\",\n                \"properties\": {\n                  \"class\": {\n                    \"type\": \"string\",\n                    \"enum\": [\"hard_hat\", \"safety_vest\"]\n                  },\n                  \"bbox\": {\n                    \"type\": \"object\",\n                    \"properties\": {\n                      \"x_min\": {\n                        \"type\": \"number\",\n                        \"minimum\": 0,\n                        \"maximum\": 1\n                      },\n                      \"y_min\": {\n                        \"type\": \"number\",\n                        \"minimum\": 0,\n                        \"maximum\": 1\n                      },\n                      \"x_max\": {\n                        \"type\": \"number\",\n                        \"minimum\": 0,\n                        \"maximum\": 1\n                      },\n                      \"y_max\": {\n                        \"type\": \"number\",\n                        \"minimum\": 0,\n                        \"maximum\": 1\n                      }\n                    },\n                    \"required\": [\"x_min\", \"y_min\", \"x_max\", \"y_max\"],\n                    \"additionalProperties\": false\n                  }\n                },\n                \"required\": [\"class\", \"bbox\"],\n                \"additionalProperties\": false\n              }\n            }\n          },\n          \"required\": [\"detections\"],\n          \"additionalProperties\": false\n        }\n      }\n    }\n  }'\n```\n\nThe request uses an OpenRouter API key and a vision model that supports structured outputs. The model field specifies which model handles the request, while the image URL points to the image being analyzed. JSON Schema defines the response structure, but does not guarantee detection accuracy. Review the predicted classes and bounding boxes against the original image.\n\nThis direct request uses an OpenRouter API key. The Roboflow example below uses a separate Roboflow API key and Workflow endpoint to execute the complete Workflow.\n\nTutorial: Detect Objects with a VLM\n\nLet's test OpenRouter object detection on a synthetic construction-site image showing three workers. Each worker is wearing a hard hat and a reflective safety vest, giving us six objects to detect.\n\nStep 1: Create the Workflow\n\nOpen Roboflow Workflows and select Create Workflow (opens in a new tab). Start with a blank Workflow, which already includes Inputs and Outputs blocks by default. Add an OpenRouter block between them and connect it to the image input. Use the Nova Pro configuration from the previous section, with hard_hat and safety_vest as the classes.\n\nAdd a Bounding Box Visualization block (opens in a new tab) and connect the OpenRouter block's predictions output to its Predictions input. Connect the original image to its Image input to draw boxes around the detected objects.\n\nNext, add a Label Visualization block (opens in a new tab) to show class names such as hard_hat and safety_vest. Connect the bounding box visualization's output image to its Image input, and the OpenRouter predictions to its Predictions input.\n\nFinally, connect the Label Visualization output to the Workflow's Outputs block to return the annotated image. Add the OpenRouter block's predictions and error_status outputs as separate outputs. This tutorial uses OpenRouter block v3, which provides structured detection predictions. The error_status output helps you check whether the OpenRouter block processed the response successfully. If error_status is false and the predictions list is empty, the model returns no detections.\n\nStep 3: Run the Workflow and Check the Results\n\nRun the Workflow using the construction-site image.\n\nCompare the detections with the original image. Each hard hat and safety vest should have a bounding box that fits the object without including too much background. In our test, Nova Pro detected all three hard hats and three safety vests.\n\nCompare OpenRouter models for object detection\n\nWe compared six models using a new construction-site image, which shows four workers, three hard hats, and three safety vests. We ran the test on November 5, 2026, using a 1672 × 941-pixel image.\n\nAll models were tested using the OpenRouter block's Unprompted Object Detection task, with hard_hat and safety_vest as the target classes. For each model, we changed only the Model ID and Detection Format. All other settings were left unchanged.\n\nThe average time was calculated from two runs using Roboflow's reported Workflow processing time. This is a Workflow-level processing time, not isolated model inference time.\n\nA detection was counted as correct when its class label matched the object and its bounding box aligned with that specific object without including a lot of background or a neighboring object. We reviewed box placement visually rather than assigning a score based on an IoU threshold.\n\nModel ID\n\nDetection Format\n\nCorrect Detections (Hard Hats / Vests)\n\nMissed Objects\n\nFalse Positives\n\nLocalization Issues\n\nAvg. Time\n\namazon/nova-pro-v1\n\nNamed keys, 0–1\n\n3/3, 2/3\n\nOperator's vest\n\nNone observed on this image\n\nNo major shifts\n\n6.637 s\n\nopenai/gpt-4o-mini\n\nYXYX, 0–1000\n\n1/3, 1/3\n\nBlue/yellow hats; two vests\n\nBlue shirt as vest; torso as hard hat\n\nOversized, misplaced boxes\n\n6.896 s\n\nanthropic/claude-opus-5.5\n\nNamed keys, 0–1\n\n3/3, 3/3\n\nNone observed on this image\n\nNone observed on this image\n\nSlightly oversized vest boxes\n\n7.056 s\n\nanthropic/claude-opus-4.6\n\nNamed keys, 0–1\n\n2/3, 3/3\n\nBlue hard hat\n\nExtra hard hats\n\nOversized, shifted boxes\n\n8.312 s\n\ngoogle/gemini-2.5-pro\n\nYXYX, 0–1000\n\n3/3, 3/3\n\nNone observed on this image\n\nNone observed on this image\n\nSlightly oversized vest boxes\n\n18.067 s\n\nqwen/qwen3.6-27b\n\nYXYX, 0–1000\n\n3/3, 3/3\n\nNone observed on this image\n\nNone observed on this image\n\nSmall box around the middle worker's hard hat\n\n18.081 s\n\nThe OpenRouter block uses Roboflow credits by default. You can also provide your own OpenRouter API key for billing directly through OpenRouter.\n\nThe results show how six OpenRouter models performed on the construction-site image. The comparison covers one image and cannot establish which model performs best across object-detection tasks. For a broader evaluation, see Roboflow's Object Detection benchmark (opens in a new tab), which compares predicted bounding boxes against ground-truth annotations using mAP@50, mAP@75, and mAP@50:95 across different IoU thresholds.\n\nThe image below shows the detections returned by claude-opus-5.5 on the difficult image.\n\nNova Pro detected all three hard hats but missed the orange safety vest worn by the excavator operator.\n\nTest a few supported models on images from your site, including cases where workers are partially hidden. Compare missed objects and box placement.\n\nTroubleshoot OpenRouter object detection\n\nIf boxes are shifted or scaled incorrectly, check the Detection Format setting. Make sure the coordinate order and scale match the model's response, then rerun the Workflow and compare the boxes with the original image.\n\nIf an object is missing, check that its class is included in the Classes field in the block. If it is, try a closer crop, another supported vision model, or add the missing bounding box during annotation review.\n\nIf the model returns an unexpected class, check the requested Classes field in the block and inspect the raw prediction. Remove detections outside the target class list or correct their labels during annotation review. If the model keeps returning unrelated classes, test another supported model.\n\nIf the response is empty, check error_status and inspect the raw response. True indicates a parsing error. False with an empty predictions list means the Workflow returned no detections.\n\nReasoning can use up the available output-token budget before the model returns JSON, leaving no usable response. Roboflow documented this issue with Mistral Large 4 on openrouter@v3. Check token usage before treating an empty response as a successful run with no detections.\n\nWhen to use VLM detection vs. a trained detector\n\nOpenRouter object detection is useful when you don't have labeled images to train your own model on. A VLM can identify new or rare object classes through zero-shot detection, such as a specific type of safety equipment on a construction site. You can then review the predicted bounding boxes and use the corrected annotations to start building a training dataset.\n\nComparison\n\nOpenRouter VLM\n\nRF-DETR\n\nBest for\n\nQuick testing of new or rare object classes and initial auto-labeling\n\nConsistent detection of trained classes across many images\n\nTraining data\n\nNo labeled dataset needed for zero-shot detection\n\nRequires labeled images for training\n\nSpeed and cost\n\nExternal VLM requests can be slow and costly when processing many images\n\nDesigned for real-time detection and can offer lower costs per image at scale\n\nDeployment\n\nRequires access to the VLM provider\n\nCan run in the cloud or locally on your own hardware\n\nFor a construction site with several cameras monitoring workers throughout the day, RF-DETR might be a better long-term choice. It can process images locally without sending every frame to an external VLM. Before deploying it, test it on footage from your own cameras to see how well it detects safety equipment on workers who are far away or partly hidden.\n\nThen add a Roboflow Dataset Upload block (opens in a new tab) to your Workflow and select the project. Connect the original image to its Image input and the OpenRouter predictions to its Predictions input. Enable Persist Predictions to save the detected boxes as annotations.\n\nCollect more construction-site images showing workers at different distances and under different lighting conditions. Include examples where workers aren't wearing hard hats or safety vests.\n\nOpen the uploaded images in Roboflow Annotate and review the bounding boxes. Check that each hard hat and safety vest has the correct class label.\n\nAdd boxes around objects the VLM missed and remove any incorrect detections. Adjust any boxes that don't fit the objects properly, then save the corrected annotations before training. Once the annotations are ready, generate a dataset version (opens in a new tab) in Roboflow and select Custom Training to train RF-DETR. After training, test the model on images it hasn't seen before.\n\nAfter training RF-DETR, you can set up a Workflow to check the confidence score of each detection. Images with low-confidence scores can be sent to a VLM or a person for review, while those with higher scores continue without that extra step.\n\nRF-DETR may miss objects entirely, leaving no confidence score to check. Review some images where the model found no objects. If you find any missed hard hats or safety vests, label them and add the corrected images to your dataset for future training.\n\nRun OpenRouter object detection through an API\n\nTo run your OpenRouter Workflow in the cloud, click Use in the top-right corner of the Workflow editor. Select Cloud API, then choose cURL, Python, or JavaScript to view the API request example. Add your API key and image URL, then send the request to the Serverless Cloud API (opens in a new tab) to get the detection results.\n\nTo run the Workflow using Python and a local image, install the Roboflow Inference SDK:\n\nShell\n\n```\npip install inference-sdk\n```\n\nThe example uses a Roboflow API key and the Roboflow Serverless endpoint to execute the published Workflow. The Workflow runs its configured OpenRouter block. A direct OpenRouter API request uses a separate OpenRouter API key and the OpenRouter Chat Completions endpoint.\n\nPython\n\n``` python\n# 1. Import the library\nimport json\n\nfrom inference_sdk import InferenceHTTPClient, InferenceConfiguration\n\n# 2. Connect to your workflow\nclient = InferenceHTTPClient(\n    api_url=\"https://serverless.roboflow.com\",\n    api_key=\"YOUR_ROBOFLOW_API_KEY\"\n).configure(InferenceConfiguration(\n    api_key_transport=\"header\"  # Header-based auth (Inference SDK v1.5.0+)\n))\n\n# 3. Run your workflow on an image\nresult = client.run_workflow(\n    workspace_name=\"YOUR_WORKSPACE_NAME\",\n    workflow_id=\"YOUR_WORKFLOW_ID\",\n    images={\n        \"image\": \"PATH/TO/YOUR/IMAGE.png\"\n    },\n    use_cache=False  # Disable caching for a fresh request\n)\nresult = result[0]\n\npredictions = result[\"predictions\"]\ndetections = predictions[\"predictions\"]\n\nprint(\"Error status:\", result[\"error_status\"])\nprint(\"Number of detections:\", len(detections))\nprint(json.dumps(predictions, indent=2))\n```\n\nIn this test, the Workflow returned six detections, with error_status set to false.\n\nEach prediction includes class, the detected object label (such as safety_vest), and class_id, its numeric identifier. The x and y values give the bounding-box center in pixels, while width and height specify its dimensions. The confidence value gives the model's confidence score for that detection.\n\nThe OpenRouter block relies on an external VLM provider, so it still requires an internet connection. If you've trained RF-DETR, you can deploy it locally or in the cloud without sending images to an external VLM.\n\nConclusion\n\nOn the harder image, Gemini 2.5 Pro, Opus 5.5, and Qwen3.6-27B detected all six objects. Opus 5.5 averaged around 7 seconds per image, compared with around 18 seconds for Gemini 2.5 Pro and Qwen3.6-27B.\n\nNova Pro missed a safety vest, while Opus 4.6 and GPT-4o-mini made detection errors. These results show why you should check the Detection Format and review predictions before using them as training annotations.\n\nTry OpenRouter object detection in Roboflow Workflows by adding an OpenRouter block with a supported VLM to detect objects in your own images.", "url": "https://wpnews.pro/news/openrouter-object-detection-with-roboflow-workflows", "canonical_source": "https://roboflow.com/blog/openrouter-object-detection", "published_at": "2026-11-30 20:36:12+00:00", "updated_at": "2026-11-30 20:43:44.511380+00:00", "lang": "en", "topics": ["computer-vision", "ai-tools", "ai-products", "machine-learning"], "entities": ["Roboflow", "OpenRouter", "amazon/nova-pro-v1", "RF-DETR", "Roboflow Workflows"], "also_reported_by": [], "takeaway": "Set the OpenRouter block's Detection Format to match the model's coordinate order and scale — the default Named keys, 0–1 expects x_min/y_min values between 0 and 1, while xyxy_0_1000 and yxyx_0_1000 use a 0–1000 scale — or boxes will appear shifted or incorrectly scaled.", "recommendation": {"advice": "Match the Detection Format to the model's coordinate order and scale, then inspect detections and save them as draft annotations before training a custom detector.", "playbook": "output-verification", "playbook_url": "https://wpnews.pro/playbooks/output-verification"}, "alternates": {"html": "https://wpnews.pro/news/openrouter-object-detection-with-roboflow-workflows", "markdown": "https://wpnews.pro/news/openrouter-object-detection-with-roboflow-workflows.md", "text": "https://wpnews.pro/news/openrouter-object-detection-with-roboflow-workflows.txt", "jsonld": "https://wpnews.pro/news/openrouter-object-detection-with-roboflow-workflows.jsonld"}}