Extracting class names from yolov8 model

Hi, I just made a yolo model using roboflow,

and i want to extract the name of the class after object-detection in String on python.

But i cannot find the python api of roboflow

does anyone knows how or where can i look up?

I am using the tutorial python code so it looks like this

from roboflow import Roboflow

rf = Roboflow(api_key=“API”)

project = rf.workspace().project(“checkpoint”)

model = project.version(8).model

prediction = model.predict(“img.jpg”, confidence=40, overlap=30).json()](https://)

class_index = results.boxes.cls[i].item()

where ‘i’ is one of the detected objects will give you the id corresponding to your class names