Florence-2 API
Compact sequence-to-sequence vision foundation model that handles detection, grounding, segmentation and captioning from task prompts. Also used as the detector in Grounded SAM 2.
Call Florence-2
Send one request with your API key. The response comes back in the same call. See the API reference for every field.
import os, requests res = requests.post( "https://api.openrobotics.dev/v1/detect", headers={"Authorization": f"Bearer {os.environ['OPENROBOTICS_API_KEY']}"}, json={ "model": "microsoft/florence-2", "image": "<base64 JPEG or PNG>", "labels": ["cup", "bowl"], },).json()res["detections"] # label, score, boxGPUs start on demand. If Florence-2 hasn't been called for a while, the first request returns 503 with a Retry-After header while it boots (usually a few minutes, never billed).
Guides about Florence-2
- Object detection models: RF-DETR vs Grounding DINO and more
- Compare real-time detectors (RF-DETR, D-FINE) with open-vocabulary ones (Grounding DINO, OWLv2, Florence-2, YOLO-World): licenses, sizes and when to use each.
- Physical AI explained: the open model stack for robots
- What physical AI (embodied AI) means, the five kinds of models a robot uses, from perception to VLAs and world models, and open examples of each.
Florence-2 FAQ
- How do I run Florence-2 without my own GPU?
- Call POST /v1/detect on the OpenRobotics API with "model": "microsoft/florence-2". We run Florence-2 on cloud GPUs that start on demand, so there is nothing to install or host.
- How much does the Florence-2 API cost?
- $0.10 per 1,000 calls, billed only for successful calls. Pay with prepaid credits or monthly pay-as-you-go.
- What license does Florence-2 use?
- The weights we serve (florence-community/Florence-2-large) are released under MIT. Check the license for your use case.
- Is Florence-2 open source?
- Florence-2's weights are publicly available under MIT. OpenRobotics serves them behind an API so you can use the model without hosting it.
Run Florence-2 with one API call
Create a key, send POST /v1/detect with "model": "microsoft/florence-2", and pay $0.10 per 1,000 calls.