Roboflow

UltralyticsReleased Jan 2023AGPL 3.0

YOLOv8

On COCO val2017 (measured July 21, 2025), YOLOv8 scores 36.5 to 52.9 mAP 50:95 across 5 sizes; its best size ranks #21 of 60 detectors on leaderboard.roboflow.com.

It is an open-weight model from Ultralytics under the AGPL 3.0 license, and commercial use needs a license (included on Roboflow cloud).

YOLOv8 Interactive Demo

YOLOv8 Benchmarks

Accuracy and size of each YOLOv8 size on the COCO val2017 detection benchmark, as measured by leaderboard.roboflow.com.

SizeMeasured atParamsmAP 50:95mAP 50Small objectsDemo
Nano640×6403.2M36.551.417.4Try
Small640×64011.2M44.160.225.2Try
Medium640×64025.9M49.265.730.9Try
Large640×64043.7M51.868.334.5Try
XL640×64068.2M52.969.434.6Try

COCO val2017 results from leaderboard.roboflow.com, last run July 2025.

YOLOv8 Overview

YOLOv8 is an object detection and multi-task vision model developed by Ultralytics, released in January 2023 under the AGPL-3.0 license. It succeeds YOLOv5 and introduces an anchor-free detection head, a new C2f module for improved gradient flow, and a decoupled head that separates classification and regression tasks. These changes improve both accuracy and training efficiency compared to earlier Ultralytics models.

Deploy YOLOv8 with an API

YOLOv8 runs as a hosted REST endpoint through Roboflow Workflows. Pick a task, then hand the prompt to your coding agent or copy the code. Deploying the workflow into a free Roboflow workspace replaces the your-workspace and YOUR_API_KEY placeholders with your own.

Connect your agent to Roboflow (once)

Add the Roboflow MCP server

claude mcp add --transport http roboflow https://mcp.roboflow.com/mcp

Run /mcp and authorize Roboflow in your browser when the OAuth flow opens.

Start a new Claude Code session so the MCP loads, then paste the prompt below (it works the same in any agent).

Deploy this workflow to your Roboflow workspace to use it.

Integrate the Roboflow "YOLOv8" workflow into my app.

- Endpoint: POST https://serverless.roboflow.com/<your-workspace>/workflows/yolov8-object-detection-coco-medium
- Auth: send my Roboflow API key as `api_key` in the request body, read from the ROBOFLOW_API_KEY env var (never hardcode).
- Body: { "api_key": ..., "inputs": { `image`: { type: "url" | "base64", value } } }.

With the Roboflow MCP connected, call `workflows_get` on "yolov8-object-detection-coco-medium" to read the exact input schema (the source of truth), then `workflows_run` on a sample image to confirm the output shape before writing code (the MCP is authenticated, so this needs no key). Without the MCP, use the contract above.

Before running the app, set up these keys so it does not error at runtime:
- `ROBOFLOW_API_KEY` (sent as `api_key`) from https://app.roboflow.com/settings/api
Create a .gitignore'd .env with these variables, using placeholder values for any I haven't given you. Then pause and tell me directly, in your reply: the full path to the .env file, exactly which keys I need to paste in, and the link to get each one. Wait for me to confirm I've added them before you run anything. Do not run the app until I confirm.

Then add the integration to my codebase: match my project's language, framework, and conventions; read every key from environment variables (never hardcode); add basic error handling; and include a small runnable example. If you can't tell what language my project uses, ask me.
Installpip install inference-sdk

Deploy this workflow to your Roboflow workspace to use it.

# 1. Import the library
from inference_sdk import InferenceHTTPClient

# 2. Connect to your workflow
client = InferenceHTTPClient(
  api_url="https://serverless.roboflow.com",
  api_key="YOUR_API_KEY"
)

# 3. Run your workflow on an image
result = client.run_workflow(
  workspace_name="your-workspace",
  workflow_id="yolov8-object-detection-coco-medium",
  images={
    "image": "YOUR_IMAGE.jpg"  # Path to your image file
  },
  use_cache=True  # cache workflow definition for 15 minutes
)

# 4. Get your results
print(result)

