# Export All Model Predictions

[block:callout]
{
  "type": "info",
  "title": "[Click for Python SDK](https://docs.nucleus.scale.com/en/latest/api/nucleus/index.html#nucleus.Dataset.export_predictions)",
  "body": "```\nDataset.export_predictions(\n    model: Model\n) -> List[Union[BoxPrediction, PolygonPrediction, CuboidPrediction, SegmentationPrediction]]\n```"
}
[/block]

This endpoint is for batch export. It may time out for extremely large datasets (>1M items), but we are working an asynchronous solution for this.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Nucleus API",
    "version": "1.1"
  },
  "servers": [
    {
      "url": "https://api.scale.com/v1/nucleus"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/dataset/{dataset_id}/model/{model_id}/export": {
      "get": {
        "summary": "Export All Model Predictions",
        "description": "",
        "operationId": "export-all-model-predictions",
        "parameters": [
          {
            "name": "dataset_id",
            "in": "path",
            "description": "The Scale-generated ID of the Dataset.",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "model_id",
            "in": "path",
            "description": "The Scale-generated ID of the Model.",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"annotations\": {\n    \"box\": [\n      {\n        \"label\": \"car\",\n        \"type\": \"box\",\n        \"geometry\": {\n          \"x\": 655.2,\n          \"y\": 269.3,\n          \"width\": 70.5,\n          \"height\": 50.5\n        },\n        \"reference_id\": \"image_0\",\n        \"confidence\": 0.86,\n        \"class_pdf\": {\n          \"car\": 0.86,\n          \"pedestrian\": 0.12,\n          \"bike\": 0.02\n        }\n      },\n      {\n        \"label\": \"pedestrian\",\n        \"type\": \"box\",\n        \"geometry\": {\n          \"x\": 734.7,\n          \"y\": 258.0,\n          \"width\": 139.6,\n          \"height\": 114.3\n        },\n        \"reference_id\": \"image_0\",\n        \"confidence\": 0.70,\n        \"class_pdf\": {\n          \"car\": 0.09,\n          \"pedestrian\": 0.70,\n          \"bike\": 0.21\n        }\n      }\n    ]\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "annotations": {
                      "type": "object",
                      "properties": {
                        "box": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "example": "car"
                              },
                              "type": {
                                "type": "string",
                                "example": "box"
                              },
                              "geometry": {
                                "type": "object",
                                "properties": {
                                  "x": {
                                    "type": "number",
                                    "example": 655.2,
                                    "default": 0
                                  },
                                  "y": {
                                    "type": "number",
                                    "example": 269.3,
                                    "default": 0
                                  },
                                  "width": {
                                    "type": "number",
                                    "example": 70.5,
                                    "default": 0
                                  },
                                  "height": {
                                    "type": "number",
                                    "example": 50.5,
                                    "default": 0
                                  }
                                }
                              },
                              "reference_id": {
                                "type": "string",
                                "example": "image_0"
                              },
                              "confidence": {
                                "type": "number",
                                "example": 0.86,
                                "default": 0
                              },
                              "class_pdf": {
                                "type": "object",
                                "properties": {
                                  "car": {
                                    "type": "number",
                                    "example": 0.86,
                                    "default": 0
                                  },
                                  "pedestrian": {
                                    "type": "number",
                                    "example": 0.12,
                                    "default": 0
                                  },
                                  "bike": {
                                    "type": "number",
                                    "example": 0.02,
                                    "default": 0
                                  }
                                }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "60a66ff6bfbc7000736519dd:61a6db8fe0f485031bef026f"
}
```