# 非構造化モデルデプロイでの予測

> 非構造化モデルデプロイでの予測 - 指定されたエンドポイントを使用して、特定の非構造化モデルのデプロイで、ユーザー提供のデータに基づいて予測値を計算します。

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-07-27T18:44:30.270988+00:00` (UTC).

## Primary page

- [非構造化モデルデプロイでの予測](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md): Full documentation for this topic (Markdown sidecar).

## Sections on this page

- [リクエストパラメーター](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#request-parameters): In-page section heading.
- [ヘッダー](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#headers): In-page section heading.
- [引数のクエリ](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#query-arguments): In-page section heading.
- [本文](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#body): In-page section heading.
- [Response 200](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#response-200): In-page section heading.
- [エラーリスト](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred-unstructured.html.md#errors-list): In-page section heading.

## Documentation content

以下のエンドポイントを使用すると、特定の非構造化モデルデプロイで予測値を計算するために必要なデータを提供できます。 標準モデルで予測を行う必要がある場合は、 [デプロイでの予測](https://docs.datarobot.com/ja/docs/api/reference/predapi/legacy-predapi/pred-ref/dep-pred.html.md) を参照してください。

エンドポイント： `/deployments/<deploymentId>/predictionsUnstructured`

特定の非構造化モデルのデプロイで、ユーザー提供のデータに基づいて予測値を計算します。 このエンドポイントは、非構造化ターゲットタイプでデプロイされたカスタム推論モデルに対して のみ 機能します。 詳しくは、 [非構造化カスタムモデルの構築](https://docs.datarobot.com/ja/docs/api/code-first-tools/drum/unstructured-custom-models.html.md) をご覧ください。

このエンドポイントは次のことを行います。

- ターゲットのカスタム推論モデルで/predictUnstructuredルートを呼び出し、標準のDataRobot予測APIインターフェイスを逸脱する可能性があるカスタム要求および応答スキーマを使用できるようにします。
- ペイロードとコンテンツタイプ（指定されていればMIMEタイプと文字セット）をモデルに渡します。
- モデルから返されたペイロードを、コンテンツタイプ（指定されていればMIMEタイプと文字セット）とともに、呼び出し元に渡します。

[DRUMライブラリ](https://docs.datarobot.com/ja/docs/api/code-first-tools/drum/custom-model-drum.html.md) では、この呼び出しは [score_unstructured()フック](https://docs.datarobot.com/ja/docs/api/code-first-tools/drum/unstructured-custom-models.html.md#score) によって処理されます。

> [!NOTE] 備考
> デプロイIDは、 [デプロイ > 予測 > 予測API](https://docs.datarobot.com/ja/docs/classic-ui/predictions/realtime/code-py.html.md) タブのサンプルコード出力（ インターフェイス を「APIクライアント」に設定）で確認できます。

リクエストメソッド： `POST`

リクエストURL： デプロイ済みURL、例： `https://your-company.orm.datarobot.com/predApi/v1.0`

## リクエストパラメーター

### ヘッダー

| キー | 説明 | 例 |
| --- | --- | --- |
| Datarobot-key | マネージドAIプラットフォームユーザーに必須です。文字列タイプモデルがデプロイされたら、予測 > 予測APIで、DataRobot UIのコードスニペットを参照してください。 | DR-key-12345abcdb-xyz6789 |
| Authorization | 必須。文字列次の3つの方法がサポートされます。 Bearer認証 （使用非推奨）基本認証：User_emailおよびAPIトークン （使用非推奨）APIトークン | Bearer認証方法の例：Bearer API_key-12345abcdb-xyz6789 （使用非推奨）User_emailおよびAPIトークン方法の例：Basic Auth_basic-12345abcdb-xyz6789 （使用非推奨）APIトークン方法の例：Token API_key-12345abcdb-xyz6789 |
| Content-Type | オプション。文字列型 デフォルト：application/octet-stream 提供されたコンテンツタイプはすべてモデルに渡されます。ただし、DRUMライブラリには、指定された文字セットを使用したtextコンテンツタイプのためのデコードメカニズムが組み込まれています。 詳しくは、非構造化カスタムモデルの構築をご覧ください。 | text/plaintext/csvtext/plain; charset=latin1application/json; charset=UTF-8custom/typeapplication/octet-stream |
| Content-Encoding | オプション。文字列型現在、デフォルトのデータ拡張を含むgzipエンコーディングだけがサポートされています。 | gzip |
| Accept | オプション。文字列型 | */*（デフォルト）応答はモデルの出力によって定義されます。 |
|  |  |  |

### 引数のクエリ

現在、 `predictionsUnstructured` エンドポイントには対応していません。

### 本文

| データ | タイプ | 例 |
| --- | --- | --- |
| カスタムモデルに渡すデータ | 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>（画像データなど） |

## Response 200

HTTPレスポンスには、カスタムモデルの `/predictUnstructured` ルートによって返され、そのまま渡されるペイロードが含まれています。 `Content-Type` ヘッダーは、呼び出し元に渡されます。 `Content-Type` ヘッダーが提供されない場合、 `application/octet-stream` のデフォルトが適用されます。

リクエストにDataRobotが認識したエラーがあった場合、 `application/json` エラーメッセージが返されます。

[DRUMライブラリ](https://docs.datarobot.com/ja/docs/api/code-first-tools/drum/custom-model-drum.html.md) では、レスポンスペイロードとコンテンツタイプは [score_unstructured()フック](https://docs.datarobot.com/ja/docs/api/code-first-tools/drum/unstructured-custom-models.html.md#score) で生成されます。

## エラーリスト

| HTTPコード | サンプルエラーメッセージ | リーズン |
| --- | --- | --- |
| 400 BAD REQUEST | {"message":"Query parameters not accepted on this endpoint"} | リクエストはエンドポイントにクエリーパラメーターを渡しました。 |
| 404 NOT FOUND | {"message": "Deployment :deploymentId cannot be found for user :userId"} | リクエストは無効な:deploymentId（削除されたか存在しないデプロイ）を提供しました。 |
| 422 UNPROCESSABLE CONTENT | {"message": "Only unstructured custom models can be used with this endpoint. Use /predictions instead.} | リクエストは、非構造化カスタム推論モデルではないデプロイの:deploymentIdを提供しました。 |