Deploy this workflow to your Roboflow workspace to use it.

const response = await fetch('https://serverless.roboflow.com/your-workspace/workflows/yolov8-object-detection-coco-medium', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    api_key: 'YOUR_API_KEY',
    inputs: {
      "image": {"type": "url", "value": "IMAGE_URL"}
    }
  })
});

const result = await response.json();
console.log(result);

Deploy this workflow to your Roboflow workspace to use it.

curl --location 'https://serverless.roboflow.com/your-workspace/workflows/yolov8-object-detection-coco-medium' \
--header 'Content-Type: application/json' \
--data '{
  "api_key": "YOUR_API_KEY",
  "inputs": {
    "image": {"type": "url", "value": "IMAGE_URL"}
  }
}'

YOLOv8 License

AGPL-3.0 · Restrictive license

YOLOv8 is released under AGPL-3.0, the most restrictive of the common model licenses. AGPL-3.0 requires the user to open-source any code changes they make, including the code of any other projects that connect directly to the model, so the YOLOv8 license usually means a separate commercial license for business use.

Commercial use
Permitted only if you are willing and able to open-source related code. Otherwise YOLOv8 requires a separate commercial license — the usual path for businesses.
Modification
Permitted. Modified versions must be offered under AGPL-3.0, including to users who only ever reach the model over a network.
Redistribution
Permitted with the complete corresponding source, under the same license.

Serving YOLOv8 behind an API or inside a hosted product counts: AGPL-3.0 reaches the code of other projects that connect directly to the model, which is what catches most commercial deployments by surprise.

Read the full AGPL-3.0 license ↗

Do I need a commercial license for YOLOv8?

In practice, using YOLOv8 in a commercial product or service, including one users reach over a network, means open-sourcing your application code under AGPL-3.0 or buying a commercial license. Deploying on Roboflow includes a commercial YOLOv8 license for every user, including the free plan; commercial self-hosting is an Enterprise add-on. Licensing details. Need a permissive license? RF-DETR is Apache 2.0.

Do not hesitate to reach out with questions for your commercial project. Our team will help you start solving business problems on the first call. See Roboflow commercial licensing for the models included in each plan.

Talk to sales

YOLOv8 is licensed under an AGPL-3.0 license.

This means that YOLOv8 is available for private and commercial use, but that you will need to follow specific conditions. For commercial use, you need to follow AGPL-3.0 conditions or purchase a license for commercial use, modifications, and distribution.

Using an AGPL-3.0 licensed model is conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. When a modified version is used to provide a service over a network, the complete source code of the modified version must be made available.

YOLOv8 is released under AGPL-3.0. In practice, using it in a commercial product or service, including one users reach over a network, means open-sourcing your application code under AGPL-3.0 or buying a commercial license. Deploying on Roboflow includes a commercial YOLOv8 license for every user; commercial self-hosting is an Enterprise add-on (details). Need a permissive license? RF-DETR is Apache 2.0.

AGPL-3.0 closes the "SaaS loophole" in GPL-3.0: even hosting the model behind an API counts as distribution and triggers the source-disclosure requirement.

License information is provided as a guide and is not legal advice.

YOLOv8 Details

Details

Categoryopen
ModalityVision
Parameters3.2M-68.2M
LicenseAGPL-3.0
Release DateJan 2023

Vision Tasks

Object Detection

Usage

Past 30 Days

Frequently Asked Questions About YOLOv8

On the COCO val2017 detection benchmark, YOLOv8 scores 36.5 to 52.9 mAP 50:95 across 5 sizes. YOLOv8 XL (68.2M parameters) scores highest. Results are from leaderboard.roboflow.com.

YOLOv8 comes in 5 sizes: Nano (1280×1280), Small (1280×1280), Medium (1280×1280), Large (1280×1280), XL (1280×1280). Smaller variants run faster on constrained hardware; larger ones trade speed for accuracy. You can switch sizes in the demo to compare them on the same image.

Yes. The demo on this page runs YOLOv8 in the free Roboflow Playground: upload an image and see results in seconds. A free account unlocks unlimited runs.