# Predictions for unstructured model deployments

> Predictions for unstructured model deployments - Using a specified endpoint, calculates predictions
> based on user-provided data for a specific unstructured model deployment.

This Markdown file sits beside the HTML page at the same path (with a `.md` suffix). It summarizes the topic and lists links for tools and LLM context.

Companion generated at `2026-05-06T18:17:09.621110+00:00` (UTC).

## Primary page

- [Predictions for unstructured model deployments](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html): Full documentation for this topic (HTML).

## Sections on this page

- [Request parameters](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#request-parameters): In-page section heading.
- [Headers](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#headers): In-page section heading.
- [Query arguments](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#query-arguments): In-page section heading.
- [Body](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#body): In-page section heading.
- [Response 200](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#response-200): In-page section heading.
- [Errors list](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html#errors-list): In-page section heading.

## Related documentation

- [Developer documentation](https://docs.datarobot.com/en/docs/api/index.html): Linked from this page.
- [API reference](https://docs.datarobot.com/en/docs/api/reference/index.html): Linked from this page.
- [Prediction API](https://docs.datarobot.com/en/docs/api/reference/predapi/index.html): Linked from this page.
- [Prediction API (Dedicated)](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/index.html): Linked from this page.
- [Dedicated Prediction API reference](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/index.html): Linked from this page.
- [Predictions for deployments](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred.html): Linked from this page.
- [Assemble unstructured custom models](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/unstructured-custom-models.html): Linked from this page.
- [DRUM library](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/custom-model-drum.html): Linked from this page.
- [Deployments > Predictions > Prediction API](https://docs.datarobot.com/en/docs/classic-ui/predictions/realtime/code-py.html): Linked from this page.

## Documentation content

Using the endpoint below, you can provide the data necessary to calculate predictions for a specific unstructured model deployment. If you need to make predictions for a standard model, see [Predictions for deployments](https://docs.datarobot.com/en/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred.html).

Endpoint: `/deployments/<deploymentId>/predictionsUnstructured`

Calculates predictions based on user-provided data for a specific unstructured model deployment. This endpoint works only for deployed custom inference models with an unstructured target type. For more information, see [Assemble unstructured custom models](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/unstructured-custom-models.html).

This endpoint does the following:

- Calls the/predictUnstructuredroute on the target custom inference model, allowing you to use the custom request and response schema, which may go beyond the standard DataRobot prediction API interface.
- Passes any payload and content type (MIME type and charset, if provided) to the model.
- Passes any model-returned payload, along with the content type (MIME type and charset, if provided), back to the caller.

In the [DRUM library](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/custom-model-drum.html), this call is handled by the [score_unstructured()hook](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/unstructured-custom-models.html#score).

> [!NOTE] Note
> You can find the deployment ID in the sample code output of the [Deployments > Predictions > Prediction API](https://docs.datarobot.com/en/docs/classic-ui/predictions/realtime/code-py.html) tab (with Interface set to API Client).

Request Method: `POST`

Request URL: deployed URL, for example: `https://your-company.orm.datarobot.com/predApi/v1.0`

## Request parameters

### Headers

| Key | Description | Example(s) |
| --- | --- | --- |
| Datarobot-key | Required for managed AI Platform users; string type Once a model is deployed, see the code snippet in the DataRobot UI, Predictions > Prediction API. | DR-key-12345abcdb-xyz6789 |
| Authorization | Required; string Three methods are supported: Bearer authentication (deprecated) Basic authentication: User_email and API token (deprecated) API token | Example for Bearer authentication method: Bearer API_key-12345abcdb-xyz6789(deprecated) Example for User_email and API token method: Basic Auth_basic-12345abcdb-xyz6789(deprecated) Example for API token method: Token API_key-12345abcdb-xyz6789 |
| Content-Type | Optional; string type Default: application/octet-stream Any provided content type is passed to the model; however, the DRUM library has a built-in decoding mechanism for text content-types using the specified charset. For more information, see Assemble unstructured custom models. | text/plaintext/csvtext/plain; charset=latin1application/json; charset=UTF-8custom/typeapplication/octet-stream |
| Content-Encoding | Optional; string type Currently supports only gzip-encoding with the default data extension. | gzip |
| Accept | Optional; string type | */* (default) The response is defined by the model output. |
|  |  |  |

### Query arguments

Currently not supported for the `predictionsUnstructured` endpoint.

### Body

| Data | Type | Example(s) |
| --- | --- | --- |
| Data to pass to the custom model | Bytes | PassengerId,Pclass,Name,Sex,Age,SibSp,Parch,Ticket,Fare,Cabin,Embarked 892,3,"Kelly, Mr. James",male,34.5,0,0,330911,7.8292,,Q 893,3,"Wilkes, Mrs. James (Ellen Needs)",female,47,1,0,363272,7,,S 894,2,"Myles, Mr. Thomas Francis",male,62,0,0,240276,9.6875,,Q{“data”: [{“some”: “json”}]}Custom payload 123<binary data> (for example, image data) |

## Response 200

The HTTP Response contains a payload returned by the custom model’s `/predictUnstructured` route and passed back as-is. The `Content-Type` header is passed to the caller. If the `Content-Type` header isn't provided, the `application/octet-stream` default is applied.

In the case of a DataRobot-acknowledged error in a request, an `application/json` error message is returned.

In the [DRUM library](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/custom-model-drum.html), the response payload and content type are generated by the [score_unstructured()hook](https://docs.datarobot.com/en/docs/api/code-first-tools/drum/unstructured-custom-models.html#score).

## Errors list

| HTTP Code | Sample error message | Reason(s) |
| --- | --- | --- |
| 400 BAD REQUEST | {"message":"Query parameters not accepted on this endpoint"} | The request passed query parameters to the endpoint. |
| 404 NOT FOUND | {"message": "Deployment :deploymentId cannot be found for user :userId"} | The request provided an invalid :deploymentId (a deleted or non-existent deployment). |
| 422 UNPROCESSABLE CONTENT | {"message": "Only unstructured custom models can be used with this endpoint. Use /predictions instead.} | The request provided a :deploymentId for a deployment that isn't an unstructured custom inference model deployment. |
