> ## Documentation Index
> Fetch the complete documentation index at: https://api-reference.scale.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uploading Predictions

After creating your `Prediction` objects, you just need to upload them to your Nucleus dataset by associating them with a model. This can be accomplished with a single call to [`Dataset.upload_predictions`](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.Dataset.upload_predictions). See example usage below.

We recommend setting `asynchronous=True` to drastically speed up the upload. This will also allow you to check on the job's status in the [dashboard](https://dashboard.scale.com/nucleus/jobs) or via the API (see our docs on [Async Jobs](https://api-reference.scale.com/docs/nucleus/async-jobs.md)).

```python theme={null}
import nucleus

# construct various predictions
box_pred_1 = nucleus.BoxPrediction(...)
box_pred_2 = nucleus.BoxPrediction(...)
polygon_pred = nucleus.PolygonPrediction(...)
line_pred = nucleus.LinePrediction(...)
cuboid_pred = nucleus.CuboidPrediction(...)
segmentation_pred = nucleus.SegmentationPrediction(...)

# fetch dataset and model
client = nucleus.NucleusClient("YOUR_SCALE_API_KEY")
dataset = client.get_dataset("YOUR_DATASET_ID")
model = client.get_model("YOUR_MODEL_ID")

# upload predictions to dataset
job = dataset.upload_predictions(
    model=model,
    predictions=[box_pred_1, box_pred_2, polygon_pred, line_pred, cuboid_pred, segmentation_pred],
    update=True,
    asynchronous=True
)
```
