Files
dify-docs/ja/api-reference/openapi_workflow.json
T
RiskeyL e5e1d4da67 docs: adopt upstream main PRs into audience-products structure
Bring in changes merged to main since the branch point: API reference and plugin development updates, the plugin sidebar reorganization with a new choose-plugin-type page, backport tooling, workflow node content updates, and refreshed skill, glossary, and translation config files. Content updates are applied to both Cloud and Self-Host copies and to zh and ja.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 14:24:15 +08:00

4351 lines
176 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"openapi": "3.0.1",
"info": {
"title": "ワークフローアプリAPI",
"description": "ワークフローアプリケーションはセッションなしの動作をサポートし、翻訳、記事作成、要約 AI などに最適です。",
"version": "1.0.0"
},
"servers": [
{
"url": "https://{api_base_url}",
"description": "Workflow App API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。",
"variables": {
"api_base_url": {
"default": "api.dify.ai/v1",
"description": "API ベース URL のホストとパス(`https://` を除く)。"
}
}
}
],
"security": [
{
"ApiKeyAuth": []
}
],
"paths": {
"/workflows/run": {
"post": {
"summary": "ワークフローを実行",
"description": "ワークフローを実行します。公開済みのワークフローがないと実行できません。",
"operationId": "executeWorkflowJp",
"tags": [
"ワークフロー"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowExecutionRequest"
},
"examples": {
"streaming_example": {
"summary": "リクエスト例 - ストリーミングモード",
"value": {
"inputs": {
"query": "Summarize this text: The quick brown fox jumps over the lazy dog."
},
"response_mode": "streaming",
"user": "user_workflow_123"
}
},
"blocking_example": {
"summary": "リクエスト例 - ブロッキングモード",
"value": {
"inputs": {
"query": "Translate this to French: Hello world"
},
"response_mode": "blocking",
"user": "user_workflow_456"
}
},
"with_file_array_variable": {
"summary": "Request Example - File array input",
"value": {
"inputs": {
"my_documents": [
{
"type": "document",
"transfer_method": "local_file",
"upload_file_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
},
{
"type": "image",
"transfer_method": "remote_url",
"url": "https://example.com/image.jpg"
}
]
},
"response_mode": "blocking",
"user": "user_workflow_789"
}
}
}
}
}
},
"responses": {
"200": {
"description": "リクエスト成功。コンテンツタイプと構造はリクエストの `response_mode` パラメータに依存します。\n\n- `response_mode` が `blocking` の場合、 `application/json` で `WorkflowBlockingResponse` オブジェクトを返します。\n- `response_mode` が `streaming` の場合、 `text/event-stream` で `ChunkWorkflowEvent` オブジェクトのストリームを返します。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowBlockingResponse"
},
"examples": {
"blockingResponse": {
"summary": "レスポンス例 - ブロッキングモード",
"value": {
"task_id": "c3800678-a077-43df-a102-53f23ed20b88",
"workflow_run_id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"data": {
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"workflow_id": "7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345",
"status": "succeeded",
"outputs": {
"result": "Bonjour le monde"
},
"error": null,
"elapsed_time": 1.23,
"total_tokens": 150,
"total_steps": 3,
"created_at": 1705407629,
"finished_at": 1705407630
}
}
}
}
},
"text/event-stream": {
"schema": {
"type": "string",
"description": "Server-Sent Events (SSE) のストリーム。\n\n**パース**:各行は `data: ` で始まり JSON オブジェクトが続き、`\\n\\n` で終了します。JSON をパースする前に `data: ` プレフィックスを除去し、`event` フィールドを読み取ってイベントタイプを判定してください。`ping` イベント(接続維持のため 10 秒ごとに送信)は無視してください。\n\n**ストリームライフサイクル**`workflow_finished`、`workflow_paused`、または `error` イベントを受信するとストリームが閉じます。エラーはストリーム内の `error` イベントとして HTTP ステータス `200` で配信されます。ステータスコードではなくイベントペイロードを確認して詳細を取得してください。\n\n**人間の入力イベント**\n- `human_input_required`:ワークフローが人間の入力ノードに到達した際に `workflow_paused` と同時に発行されます。ペイロードの `form_token` を使用して、[人間の入力 API](/api-reference/人間の入力/人間の入力フォームを取得) でフォーム処理を進めます。\n- `human_input_form_filled`:受信者がフォームを送信し、ワークフロー実行が再開されます。\n- `human_input_form_timeout`:応答がないままフォームが期限切れ。タイムアウトのフォールバックエッジが定義されている場合、ワークフローはそのエッジを通って実行されます。"
},
"examples": {
"streamingResponse": {
"summary": "レスポンス例 - ストリーミングモード",
"value": "data: {\"event\": \"workflow_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"workflow_id\": \"7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345\", \"inputs\": {\"query\": \"Translate this\"}, \"created_at\": 1705407629, \"reason\": \"initial\"}} data: {\"event\": \"node_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"node_exec_1\", \"node_id\": \"node_1\", \"node_type\": \"llm\", \"title\": \"LLM Node\", \"index\": 1, \"created_at\": 1705407629}} data: {\"event\": \"text_chunk\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"text\": \"Bonjour\", \"from_variable_selector\": [\"node_1\", \"text\"]}} data: {\"event\": \"workflow_finished\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"workflow_id\": \"7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345\", \"status\": \"succeeded\", \"outputs\": {\"result\": \"Bonjour le monde\"}, \"elapsed_time\": 1.23, \"total_tokens\": 150, \"total_steps\": 3, \"created_at\": 1705407629, \"finished_at\": 1705407630}}"
},
"humanInputPause": {
"summary": "レスポンス例 - 人間の入力での一時停止",
"value": "data: {\"event\": \"workflow_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"workflow_id\": \"7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345\", \"inputs\": {\"draft\": \"Hello\"}, \"created_at\": 1705407629, \"reason\": \"initial\"}} data: {\"event\": \"human_input_required\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"form_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\", \"form_token\": \"tok_abc123\", \"node_id\": \"approval_node\", \"node_title\": \"Approval\", \"form_content\": \"Please review the draft.\", \"inputs\": [{\"type\": \"text_input\", \"output_variable_name\": \"comment\", \"default\": null}], \"actions\": [{\"id\": \"approve\", \"title\": \"Approve\", \"button_style\": \"primary\"}], \"display_in_ui\": false, \"resolved_default_values\": {\"comment\": \"\"}, \"expiration_time\": 1705494029}} data: {\"event\": \"workflow_paused\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"status\": \"paused\", \"created_at\": 1705407629, \"elapsed_time\": 0.5}}"
}
}
}
}
},
"400": {
"description": "- `not_workflow_app` : App mode does not match the API route.\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルは利用できません。\n- `completion_request_error` : Workflow execution request failed.\n- `invalid_param` : Invalid parameter value.",
"content": {
"application/json": {
"examples": {
"not_workflow_app": {
"summary": "not_workflow_app",
"value": {
"status": 400,
"code": "not_workflow_app",
"message": "Please check if your app mode matches the right API route."
}
},
"provider_not_initialize": {
"summary": "provider_not_initialize",
"value": {
"status": 400,
"code": "provider_not_initialize",
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
}
},
"provider_quota_exceeded": {
"summary": "provider_quota_exceeded",
"value": {
"status": 400,
"code": "provider_quota_exceeded",
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
}
},
"model_currently_not_support": {
"summary": "model_currently_not_support",
"value": {
"status": 400,
"code": "model_currently_not_support",
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
}
},
"completion_request_error": {
"summary": "completion_request_error",
"value": {
"status": 400,
"code": "completion_request_error",
"message": "Completion request failed."
}
},
"invalid_param": {
"summary": "invalid_param",
"value": {
"status": 400,
"code": "invalid_param",
"message": "Arg user must be provided."
}
}
}
}
}
},
"429": {
"description": "- `too_many_requests` : このアプリケーションへの同時リクエストが多すぎます。\n- `rate_limit_error` : アップストリームのモデルプロバイダーのレート制限を超えました。",
"content": {
"application/json": {
"examples": {
"too_many_requests": {
"summary": "too_many_requests",
"value": {
"status": 429,
"code": "too_many_requests",
"message": "Too many requests. Please try again later."
}
},
"rate_limit_error": {
"summary": "rate_limit_error",
"value": {
"status": 429,
"code": "rate_limit_error",
"message": "Rate Limit Error"
}
}
}
}
}
},
"500": {
"description": "`internal_server_error` : 内部サーバーエラー。",
"content": {
"application/json": {
"examples": {
"internal_server_error": {
"summary": "internal_server_error",
"value": {
"status": 500,
"code": "internal_server_error",
"message": "Internal Server Error."
}
}
}
}
}
}
}
}
},
"/workflows/{workflow_id}/run": {
"post": {
"summary": "ID でワークフローを実行",
"description": "ID で指定された特定のワークフローバージョンを実行します。ワークフローの特定の公開バージョンを実行する場合に便利です。",
"operationId": "runWorkflowByIdJa",
"tags": [
"ワークフロー"
],
"parameters": [
{
"name": "workflow_id",
"in": "path",
"required": true,
"description": "実行する特定バージョンのワークフロー ID です。この値は [ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) のレスポンスおよび [ワークフロー実行詳細を取得](/api-reference/ワークフロー/ワークフロー実行詳細を取得) の `workflow_id` フィールドで返されます。",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowExecutionRequest"
},
"examples": {
"example": {
"summary": "リクエスト例",
"value": {
"inputs": {
"query": "Summarize this article"
},
"response_mode": "blocking",
"user": "user_workflow_123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "リクエスト成功。コンテンツタイプと構造はリクエストの `response_mode` パラメータに依存します。\n\n- `response_mode` が `blocking` の場合、 `application/json` で `WorkflowBlockingResponse` オブジェクトを返します。\n- `response_mode` が `streaming` の場合、 `text/event-stream` で `ChunkWorkflowEvent` オブジェクトのストリームを返します。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowBlockingResponse"
},
"examples": {
"blockingResponse": {
"summary": "レスポンス例 - ブロッキングモード",
"value": {
"task_id": "c3800678-a077-43df-a102-53f23ed20b88",
"workflow_run_id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"data": {
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"workflow_id": "7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345",
"status": "succeeded",
"outputs": {
"result": "Article summary here"
},
"error": null,
"elapsed_time": 2.45,
"total_tokens": 280,
"total_steps": 4,
"created_at": 1705407629,
"finished_at": 1705407631
}
}
}
}
},
"text/event-stream": {
"schema": {
"type": "string",
"description": "Server-Sent Events (SSE) のストリーム。\n\n**パース**:各行は `data: ` で始まり JSON オブジェクトが続き、`\\n\\n` で終了します。JSON をパースする前に `data: ` プレフィックスを除去し、`event` フィールドを読み取ってイベントタイプを判定してください。`ping` イベント(接続維持のため 10 秒ごとに送信)は無視してください。\n\n**ストリームライフサイクル**`workflow_finished`、`workflow_paused`、または `error` イベントを受信するとストリームが閉じます。エラーはストリーム内の `error` イベントとして HTTP ステータス `200` で配信されます。ステータスコードではなくイベントペイロードを確認して詳細を取得してください。\n\n**人間の入力イベント**\n- `human_input_required`:ワークフローが人間の入力ノードに到達した際に `workflow_paused` と同時に発行されます。ペイロードの `form_token` を使用して、[人間の入力 API](/api-reference/人間の入力/人間の入力フォームを取得) でフォーム処理を進めます。\n- `human_input_form_filled`:受信者がフォームを送信し、ワークフロー実行が再開されます。\n- `human_input_form_timeout`:応答がないままフォームが期限切れ。タイムアウトのフォールバックエッジが定義されている場合、ワークフローはそのエッジを通って実行されます。"
},
"examples": {
"humanInputPause": {
"summary": "レスポンス例 - 人間の入力での一時停止",
"value": "data: {\"event\": \"workflow_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"workflow_id\": \"7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345\", \"inputs\": {\"draft\": \"Hello\"}, \"created_at\": 1705407629, \"reason\": \"initial\"}} data: {\"event\": \"human_input_required\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"form_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\", \"form_token\": \"tok_abc123\", \"node_id\": \"approval_node\", \"node_title\": \"Approval\", \"form_content\": \"Please review the draft.\", \"inputs\": [{\"type\": \"text_input\", \"output_variable_name\": \"comment\", \"default\": null}], \"actions\": [{\"id\": \"approve\", \"title\": \"Approve\", \"button_style\": \"primary\"}], \"display_in_ui\": false, \"resolved_default_values\": {\"comment\": \"\"}, \"expiration_time\": 1705494029}} data: {\"event\": \"workflow_paused\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"status\": \"paused\", \"created_at\": 1705407629, \"elapsed_time\": 0.5}}"
}
}
}
}
},
"400": {
"description": "- `not_workflow_app` : App mode does not match the API route.\n- `bad_request` : Workflow is a draft or has an invalid ID format.\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルは利用できません。\n- `completion_request_error` : Workflow execution request failed.\n- `invalid_param` : Required parameter missing or invalid.",
"content": {
"application/json": {
"examples": {
"not_workflow_app": {
"summary": "not_workflow_app",
"value": {
"status": 400,
"code": "not_workflow_app",
"message": "Please check if your app mode matches the right API route."
}
},
"bad_request": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "Workflow is a draft and cannot be executed."
}
},
"provider_not_initialize": {
"summary": "provider_not_initialize",
"value": {
"status": 400,
"code": "provider_not_initialize",
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
}
},
"provider_quota_exceeded": {
"summary": "provider_quota_exceeded",
"value": {
"status": 400,
"code": "provider_quota_exceeded",
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
}
},
"model_currently_not_support": {
"summary": "model_currently_not_support",
"value": {
"status": 400,
"code": "model_currently_not_support",
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
}
},
"completion_request_error": {
"summary": "completion_request_error",
"value": {
"status": 400,
"code": "completion_request_error",
"message": "Completion request failed."
}
},
"invalid_param": {
"summary": "invalid_param",
"value": {
"status": 400,
"code": "invalid_param",
"message": "Arg user must be provided."
}
}
}
}
}
},
"404": {
"description": "`not_found` : ワークフローが見つかりません。",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Workflow not found."
}
}
}
}
}
},
"429": {
"description": "- `too_many_requests` : このアプリケーションへの同時リクエストが多すぎます。\n- `rate_limit_error` : アップストリームのモデルプロバイダーのレート制限を超えました。",
"content": {
"application/json": {
"examples": {
"too_many_requests": {
"summary": "too_many_requests",
"value": {
"status": 429,
"code": "too_many_requests",
"message": "Too many requests. Please try again later."
}
},
"rate_limit_error": {
"summary": "rate_limit_error",
"value": {
"status": 429,
"code": "rate_limit_error",
"message": "Rate Limit Error"
}
}
}
}
}
},
"500": {
"description": "`internal_server_error` : 内部サーバーエラー。",
"content": {
"application/json": {
"examples": {
"internal_server_error": {
"summary": "internal_server_error",
"value": {
"status": 500,
"code": "internal_server_error",
"message": "Internal Server Error."
}
}
}
}
}
}
}
}
},
"/workflows/run/{workflow_run_id}": {
"get": {
"summary": "ワークフロー実行詳細を取得",
"description": "ワークフロー実行 ID に基づいて、ワークフロータスクの現在の実行結果を取得します。",
"operationId": "getWorkflowRunDetailJp",
"tags": [
"ワークフロー"
],
"parameters": [
{
"name": "workflow_run_id",
"in": "path",
"required": true,
"description": "ワークフロー実行 ID です。ワークフロー実行レスポンスまたはストリーミングイベントから取得できます。",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "ワークフロー実行の詳細の取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowRunDetailResponse"
},
"examples": {
"workflowRunDetail": {
"summary": "レスポンス例",
"value": {
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"workflow_id": "7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345",
"status": "succeeded",
"inputs": {
"query": "Translate this to French"
},
"outputs": {
"result": "Traduisez ceci en francais"
},
"error": null,
"total_steps": 3,
"total_tokens": 150,
"created_at": 1705407629,
"finished_at": 1705407630,
"elapsed_time": 1.23
}
}
}
}
}
},
"400": {
"description": "`not_workflow_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_workflow_app": {
"summary": "not_workflow_app",
"value": {
"status": 400,
"code": "not_workflow_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : ワークフロー実行記録が見つかりません。",
"content": {
"application/json": {
"examples": {
"workflow_run_not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Workflow run not found."
}
}
}
}
}
}
}
}
},
"/workflows/logs": {
"get": {
"summary": "ワークフローログ一覧を取得",
"description": "フィルタリングオプション付きでワークフロー実行ログをページネーションで取得します。",
"operationId": "getWorkflowLogsJp",
"tags": [
"ワークフロー"
],
"parameters": [
{
"name": "keyword",
"in": "query",
"description": "ログ内を検索するキーワードです。",
"schema": {
"type": "string"
}
},
{
"name": "status",
"in": "query",
"description": "実行ステータスでフィルタリングします。",
"schema": {
"type": "string",
"enum": [
"succeeded",
"failed",
"stopped"
]
}
},
{
"name": "page",
"in": "query",
"description": "ページネーションのページ番号。",
"schema": {
"type": "integer",
"default": 1,
"minimum": 1,
"maximum": 99999
}
},
{
"name": "limit",
"in": "query",
"description": "1 ページあたりの件数です。",
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 100
}
},
{
"name": "created_at__before",
"in": "query",
"description": "この ISO 8601 タイムスタンプ以前に作成されたログをフィルタリングします。",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "created_at__after",
"in": "query",
"description": "この ISO 8601 タイムスタンプ以降に作成されたログをフィルタリングします。",
"schema": {
"type": "string",
"format": "date-time"
}
},
{
"name": "created_by_end_user_session_id",
"in": "query",
"description": "エンドユーザーセッション ID でフィルタリングします。",
"schema": {
"type": "string"
}
},
{
"name": "created_by_account",
"in": "query",
"description": "アカウント ID でフィルタリングします。",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "ワークフローログの取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowLogsResponse"
},
"examples": {
"workflowLogs": {
"summary": "レスポンス例",
"value": {
"page": 1,
"limit": 20,
"total": 1,
"has_more": false,
"data": [
{
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
"workflow_run": {
"id": "fb47b2e6-5e43-4f90-be01-d5c5a088d156",
"version": "2025-01-16 12:00:00.000000",
"status": "succeeded",
"error": null,
"elapsed_time": 1.23,
"total_tokens": 150,
"total_steps": 3,
"created_at": 1705407629,
"finished_at": 1705407630,
"exceptions_count": 0,
"triggered_from": "app"
},
"created_from": "service-api",
"created_by_role": "end_user",
"created_by_account": null,
"created_by_end_user": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"type": "service_api",
"is_anonymous": false,
"session_id": "user_workflow_123"
},
"created_at": 1705407629
}
]
}
}
}
}
}
}
}
}
},
"/workflows/tasks/{task_id}/stop": {
"post": {
"summary": "ワークフロータスクを停止",
"description": "実行中のワークフロータスクを停止します。`streaming` モードでのみサポートされます。",
"operationId": "stopWorkflowTaskGenerationJp",
"tags": [
"ワークフロー"
],
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"description": "タスク ID です。[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) API のストリーミングチャンクレスポンスから取得できます。",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"user"
],
"properties": {
"user": {
"type": "string",
"description": "ユーザー識別子です。[ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) リクエストで渡したユーザーと一致する必要があります。"
}
}
},
"examples": {
"example": {
"summary": "リクエスト例",
"value": {
"user": "user_workflow_123"
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/SuccessResult"
},
"400": {
"description": "- `not_workflow_app` : アプリモードが API ルートと一致しません。\n- `invalid_param` : 必須パラメータが不足しているか無効です。",
"content": {
"application/json": {
"examples": {
"not_workflow_app": {
"summary": "not_workflow_app",
"value": {
"status": 400,
"code": "not_workflow_app",
"message": "Please check if your app mode matches the right API route."
}
},
"invalid_param": {
"summary": "invalid_param",
"value": {
"status": 400,
"code": "invalid_param",
"message": "Arg user must be provided."
}
}
}
}
}
}
}
}
},
"/files/upload": {
"post": {
"operationId": "uploadWorkflowFileJp",
"tags": [
"ファイル操作"
],
"summary": "ファイルをアップロード",
"description": "メッセージ送信時に使用するファイルをアップロードします。画像、ドキュメント、音声、動画のマルチモーダル理解が可能です。アップロードされたファイルは現在のエンドユーザーのみが使用できます。",
"requestBody": {
"description": "ファイルアップロードリクエスト。multipart/form-data 形式が必要です。",
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"file",
"user"
],
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "アップロードするファイル。サポートされるタイプには画像、ドキュメント、音声、動画が含まれます。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。開発者のルールで定義され、アプリケーション内で一意である必要があります。Service API と WebApp のユーザー ID は独立しており、値が同じでも同じユーザーを指しません。"
}
}
}
}
}
},
"responses": {
"201": {
"description": "ファイルが正常にアップロードされました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FileUploadResponse"
},
"examples": {
"uploadSuccess": {
"summary": "レスポンス例",
"value": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"name": "product-photo.png",
"size": 204800,
"extension": "png",
"mime_type": "image/png",
"created_by": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"created_at": 1705407629,
"preview_url": null,
"source_url": null,
"original_url": null,
"user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"conversation_id": null,
"file_key": "uploads/product-photo.png"
}
}
}
}
}
},
"400": {
"description": "- `no_file_uploaded` : リクエストにファイルが提供されていません。\n- `too_many_files` : 1 回のリクエストにつき 1 ファイルのみ許可されています。\n- `filename_not_exists_error` : アップロードされたファイルにファイル名がありません。",
"content": {
"application/json": {
"examples": {
"no_file_uploaded": {
"summary": "no_file_uploaded",
"value": {
"status": 400,
"code": "no_file_uploaded",
"message": "Please upload your file."
}
},
"too_many_files": {
"summary": "too_many_files",
"value": {
"status": 400,
"code": "too_many_files",
"message": "Only one file is allowed."
}
},
"filename_not_exists_error": {
"summary": "filename_not_exists_error",
"value": {
"status": 400,
"code": "filename_not_exists_error",
"message": "The specified filename does not exist."
}
}
}
}
}
},
"413": {
"description": "`file_too_large` : ファイルサイズの上限を超えています。",
"content": {
"application/json": {
"examples": {
"file_too_large": {
"summary": "file_too_large",
"value": {
"status": 413,
"code": "file_too_large",
"message": "File size exceeded."
}
}
}
}
}
},
"415": {
"description": "`unsupported_file_type` : 許可されていないファイルタイプです。",
"content": {
"application/json": {
"examples": {
"unsupported_file_type": {
"summary": "unsupported_file_type",
"value": {
"status": 415,
"code": "unsupported_file_type",
"message": "File type not allowed."
}
}
}
}
}
}
}
}
},
"/files/{file_id}/preview": {
"get": {
"operationId": "downloadWorkflowFileJa",
"tags": [
"ファイル操作"
],
"summary": "ファイルをダウンロード",
"description": "以前[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API 経由でアップロードされたファイルをプレビューまたはダウンロードします。ファイルは、リクエスト元のアプリケーション内のメッセージに属する場合のみアクセスできます。",
"parameters": [
{
"name": "file_id",
"in": "path",
"required": true,
"description": "プレビューするファイルの一意の識別子です。[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API のレスポンスから取得します。",
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "as_attachment",
"in": "query",
"required": false,
"description": "`true` の場合、ブラウザでプレビューする代わりにファイルを添付ファイルとして強制ダウンロードします。",
"schema": {
"type": "boolean",
"default": false
}
},
{
"name": "user",
"in": "query",
"required": false,
"description": "ユーザー識別子。エンドユーザーのコンテキストに使用されます。",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "生のファイルコンテンツを返します。`Content-Type` ヘッダーはファイルの MIME タイプに設定されます。`as_attachment` が `true` の場合、ファイルは `Content-Disposition: attachment` としてダウンロード形式で返されます。",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"403": {
"description": "`file_access_denied` : リクエストされたファイルへのアクセスが拒否されました。",
"content": {
"application/json": {
"examples": {
"file_access_denied": {
"summary": "file_access_denied",
"value": {
"status": 403,
"code": "file_access_denied",
"message": "Access to the requested file is denied."
}
}
}
}
}
},
"404": {
"description": "`file_not_found` : リクエストされたファイルが見つかりません。",
"content": {
"application/json": {
"examples": {
"file_not_found": {
"summary": "file_not_found",
"value": {
"status": 404,
"code": "file_not_found",
"message": "The requested file was not found."
}
}
}
}
}
}
}
}
},
"/end-users/{end_user_id}": {
"get": {
"operationId": "getEndUserWorkflowJp",
"tags": [
"エンドユーザー"
],
"summary": "エンドユーザー取得",
"description": "ID を指定してエンドユーザーを取得します。他の API がエンドユーザー ID を返す場合(例:[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード)の `created_by`)に便利です。",
"parameters": [
{
"name": "end_user_id",
"in": "path",
"required": true,
"description": "エンドユーザー ID。",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "エンドユーザーを正常に取得しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EndUserDetail"
},
"examples": {
"endUserDetail": {
"summary": "レスポンス例",
"value": {
"id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"type": "service_api",
"external_user_id": "abc-123",
"name": null,
"is_anonymous": false,
"session_id": "abc-123",
"created_at": "2024-01-16T12:00:29Z",
"updated_at": "2024-01-16T12:00:29Z"
}
}
}
}
}
},
"404": {
"description": "`end_user_not_found` : エンドユーザーが見つかりません。",
"content": {
"application/json": {
"examples": {
"end_user_not_found": {
"summary": "end_user_not_found",
"value": {
"status": 404,
"code": "end_user_not_found",
"message": "End user not found."
}
}
}
}
}
}
}
}
},
"/audio-to-text": {
"post": {
"operationId": "workflowAudioToTextJa",
"tags": [
"音声・テキスト変換"
],
"summary": "音声をテキストに変換",
"description": "音声ファイルをテキストに変換します。サポートされる形式:`mp3`、`mp4`、`mpeg`、`mpga`、`m4a`、`wav`、`webm`。ファイルサイズの上限は `30 MB` です。",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/AudioToTextRequest"
}
}
}
},
"responses": {
"200": {
"description": "音声からテキストへの変換に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AudioToTextResponse"
},
"examples": {
"audioToTextSuccess": {
"summary": "レスポンス例",
"value": {
"text": "Hello, I would like to know more about the iPhone 13 Pro Max."
}
}
}
}
}
},
"400": {
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `no_audio_uploaded` : 音声ファイルがアップロードされていません。\n- `provider_not_support_speech_to_text` : モデルプロバイダーが音声認識をサポートしていません。\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルはこの操作をサポートしていません。\n- `completion_request_error` : 音声認識リクエストに失敗しました。",
"content": {
"application/json": {
"examples": {
"app_unavailable": {
"summary": "app_unavailable",
"value": {
"status": 400,
"code": "app_unavailable",
"message": "App unavailable, please check your app configurations."
}
},
"no_audio_uploaded": {
"summary": "no_audio_uploaded",
"value": {
"status": 400,
"code": "no_audio_uploaded",
"message": "Please upload your audio."
}
},
"provider_not_support_speech_to_text": {
"summary": "provider_not_support_speech_to_text",
"value": {
"status": 400,
"code": "provider_not_support_speech_to_text",
"message": "Provider not support speech to text."
}
},
"provider_not_initialize": {
"summary": "provider_not_initialize",
"value": {
"status": 400,
"code": "provider_not_initialize",
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
}
},
"provider_quota_exceeded": {
"summary": "provider_quota_exceeded",
"value": {
"status": 400,
"code": "provider_quota_exceeded",
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
}
},
"model_currently_not_support": {
"summary": "model_currently_not_support",
"value": {
"status": 400,
"code": "model_currently_not_support",
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
}
},
"completion_request_error": {
"summary": "completion_request_error",
"value": {
"status": 400,
"code": "completion_request_error",
"message": "Completion request failed."
}
}
}
}
}
},
"413": {
"description": "`audio_too_large` : 音声ファイルサイズが上限を超えています。",
"content": {
"application/json": {
"examples": {
"audio_too_large": {
"summary": "audio_too_large",
"value": {
"status": 413,
"code": "audio_too_large",
"message": "Audio size exceeded."
}
}
}
}
}
},
"415": {
"description": "`unsupported_audio_type` : 許可されていない音声タイプです。",
"content": {
"application/json": {
"examples": {
"unsupported_audio_type": {
"summary": "unsupported_audio_type",
"value": {
"status": 415,
"code": "unsupported_audio_type",
"message": "Audio type not allowed."
}
}
}
}
}
},
"500": {
"description": "`internal_server_error` : 内部サーバーエラー。",
"content": {
"application/json": {
"examples": {
"internal_server_error": {
"summary": "internal_server_error",
"value": {
"status": 500,
"code": "internal_server_error",
"message": "Internal server error."
}
}
}
}
}
}
}
}
},
"/text-to-audio": {
"post": {
"operationId": "workflowTextToAudioJa",
"tags": [
"音声・テキスト変換"
],
"summary": "テキストを音声に変換",
"description": "テキストを音声に変換します。",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TextToAudioRequest"
},
"examples": {
"textToAudioExample": {
"summary": "リクエスト例",
"value": {
"text": "Hello, welcome to our service.",
"user": "abc-123",
"voice": "alloy",
"streaming": false
}
}
}
}
}
},
"responses": {
"200": {
"description": "生成された音声ファイルを返します。`Content-Type` ヘッダーは音声の MIME タイプ(例:`audio/wav`、`audio/mp3`)に設定されます。`streaming` が `true` の場合、音声はチャンク転送エンコーディングでストリーミングされます。",
"content": {
"audio/mpeg": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `provider_not_initialize` : 有効なモデルプロバイダーの認証情報が見つかりません。\n- `provider_quota_exceeded` : モデルプロバイダーのクォータが使い切られました。\n- `model_currently_not_support` : 現在のモデルはこの操作をサポートしていません。\n- `completion_request_error` : テキスト読み上げリクエストに失敗しました。",
"content": {
"application/json": {
"examples": {
"app_unavailable": {
"summary": "app_unavailable",
"value": {
"status": 400,
"code": "app_unavailable",
"message": "App unavailable, please check your app configurations."
}
},
"provider_not_initialize": {
"summary": "provider_not_initialize",
"value": {
"status": 400,
"code": "provider_not_initialize",
"message": "No valid model provider credentials found. Please go to Settings -> Model Provider to complete your provider credentials."
}
},
"provider_quota_exceeded": {
"summary": "provider_quota_exceeded",
"value": {
"status": 400,
"code": "provider_quota_exceeded",
"message": "Your quota for Dify Hosted OpenAI has been exhausted. Please go to Settings -> Model Provider to complete your own provider credentials."
}
},
"model_currently_not_support": {
"summary": "model_currently_not_support",
"value": {
"status": 400,
"code": "model_currently_not_support",
"message": "Dify Hosted OpenAI trial currently not support the GPT-4 model."
}
},
"completion_request_error": {
"summary": "completion_request_error",
"value": {
"status": 400,
"code": "completion_request_error",
"message": "Completion request failed."
}
}
}
}
}
},
"500": {
"description": "`internal_server_error` : 内部サーバーエラー。",
"content": {
"application/json": {
"examples": {
"internal_server_error": {
"summary": "internal_server_error",
"value": {
"status": 500,
"code": "internal_server_error",
"message": "Internal server error."
}
}
}
}
}
}
}
}
},
"/info": {
"get": {
"operationId": "getWorkflowAppInfoJp",
"tags": [
"アプリケーション設定"
],
"summary": "アプリケーションの基本情報を取得",
"description": "このアプリケーションの基本情報(名前、説明、タグ、モード)を取得します。",
"responses": {
"200": {
"description": "アプリケーションの基本情報。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppInfoResponse"
},
"examples": {
"appInfo": {
"summary": "レスポンス例",
"value": {
"name": "My Workflow App",
"description": "便利なカスタマーサービスチャットボット。",
"tags": [
"customer-service",
"chatbot"
],
"mode": "workflow",
"author_name": "Dify Team"
}
}
}
}
}
}
}
}
},
"/parameters": {
"get": {
"operationId": "getWorkflowAppParametersJp",
"tags": [
"アプリケーション設定"
],
"summary": "アプリケーションのパラメータ情報を取得",
"description": "アプリケーションの入力フォーム設定(機能スイッチ、入力パラメータ名、タイプ、デフォルト値)を取得します。",
"responses": {
"200": {
"description": "アプリケーションパラメータ情報。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkflowAppParametersResponse"
},
"examples": {
"appParameters": {
"summary": "レスポンス例",
"value": {
"opening_statement": "Hello! How can I help you today?",
"suggested_questions": [
"What can you do?",
"Tell me about your features."
],
"suggested_questions_after_answer": {
"enabled": true
},
"speech_to_text": {
"enabled": false
},
"text_to_speech": {
"enabled": false,
"voice": "alloy",
"language": "en-US",
"autoPlay": "disabled"
},
"retriever_resource": {
"enabled": true
},
"annotation_reply": {
"enabled": false
},
"more_like_this": {
"enabled": false
},
"sensitive_word_avoidance": {
"enabled": false
},
"user_input_form": [
{
"text-input": {
"label": "City",
"variable": "city",
"required": true,
"default": ""
}
}
],
"file_upload": {
"image": {
"enabled": true,
"number_limits": 3,
"detail": "high",
"transfer_methods": [
"remote_url",
"local_file"
]
}
},
"system_parameters": {
"file_size_limit": 15,
"image_file_size_limit": 10,
"audio_file_size_limit": 50,
"video_file_size_limit": 100,
"workflow_file_upload_limit": 10
}
}
}
}
}
}
},
"400": {
"description": "`app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。",
"content": {
"application/json": {
"examples": {
"app_unavailable": {
"summary": "app_unavailable",
"value": {
"status": 400,
"code": "app_unavailable",
"message": "App unavailable, please check your app configurations."
}
}
}
}
}
}
}
}
},
"/meta": {
"get": {
"operationId": "getWorkflowAppMetaJa",
"tags": [
"アプリケーション設定"
],
"summary": "アプリケーションのメタ情報を取得",
"description": "このアプリケーションのメタデータ(ツールアイコンやその他の設定詳細)を取得します。",
"responses": {
"200": {
"description": "アプリケーションのメタ情報を正常に取得しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppMetaResponse"
},
"examples": {
"appMeta": {
"summary": "レスポンス例",
"value": {
"tool_icons": {
"dalle3": "https://example.com/icons/dalle3.png",
"calculator": {
"background": "#4A90D9",
"content": "🧮"
}
}
}
}
}
}
}
}
}
}
},
"/site": {
"get": {
"operationId": "getWorkflowWebAppSettingsJp",
"tags": [
"アプリケーション設定"
],
"summary": "アプリの WebApp 設定を取得",
"description": "このアプリケーションの WebApp 設定(サイト設定、テーマ、カスタマイズオプション)を取得します。",
"responses": {
"200": {
"description": "アプリケーションの WebApp 設定。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WebAppSettingsResponse"
},
"examples": {
"webAppSettings": {
"summary": "レスポンス例",
"value": {
"title": "My Chat App",
"chat_color_theme": "#4A90D9",
"chat_color_theme_inverted": false,
"icon_type": "emoji",
"icon": "🤖",
"icon_background": "#FFFFFF",
"icon_url": null,
"description": "便利なカスタマーサービスチャットボット。",
"copyright": "2025 Dify",
"privacy_policy": "https://example.com/privacy",
"custom_disclaimer": "",
"default_language": "en-US",
"show_workflow_steps": false,
"use_icon_as_answer_icon": true
}
}
}
}
}
},
"403": {
"description": "`forbidden` : このアプリケーションのサイトが見つからないか、ワークスペースがアーカイブされています。",
"content": {
"application/json": {
"examples": {
"forbidden": {
"summary": "forbidden",
"value": {
"status": 403,
"code": "forbidden",
"message": "Forbidden."
}
}
}
}
}
}
}
}
},
"/form/human_input/{form_token}": {
"get": {
"tags": [
"人間の入力"
],
"summary": "人間の入力フォームを取得",
"description": "`human_input_required` イベントの `form_token` を用いて、一時停止中の人間の入力フォームの内容を取得します。**WebApp** 配信が必要です。",
"operationId": "getWorkflowHumanInputForm",
"parameters": [
{
"name": "form_token",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "一時停止フォームのアクセストークン。ストリーミングモードで [ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) が返す `human_input_required` イベントから取得します。"
}
],
"responses": {
"200": {
"description": "フォーム内容の取得に成功しました。",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"form_content": {
"type": "string",
"description": "ワークフロー変数が置換された、事前レンダリング済みのフォーム本文。"
},
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "フォーム入力コントロールの種類。使用可能な値:`text_input`(単一行テキスト)と `paragraph`(複数行テキスト)。"
},
"output_variable_name": {
"type": "string",
"description": "この入力の送信値をワークフロー内で参照する変数名。送信時の `inputs` オブジェクトのキーに対応します。"
},
"default": {
"type": "object",
"nullable": true,
"description": "ワークフローコンテキストから解決されるデフォルト値。デフォルトが設定されていない場合は `null`。",
"properties": {
"type": {
"type": "string",
"description": "デフォルト値のソース。`constant` は `value` をリテラル文字列として使用します。`variable` は `selector` がワークフロー変数を指します。"
},
"selector": {
"type": "array",
"items": {
"type": "string"
},
"description": "`type` が `variable` の場合の変数参照パス(例:`[\"node_id\", \"var_name\"]`)。少なくとも 2 要素を含みます。"
},
"value": {
"type": "string",
"description": "`type` が `constant` の場合のリテラルデフォルト値。常に文字列です。"
}
}
}
}
},
"description": "フォーム入力フィールドの定義。"
},
"resolved_default_values": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "事前入力デフォルト値。入力の `output_variable_name` をキーとします。すべての値は文字列化されます。"
},
"user_actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 20,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"description": "アクションボタンの識別子。受信者がこのボタンを選択したら、`action` として [人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) に渡します。"
},
"title": {
"type": "string",
"maxLength": 100,
"description": "受信者に表示されるボタンのラベル。"
},
"button_style": {
"type": "string",
"description": "ボタンの視覚スタイル。使用可能な値:`primary`、`default`、`accent`、`ghost`。"
}
}
},
"description": "利用可能な送信アクション。"
},
"expiration_time": {
"type": "integer",
"format": "int64",
"description": "Unix タイムスタンプ(秒)。これを過ぎるとフォームは送信できなくなります。"
}
}
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {
"form_content": "Please review the draft and confirm or request changes.",
"inputs": [
{
"type": "text_input",
"output_variable_name": "comment",
"default": {
"type": "constant",
"selector": [],
"value": ""
}
}
],
"resolved_default_values": {
"comment": ""
},
"user_actions": [
{
"id": "approve",
"title": "Approve",
"button_style": "primary"
},
{
"id": "reject",
"title": "Request changes",
"button_style": "default"
}
],
"expiration_time": 1745510400
}
}
}
}
}
},
"404": {
"description": "`not_found` : Form not found.",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Form not found"
}
}
}
}
}
},
"412": {
"description": "- `human_input_form_submitted` : Form already submitted. Forms are one-shot; the first response wins regardless of which user submits it.\n- `human_input_form_expired` : The form's expiration time passed before submission arrived.",
"content": {
"application/json": {
"examples": {
"human_input_form_submitted": {
"summary": "human_input_form_submitted",
"value": {
"status": 412,
"code": "human_input_form_submitted",
"message": "This form has already been submitted by another user, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
},
"human_input_form_expired": {
"summary": "human_input_form_expired",
"value": {
"status": 412,
"code": "human_input_form_expired",
"message": "This form has expired, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}
}
}
}
}
},
"post": {
"tags": [
"人間の入力"
],
"summary": "人間の入力フォームを送信",
"description": "一時停止中の人間の入力フォームに対する受信者の応答を送信します。フォームが受理されるとワークフローが再開するため、後続のイベントは [ワークフローイベントをストリーム](/api-reference/ワークフロー/ワークフローイベントをストリーム) で受信してください。**WebApp** 配信が必要です。",
"operationId": "submitWorkflowHumanInputForm",
"parameters": [
{
"name": "form_token",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "一時停止フォームのアクセストークン。ストリーミングモードで [ワークフローを実行](/api-reference/ワークフロー/ワークフローを実行) が返す `human_input_required` イベントから取得します。"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"inputs",
"action",
"user"
],
"properties": {
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "受信者が提供した値。入力の `output_variable_name` をキーとします。"
},
"action": {
"type": "string",
"description": "受信者が選択したアクションボタンの ID。[人間の入力フォームを取得](/api-reference/人間の入力/人間の入力フォームを取得) で返される `user_actions` リストに含まれるいずれかの `id` 値と一致する必要があります。",
"maxLength": 20,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
},
"user": {
"type": "string",
"description": "送信者のエンドユーザー識別子。"
}
}
},
"examples": {
"approve": {
"summary": "リクエスト例",
"value": {
"inputs": {
"comment": "Looks good to ship"
},
"action": "approve",
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "フォームの送信に成功しました。レスポンスボディは空オブジェクトです。",
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {}
}
}
}
}
},
"400": {
"description": "- `bad_request` : Form recipient type is invalid.\n- `invalid_form_data` : Submission failed validation against the form definition.",
"content": {
"application/json": {
"examples": {
"bad_request": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "Form recipient type is invalid"
}
},
"invalid_form_data": {
"summary": "invalid_form_data",
"value": {
"status": 400,
"code": "invalid_form_data",
"message": "Missing required inputs: comment"
}
}
}
}
}
},
"404": {
"description": "`not_found` : Form not found.",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Form not found"
}
}
}
}
}
},
"412": {
"description": "- `human_input_form_submitted` : Form already submitted. Forms are one-shot; the first response wins regardless of which user submits it.\n- `human_input_form_expired` : The form's expiration time passed before submission arrived.",
"content": {
"application/json": {
"examples": {
"human_input_form_submitted": {
"summary": "human_input_form_submitted",
"value": {
"status": 412,
"code": "human_input_form_submitted",
"message": "This form has already been submitted by another user, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
},
"human_input_form_expired": {
"summary": "human_input_form_expired",
"value": {
"status": 412,
"code": "human_input_form_expired",
"message": "This form has expired, form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}
}
}
}
}
}
},
"/workflow/{task_id}/events": {
"get": {
"tags": [
"ワークフロー"
],
"summary": "ワークフローイベントをストリーム",
"description": "一時停止後または元の SSE 接続が切断された後にワークフロー実行の Server-Sent Events ストリームを再開します。すでに完了している実行に対しては、`workflow_finished` イベントを 1 つ送信してストリームを閉じます。",
"operationId": "streamWorkflowEvents",
"parameters": [
{
"name": "task_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "元のワークフロー実行リクエストで返されたワークフロー実行 ID。"
},
{
"name": "user",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "この実行を最初にトリガーしたエンドユーザー識別子。ワークフロー実行の作成者と一致している必要があります。"
},
{
"name": "include_state_snapshot",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"description": "`true` の場合、永続化された状態スナップショットからリプレイし、新しいイベントのストリーミング開始前に実行済みノードのステータスサマリーを含めます。"
},
{
"name": "continue_on_pause",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"description": "`true` に設定すると、複数の `workflow_paused` イベントを跨いでストリームを開いたままにします(ワークフローに複数の人間の入力ノードが連続する場合に有用)。デフォルトでは最初の一時停止で閉じます。"
}
],
"responses": {
"200": {
"description": "Server-Sent Events ストリーム。各イベントは `data: {JSON}\\n\\n` として配信されます。イベントペイロードは元のストリーミングレスポンスと同じスキーマに従います。",
"content": {
"text/event-stream": {
"schema": {
"type": "string",
"description": "ワークフローイベントの SSE ストリーム。"
}
}
}
},
"400": {
"description": "`not_workflow_app` : Please check if your app mode matches the right API route.",
"content": {
"application/json": {
"examples": {
"not_workflow_app": {
"summary": "not_workflow_app",
"value": {
"status": 400,
"code": "not_workflow_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : Workflow run not found.",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Workflow run not found"
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"ApiKeyAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "API_KEY",
"description": "API Key 認証です。すべての API リクエストにおいて、`Authorization` HTTP ヘッダーに `Bearer ` プレフィックスを付けた API Key を含めてください。例:`Authorization: Bearer {API_KEY}`。**API Key はサーバーサイドに保存し、クライアントサイドで共有・保存しないことを強く推奨します。API Key の漏洩は深刻な結果につながる可能性があります。**"
}
},
"responses": {
"SuccessResult": {
"description": "操作が成功しました。",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": {
"type": "string",
"enum": [
"success"
],
"description": "操作結果です。"
}
}
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {
"result": "success"
}
}
}
}
}
}
},
"schemas": {
"WorkflowExecutionRequest": {
"type": "object",
"required": [
"inputs",
"user"
],
"properties": {
"inputs": {
"type": "object",
"description": "ワークフロー入力変数のキーと値のペアです。ファイル型変数の値は、`type`、`transfer_method`、および `url` または `upload_file_id` を持つファイルオブジェクトの配列である必要があります。アプリが期待する変数名と型については、[アプリケーションのパラメータ情報を取得](/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得) レスポンスの `user_input_form` フィールドを参照してください。",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "object"
},
{
"type": "array",
"items": {
"$ref": "#/components/schemas/InputFileObject"
}
}
]
}
},
"response_mode": {
"type": "string",
"enum": [
"streaming",
"blocking"
],
"description": "レスポンスモードです。同期レスポンスには `blocking`Cloudflare タイムアウトは `100 s`)、サーバー送信イベントには `streaming` を使用します。省略した場合、デフォルトはブロッキング動作になります。"
},
"user": {
"type": "string",
"description": "開発者のルールで定義されるユーザー識別子で、アプリケーション内で一意である必要があります。この識別子はデータアクセスの範囲を限定します——ワークフロー実行とファイルは同じ `user` 値でクエリした場合にのみ表示されます。"
},
"files": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InputFileObject"
},
"nullable": true,
"description": "ファイルリストです。ファイルとテキストを組み合わせて入力する場合に適しており、モデルが Vision 機能をサポートしている場合にのみ使用できます。ローカルファイルを添付するには、まず [ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) でアップロードし、返された `id` を `upload_file_id` として `transfer_method: local_file` で使用します。"
}
}
},
"InputFileObject": {
"type": "object",
"required": [
"type",
"transfer_method"
],
"properties": {
"type": {
"type": "string",
"enum": [
"document",
"image",
"audio",
"video",
"custom"
],
"description": "ファイルタイプ。"
},
"transfer_method": {
"type": "string",
"enum": [
"remote_url",
"local_file"
],
"description": "転送方法です。ファイル URL の場合は `remote_url`、アップロードファイルの場合は `local_file` です。"
},
"url": {
"type": "string",
"format": "url",
"description": "ファイル URL`transfer_method` が `remote_url` の場合)です。"
},
"upload_file_id": {
"type": "string",
"description": "[ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) API から取得したアップロード済みファイル ID です(`transfer_method` が `local_file` の場合に使用)。"
}
}
},
"WorkflowBlockingResponse": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"format": "uuid",
"description": "進行中の実行のタスク ID です。[ワークフロータスクを停止](/api-reference/ワークフロー/ワークフロータスクを停止) と組み合わせて、実行中のワークフローをキャンセルします。実行中のみ有効です。"
},
"workflow_run_id": {
"type": "string",
"format": "uuid",
"description": "このワークフロー実行記録の永続的な識別子です。[ワークフロー実行詳細を取得](/api-reference/ワークフロー/ワークフロー実行詳細を取得) と組み合わせて、実行後に結果を取得します。"
},
"data": {
"$ref": "#/components/schemas/WorkflowFinishedData"
}
}
},
"ChunkWorkflowEvent": {
"type": "object",
"required": [
"event"
],
"properties": {
"event": {
"type": "string",
"enum": [
"workflow_started",
"node_started",
"node_finished",
"node_retry",
"iteration_started",
"iteration_next",
"iteration_completed",
"loop_started",
"loop_next",
"loop_completed",
"text_chunk",
"text_replace",
"workflow_finished",
"tts_message",
"tts_message_end",
"workflow_paused",
"agent_log",
"human_input_required",
"human_input_form_filled",
"human_input_form_timeout",
"error",
"ping"
],
"description": "ストリーミングイベントの種類。"
}
},
"discriminator": {
"propertyName": "event",
"mapping": {
"workflow_started": "#/components/schemas/StreamEventWorkflowStarted",
"node_started": "#/components/schemas/StreamEventNodeStarted",
"node_finished": "#/components/schemas/StreamEventNodeFinished",
"node_retry": "#/components/schemas/StreamEventNodeRetry",
"iteration_started": "#/components/schemas/StreamEventIterationStarted",
"iteration_next": "#/components/schemas/StreamEventIterationNext",
"iteration_completed": "#/components/schemas/StreamEventIterationCompleted",
"loop_started": "#/components/schemas/StreamEventLoopStarted",
"loop_next": "#/components/schemas/StreamEventLoopNext",
"loop_completed": "#/components/schemas/StreamEventLoopCompleted",
"text_chunk": "#/components/schemas/StreamEventTextChunk",
"text_replace": "#/components/schemas/StreamEventTextReplace",
"workflow_finished": "#/components/schemas/StreamEventWorkflowFinished",
"tts_message": "#/components/schemas/StreamEventTtsMessage",
"tts_message_end": "#/components/schemas/StreamEventTtsMessageEnd",
"error": "#/components/schemas/StreamEventError",
"ping": "#/components/schemas/StreamEventPing",
"workflow_paused": "#/components/schemas/StreamEventWorkflowPaused",
"agent_log": "#/components/schemas/StreamEventAgentLog",
"human_input_required": "#/components/schemas/StreamEventHumanInputRequired",
"human_input_form_filled": "#/components/schemas/StreamEventHumanInputFormFilled",
"human_input_form_timeout": "#/components/schemas/StreamEventHumanInputFormTimeout"
}
}
},
"StreamEventBase": {
"type": "object",
"properties": {
"task_id": {
"type": "string",
"format": "uuid",
"description": "進行中の実行のタスク ID です。[ワークフロータスクを停止](/api-reference/ワークフロー/ワークフロータスクを停止) と組み合わせて、実行中のワークフローをキャンセルします。実行中のみ有効です。"
},
"workflow_run_id": {
"type": "string",
"format": "uuid",
"description": "このワークフロー実行記録の永続的な識別子です。[ワークフロー実行詳細を取得](/api-reference/ワークフロー/ワークフロー実行詳細を取得) と組み合わせて、実行後に結果を取得します。"
}
}
},
"StreamEventWorkflowStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ワークフロー実行 ID です。"
},
"workflow_id": {
"type": "string",
"format": "uuid",
"description": "Workflow ID."
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "このワークフロー実行の入力変数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ワークフロー実行が開始した Unix タイムスタンプです。"
},
"reason": {
"type": "string",
"description": "ワークフロー開始の理由です。`initial` は新規実行、`resumption` は一時停止状態からの再開を示します。"
}
}
}
}
}
]
},
"StreamEventNodeStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "ノードタイプ(例:`llm`、`code`、`template-transform`)です。"
},
"title": {
"type": "string",
"description": "ノードの表示名です。"
},
"index": {
"type": "integer",
"description": "実行シーケンスインデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID(存在する場合)です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "このノードの入力変数です。"
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ノード実行が開始した Unix タイムスタンプです。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"description": "ノード実行の追加メタデータです。"
},
"iteration_id": {
"type": "string",
"nullable": true,
"description": "このノードがイテレーション内で実行される場合の親イテレーション ID です。"
},
"loop_id": {
"type": "string",
"nullable": true,
"description": "このノードがループ内で実行される場合の親ループ ID です。"
}
}
}
}
}
]
},
"StreamEventNodeFinished": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "ノードの表示名です。"
},
"index": {
"type": "integer",
"description": "実行シーケンスインデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID(存在する場合)です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "このノードの入力変数です。"
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"process_data": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ノード実行中に生成された処理データです。"
},
"process_data_truncated": {
"type": "boolean",
"description": "`process_data` が切り詰められたかどうかです。"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ノードからの出力データです。"
},
"outputs_truncated": {
"type": "boolean",
"description": "`outputs` データが切り詰められたかどうかです。"
},
"status": {
"type": "string",
"description": "ノードの実行ステータスです。`running` は進行中、`succeeded` は完了、`failed` はエラー、`stopped` は手動停止、`exception` は予期しない障害を示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ノードが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"description": "経過時間(秒)です。"
},
"execution_metadata": {
"type": "object",
"nullable": true,
"description": "トークン使用量を含む実行メタデータです。",
"properties": {
"total_tokens": {
"type": "integer",
"nullable": true,
"description": "このノードで消費された合計トークン数です。"
},
"total_price": {
"type": "number",
"format": "float",
"nullable": true,
"description": "このノード実行の合計コストです。"
},
"currency": {
"type": "string",
"nullable": true,
"description": "コストの通貨(例: `USD`)です。"
}
}
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ノード実行が開始した Unix タイムスタンプです。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"description": "ノード実行が完了した Unix タイムスタンプです。"
},
"files": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"additionalProperties": true
},
"description": "このノードで生成されたファイルです。"
},
"iteration_id": {
"type": "string",
"nullable": true,
"description": "このノードがイテレーション内で実行される場合の親イテレーション ID です。"
},
"loop_id": {
"type": "string",
"nullable": true,
"description": "このノードがループ内で実行される場合の親ループ ID です。"
}
}
}
}
}
]
},
"StreamEventNodeRetry": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "ノードの表示名です。"
},
"index": {
"type": "integer",
"description": "実行シーケンスインデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID(存在する場合)です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"process_data": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ノード実行中に生成された処理データです。"
},
"process_data_truncated": {
"type": "boolean",
"description": "`process_data` が切り詰められたかどうかです。"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"outputs_truncated": {
"type": "boolean",
"description": "`outputs` データが切り詰められたかどうかです。"
},
"status": {
"type": "string",
"description": "リトライ時点のノード実行ステータスです。"
},
"error": {
"type": "string",
"nullable": true,
"description": "リトライをトリガーしたエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"description": "経過時間(秒)です。"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"finished_at": {
"type": "integer",
"format": "int64"
},
"retry_index": {
"type": "integer",
"description": "ゼロ始まりのリトライ回数インデックスです。"
},
"iteration_id": {
"type": "string",
"nullable": true
},
"loop_id": {
"type": "string",
"nullable": true
},
"execution_metadata": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ノード実行のメタデータです。"
},
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "実行中にノードが生成したファイルです。"
}
}
}
}
}
]
},
"StreamEventIterationStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "イテレーションノード ID です。"
},
"node_type": {
"type": "string",
"description": "ノードの種類(常に `iteration`)です。"
},
"title": {
"type": "string",
"description": "イテレーションノードの表示名です。"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "イテレーションの入力変数です。"
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "イテレーションのメタデータです。"
},
"extras": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
]
},
"StreamEventIterationNext": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"node_id": {
"type": "string"
},
"node_type": {
"type": "string"
},
"title": {
"type": "string"
},
"index": {
"type": "integer",
"description": "現在のイテレーションインデックス(ゼロ始まり)です。"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"extras": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
]
},
"StreamEventIterationCompleted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"node_id": {
"type": "string"
},
"node_type": {
"type": "string"
},
"title": {
"type": "string"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"outputs_truncated": {
"type": "boolean",
"description": "`outputs` データが切り詰められたかどうかです。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "イテレーションの入力変数です。"
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "イテレーションが開始した Unix タイムスタンプです。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "イテレーションの追加メタデータです。"
},
"status": {
"type": "string",
"description": "イテレーションの完了ステータスです。"
},
"error": {
"type": "string",
"nullable": true
},
"elapsed_time": {
"type": "number",
"format": "float"
},
"total_tokens": {
"type": "integer"
},
"execution_metadata": {
"type": "object",
"additionalProperties": true,
"description": "トークン使用量を含む実行メタデータです。"
},
"finished_at": {
"type": "integer",
"format": "int64"
},
"steps": {
"type": "integer",
"description": "完了したイテレーションステップ数です。"
}
}
}
}
}
]
},
"StreamEventLoopStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"node_id": {
"type": "string"
},
"node_type": {
"type": "string"
},
"title": {
"type": "string"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"inputs": {
"type": "object",
"additionalProperties": true
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"metadata": {
"type": "object",
"additionalProperties": true
},
"extras": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
]
},
"StreamEventLoopNext": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"node_id": {
"type": "string"
},
"node_type": {
"type": "string"
},
"title": {
"type": "string"
},
"index": {
"type": "integer",
"description": "現在のループイテレーションインデックス(ゼロベース)です。"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"pre_loop_output": {
"description": "前回のループイテレーションからの出力です。",
"nullable": true
},
"extras": {
"type": "object",
"additionalProperties": true
}
}
}
}
}
]
},
"StreamEventLoopCompleted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"node_id": {
"type": "string"
},
"node_type": {
"type": "string"
},
"title": {
"type": "string"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true
},
"outputs_truncated": {
"type": "boolean",
"description": "`outputs` データが切り詰められたかどうかです。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ループの入力変数です。"
},
"inputs_truncated": {
"type": "boolean",
"description": "`inputs` データが切り捨てられたかどうかです。"
},
"created_at": {
"type": "integer",
"format": "int64"
},
"extras": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ループの追加メタデータです。"
},
"status": {
"type": "string",
"description": "ループの完了ステータスです。"
},
"error": {
"type": "string",
"nullable": true
},
"elapsed_time": {
"type": "number",
"format": "float"
},
"total_tokens": {
"type": "integer"
},
"execution_metadata": {
"type": "object",
"additionalProperties": true,
"description": "トークン使用量を含む実行メタデータです。"
},
"finished_at": {
"type": "integer",
"format": "int64"
},
"steps": {
"type": "integer",
"description": "完了したループイテレーション数です。"
}
}
}
}
}
]
},
"StreamEventTextChunk": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "テキスト内容のチャンクです。"
},
"from_variable_selector": {
"type": "array",
"items": {
"type": "string"
},
"nullable": true,
"description": "ワークフロー内のテキスト変数のソースパスです。"
}
}
}
}
}
]
},
"StreamEventTextReplace": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "置換テキスト内容です。"
}
}
}
}
}
]
},
"StreamEventWorkflowFinished": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/WorkflowFinishedData"
}
}
}
]
},
"StreamEventTtsMessage": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"audio": {
"type": "string",
"format": "byte",
"description": "Base64 エンコードされた MP3 音声チャンク。すべてのチャンクを順番にデコードして連結すると、完全な音声ファイルが生成されます。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "このオーディオチャンクが生成された Unix タイムスタンプです。"
}
}
}
]
},
"StreamEventTtsMessageEnd": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"audio": {
"type": "string",
"description": "空の文字列。音声ストリームの終了を示します。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "音声ストリームが終了した Unix タイムスタンプです。"
}
}
}
]
},
"StreamEventError": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "エラーの HTTP ステータスコードです。"
},
"code": {
"type": "string",
"description": "エラーコード。"
},
"message": {
"type": "string",
"description": "エラーメッセージ。"
}
}
}
]
},
"StreamEventPing": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"type": "object",
"description": "キープアライブ ping イベントです。追加プロパティはありません。"
}
]
},
"WorkflowFinishedData": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ワークフロー実行 ID です。"
},
"workflow_id": {
"type": "string",
"format": "uuid",
"description": "Workflow ID."
},
"status": {
"type": "string",
"description": "ワークフローの実行ステータスです。`running` は実行中、`succeeded` は正常完了、`failed` は実行エラー、`stopped` は手動停止、`partial-succeeded` は一部のノードが成功し他が失敗、`paused` は人間の入力待ちを示します。"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ワークフローからの出力データです。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ワークフローが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"description": "合計経過時間(秒)です。"
},
"total_tokens": {
"type": "integer",
"description": "全ノードで消費された合計トークン数です。"
},
"total_steps": {
"type": "integer",
"description": "実行されたワークフローの合計ステップ数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ワークフロー実行が作成された Unix タイムスタンプです。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"nullable": true,
"description": "ワークフロー実行が完了した Unix タイムスタンプです。"
},
"created_by": {
"type": "object",
"additionalProperties": true,
"description": "作成者情報です。ストリーミングの `workflow_finished` イベントにのみ存在します。"
},
"exceptions_count": {
"type": "integer",
"nullable": true,
"description": "実行中に発生した例外の数です。ストリーミングの `workflow_finished` イベントにのみ含まれます。"
},
"files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"nullable": true,
"description": "ワークフロー実行中に生成されたファイルです。ストリーミングの `workflow_finished` イベントにのみ存在します。"
}
}
},
"WorkflowRunDetailResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ワークフロー実行 ID です。"
},
"workflow_id": {
"type": "string",
"format": "uuid",
"description": "Workflow ID."
},
"status": {
"type": "string",
"description": "ワークフローの実行ステータスです。`running` は実行中、`succeeded` は正常完了、`failed` は実行エラー、`stopped` は手動停止、`partial-succeeded` は一部のノードが成功し他が失敗、`paused` は人間の入力待ちを示します。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "ワークフロー実行の入力変数です。"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ワークフローからの出力データです。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ワークフローが失敗した場合のエラーメッセージです。"
},
"total_steps": {
"type": "integer",
"description": "実行されたワークフローの合計ステップ数です。"
},
"total_tokens": {
"type": "integer",
"description": "消費された合計トークン数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ワークフロー実行が作成された Unix タイムスタンプです。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"nullable": true,
"description": "ワークフロー実行が完了した Unix タイムスタンプです。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"nullable": true,
"description": "合計経過時間(秒)です。"
}
}
},
"FileUploadResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "一意のファイル ID。"
},
"name": {
"type": "string",
"description": "ファイル名。"
},
"size": {
"type": "integer",
"description": "ファイルサイズ(バイト)。"
},
"extension": {
"type": "string",
"nullable": true,
"description": "ファイル拡張子。"
},
"mime_type": {
"type": "string",
"nullable": true,
"description": "ファイルの MIME タイプ。"
},
"created_by": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "ファイルをアップロードしたユーザーの ID。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "アップロードタイムスタンプ(Unix エポック秒)。"
},
"preview_url": {
"type": "string",
"nullable": true,
"description": "ファイルのプレビュー URL。"
},
"source_url": {
"type": "string",
"nullable": true,
"description": "ファイルのソース URL。"
},
"original_url": {
"type": "string",
"nullable": true,
"description": "ファイルの元の URL。"
},
"user_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "関連付けられたユーザーの ID。"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "関連付けられたテナントの ID。"
},
"conversation_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "関連付けられた会話の ID。"
},
"file_key": {
"type": "string",
"nullable": true,
"description": "ファイルのストレージキー。"
}
}
},
"EndUserDetail": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "エンドユーザー ID。"
},
"tenant_id": {
"type": "string",
"format": "uuid",
"description": "テナント ID。"
},
"app_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "アプリケーション ID。"
},
"type": {
"type": "string",
"description": "エンドユーザーのタイプ。Service API ユーザーの場合は常に `service_api` です。"
},
"external_user_id": {
"type": "string",
"nullable": true,
"description": "API リクエストで提供された `user` 識別子です(例:[チャットメッセージを送信](/api-reference/チャットメッセージ/チャットメッセージを送信) の `user` フィールド)。"
},
"name": {
"type": "string",
"nullable": true,
"description": "エンドユーザー名。"
},
"is_anonymous": {
"type": "boolean",
"description": "ユーザーが匿名かどうかを示します。元の API リクエストで `user` 識別子が提供されなかった場合、`true` になります。"
},
"session_id": {
"type": "string",
"description": "セッション識別子。デフォルトは `external_user_id` の値です。"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "作成タイムスタンプ。"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最終更新タイムスタンプ。"
}
}
},
"WorkflowLogsResponse": {
"type": "object",
"properties": {
"page": {
"type": "integer",
"description": "現在のページ番号です。"
},
"limit": {
"type": "integer",
"description": "1 ページあたりの件数です。"
},
"total": {
"type": "integer",
"description": "ログエントリの合計数です。"
},
"has_more": {
"type": "boolean",
"description": "さらにページがあるかどうかです。"
},
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WorkflowLogItem"
},
"description": "ワークフローログエントリのリストです。"
}
}
},
"WorkflowLogItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ログエントリ ID です。"
},
"workflow_run": {
"$ref": "#/components/schemas/WorkflowRunSummary"
},
"created_from": {
"type": "string",
"description": "ワークフロー実行のソース(例:`service-api`)です。"
},
"created_by_role": {
"type": "string",
"description": "作成者のロール(例:`end_user`、`account`)です。"
},
"created_by_account": {
"type": "object",
"nullable": true,
"description": "管理者ユーザーが作成した場合のアカウント詳細です。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "アカウント ID。"
},
"name": {
"type": "string",
"description": "アカウント表示名。"
},
"email": {
"type": "string",
"description": "アカウントメールアドレス。"
}
}
},
"created_by_end_user": {
"$ref": "#/components/schemas/EndUserSummary"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ログエントリが作成された Unix タイムスタンプです。"
},
"details": {
"type": "object",
"additionalProperties": true,
"nullable": true,
"description": "ログエントリの追加詳細です。"
}
}
},
"WorkflowRunSummary": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ワークフロー実行 ID です。"
},
"version": {
"type": "string",
"description": "ワークフローバージョン識別子です。"
},
"status": {
"type": "string",
"description": "ワークフローの実行ステータスです。`running` は実行中、`succeeded` は正常完了、`failed` は実行エラー、`stopped` は手動停止、`partial-succeeded` は一部のノードが成功し他が失敗、`paused` は人間の入力待ちを示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ワークフローが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"description": "合計経過時間(秒)です。"
},
"total_tokens": {
"type": "integer",
"description": "消費された合計トークン数です。"
},
"total_steps": {
"type": "integer",
"description": "実行されたワークフローの合計ステップ数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "ワークフロー実行が作成された Unix タイムスタンプです。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"nullable": true,
"description": "ワークフロー実行が完了した Unix タイムスタンプです。"
},
"exceptions_count": {
"type": "integer",
"description": "実行中に発生した例外の数です。"
},
"triggered_from": {
"type": "string",
"description": "ワークフロー実行をトリガーしたソースです。`debugging` はエディタからのテスト実行、`app` は API またはアプリからの実行を示します。"
}
}
},
"EndUserSummary": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "エンドユーザー ID。"
},
"type": {
"type": "string",
"description": "エンドユーザーの種類です。"
},
"is_anonymous": {
"type": "boolean",
"description": "エンドユーザーが匿名かどうかです。"
},
"session_id": {
"type": "string",
"description": "セッション識別子です。"
}
}
},
"AudioToTextRequest": {
"type": "object",
"description": "音声からテキストへの変換のリクエストボディ。",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "音声ファイルです。対応形式:`mp3`、`mp4`、`mpeg`、`mpga`、`m4a`、`wav`、`webm`。上限:`30 MB`。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。"
}
}
},
"AudioToTextResponse": {
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "音声認識からの出力テキスト。"
}
}
},
"TextToAudioRequest": {
"type": "object",
"description": "テキストから音声への変換のリクエストボディ。`message_id` または `text` のいずれかを指定してください。",
"properties": {
"message_id": {
"type": "string",
"format": "uuid",
"description": "メッセージ ID です。両方が指定された場合、`text` よりも優先されます。"
},
"text": {
"type": "string",
"description": "変換する音声コンテンツ。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。"
},
"voice": {
"type": "string",
"description": "テキスト読み上げに使用する音声。利用可能な音声は、このアプリに設定された TTS プロバイダーによって異なります。デフォルトには[アプリケーションのパラメータ情報を取得](/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得) → `text_to_speech.voice` の `voice` 値を使用してください。"
},
"streaming": {
"type": "boolean",
"description": "ストリーミングレスポンスを有効にするかどうか。"
}
}
},
"AppInfoResponse": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "アプリケーション名。"
},
"description": {
"type": "string",
"description": "アプリケーションの説明。"
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "アプリケーションタグ。"
},
"mode": {
"type": "string",
"description": "アプリケーションモード。`completion` はテキスト生成アプリ、`chat` は基本チャットアプリ、`agent-chat` はエージェントベースのアプリ、`advanced-chat` は Chatflow アプリ、`workflow` はワークフローアプリです。"
},
"author_name": {
"type": "string",
"description": "アプリケーション作成者の名前。"
}
}
},
"WorkflowAppParametersResponse": {
"type": "object",
"properties": {
"opening_statement": {
"type": "string",
"nullable": true,
"description": "オープニングステートメントのテキストです。"
},
"suggested_questions": {
"type": "array",
"items": {
"type": "string"
},
"description": "提案された質問のリストです。"
},
"suggested_questions_after_answer": {
"type": "object",
"description": "回答後の提案質問の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"speech_to_text": {
"type": "object",
"description": "音声テキスト変換機能の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"text_to_speech": {
"type": "object",
"description": "テキスト音声変換機能の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
},
"voice": {
"type": "string",
"description": "TTS 音声識別子。"
},
"language": {
"type": "string",
"description": "TTS 言語。"
}
}
},
"retriever_resource": {
"type": "object",
"description": "ナレッジ検索の引用リソース設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"annotation_reply": {
"type": "object",
"description": "アノテーション返信機能の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"more_like_this": {
"type": "object",
"description": "類似コンテンツ機能の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"sensitive_word_avoidance": {
"type": "object",
"description": "コンテンツモデレーション機能の設定です。",
"properties": {
"enabled": {
"type": "boolean",
"description": "この機能が有効かどうか。"
}
}
},
"user_input_form": {
"type": "array",
"items": {
"type": "object",
"oneOf": [
{
"title": "Text Input",
"type": "object",
"properties": {
"text-input": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "入力フィールドの表示ラベルです。"
},
"variable": {
"type": "string",
"description": "ワークフローで使用される変数名です。"
},
"required": {
"type": "boolean",
"description": "このフィールドが必須かどうかです。"
},
"default": {
"type": "string",
"description": "入力フィールドのデフォルト値です。"
}
}
}
}
},
{
"title": "Paragraph",
"type": "object",
"properties": {
"paragraph": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "段落フィールドの表示ラベルです。"
},
"variable": {
"type": "string",
"description": "ワークフローで使用される変数名です。"
},
"required": {
"type": "boolean",
"description": "このフィールドが必須かどうかです。"
},
"default": {
"type": "string",
"description": "段落フィールドのデフォルト値です。"
}
}
}
}
},
{
"title": "Select",
"type": "object",
"properties": {
"select": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "セレクトフィールドの表示ラベルです。"
},
"variable": {
"type": "string",
"description": "ワークフローで使用される変数名です。"
},
"required": {
"type": "boolean",
"description": "このフィールドが必須かどうかです。"
},
"default": {
"type": "string",
"description": "デフォルトで選択される値。"
},
"options": {
"type": "array",
"items": {
"type": "string"
},
"description": "このフォームコントロールの選択可能な値のリスト。"
}
}
}
}
}
]
},
"description": "ユーザー入力フォームの設定です。"
},
"file_upload": {
"type": "object",
"description": "ファイルアップロードの設定。",
"properties": {
"image": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"description": "画像アップロードが有効かどうか。"
},
"number_limits": {
"type": "integer",
"description": "アップロード可能な画像の最大数です。"
},
"detail": {
"type": "string",
"description": "ビジョンモデルの画像詳細レベルです。"
},
"transfer_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "画像アップロードで許可される転送方法です。`remote_url` はファイル URL 経由、`local_file` はアップロード済みファイルを示します。"
}
}
}
}
},
"system_parameters": {
"type": "object",
"description": "システムレベルのパラメータ制限です。",
"properties": {
"file_size_limit": {
"type": "integer",
"description": "一般ファイルの最大サイズ(MB)です。"
},
"image_file_size_limit": {
"type": "integer",
"description": "最大画像ファイルサイズ(MB)。"
},
"audio_file_size_limit": {
"type": "integer",
"description": "最大音声ファイルサイズ(MB)。"
},
"video_file_size_limit": {
"type": "integer",
"description": "最大動画ファイルサイズ(MB)。"
},
"workflow_file_upload_limit": {
"type": "integer",
"description": "ワークフロー実行ごとの最大ファイル数です。"
}
}
}
}
},
"ToolIconDetail": {
"type": "object",
"properties": {
"background": {
"type": "string",
"description": "ツールアイコンの背景色です。"
},
"content": {
"type": "string",
"description": "絵文字またはアイコンの内容です。"
}
}
},
"AppMetaResponse": {
"type": "object",
"properties": {
"tool_icons": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"title": "Icon URL",
"type": "string",
"format": "url",
"description": "アイコンの URL。"
},
{
"$ref": "#/components/schemas/ToolIconDetail"
}
]
},
"description": "ツールアイコン。キーはツール名です。"
}
}
},
"WebAppSettingsResponse": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "WebApp タイトル。"
},
"chat_color_theme": {
"type": "string",
"description": "チャットカラーテーマ。"
},
"chat_color_theme_inverted": {
"type": "boolean",
"description": "チャットカラーテーマが反転しているかどうか。"
},
"icon_type": {
"type": "string",
"description": "使用されるアイコンのタイプ。`emoji` は絵文字アイコン、`image` はアップロードされた画像アイコンです。"
},
"icon": {
"type": "string",
"description": "アイコンのコンテンツ(絵文字または画像 ID)。"
},
"icon_background": {
"type": "string",
"description": "アイコンの背景色。"
},
"icon_url": {
"type": "string",
"format": "url",
"nullable": true,
"description": "アイコン画像の URL。"
},
"description": {
"type": "string",
"description": "WebApp の説明。"
},
"copyright": {
"type": "string",
"description": "著作権テキスト。"
},
"privacy_policy": {
"type": "string",
"description": "プライバシーポリシー URL。"
},
"custom_disclaimer": {
"type": "string",
"description": "カスタム免責事項テキスト。"
},
"default_language": {
"type": "string",
"description": "デフォルト言語コード。"
},
"show_workflow_steps": {
"type": "boolean",
"description": "ワークフローステップを表示するかどうか。"
},
"use_icon_as_answer_icon": {
"type": "boolean",
"description": "アプリアイコンを回答アイコンとして使用するかどうか。"
}
}
},
"StreamEventWorkflowPaused": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"workflow_run_id": {
"type": "string",
"format": "uuid",
"description": "このワークフロー実行記録の永続的な識別子です。[ワークフロー実行詳細を取得](/api-reference/ワークフロー/ワークフロー実行詳細を取得) と組み合わせて、実行後に結果を取得します。"
},
"paused_nodes": {
"type": "array",
"items": {
"type": "string"
},
"description": "一時停止中のノード ID のリストです。"
},
"outputs": {
"type": "object",
"additionalProperties": true,
"description": "一時停止時の部分的な出力です。"
},
"reasons": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true
},
"description": "一時停止の理由です。"
},
"status": {
"type": "string",
"description": "ワークフローの実行ステータスです。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ。"
},
"elapsed_time": {
"type": "number",
"format": "float",
"description": "合計経過時間(秒)です。"
},
"total_tokens": {
"type": "integer",
"description": "消費された合計トークン数です。"
},
"total_steps": {
"type": "integer",
"description": "実行された合計ステップ数です。"
}
}
}
}
}
]
},
"StreamEventAgentLog": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"node_execution_id": {
"type": "string",
"description": "ノード実行 ID です。"
},
"id": {
"type": "string",
"description": "エージェントログエントリ ID です。"
},
"label": {
"type": "string",
"description": "Log label."
},
"parent_id": {
"type": "string",
"nullable": true,
"description": "親ログエントリ ID です。"
},
"error": {
"type": "string",
"nullable": true,
"description": "エージェントステップが失敗した場合のエラーメッセージです。"
},
"status": {
"type": "string",
"description": "エージェントステップのステータスです。"
},
"data": {
"type": "object",
"additionalProperties": true,
"description": "エージェントステップのデータです。"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "エージェントステップのメタデータです。"
},
"node_id": {
"type": "string",
"description": "Node ID."
}
}
}
}
}
]
},
"StreamEventHumanInputRequired": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"form_id": {
"type": "string",
"description": "フォームインスタンスの識別子。エラーメッセージやログに含まれます。Service API の呼び出しには `form_token` を使用してください。"
},
"node_id": {
"type": "string",
"description": "このフォームを生成した Human Input ノードの ID。"
},
"node_title": {
"type": "string",
"description": "Human Input ノードの表示タイトル。"
},
"form_content": {
"type": "string",
"description": "ワークフロー変数が置換された、事前レンダリング済みのフォーム本文。"
},
"inputs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "フォーム入力コントロールの種類。使用可能な値:`text_input`(単一行テキスト)と `paragraph`(複数行テキスト)。"
},
"output_variable_name": {
"type": "string",
"description": "この入力の送信値をワークフロー内で参照する変数名。送信時の `inputs` オブジェクトのキーに対応します。"
},
"default": {
"type": "object",
"nullable": true,
"description": "ワークフローコンテキストから解決されるデフォルト値。デフォルトが設定されていない場合は `null`。",
"properties": {
"type": {
"type": "string",
"description": "デフォルト値のソース。`constant` は `value` をリテラル文字列として使用します。`variable` は `selector` がワークフロー変数を指します。"
},
"selector": {
"type": "array",
"items": {
"type": "string"
},
"description": "`type` が `variable` の場合の変数参照パス(例:`[\"node_id\", \"var_name\"]`)。少なくとも 2 要素を含みます。"
},
"value": {
"type": "string",
"description": "`type` が `constant` の場合のリテラルデフォルト値。常に文字列です。"
}
}
}
}
},
"description": "受信者が記入するフォーム入力フィールド。"
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 20,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"description": "アクションボタンの識別子。受信者がこのボタンを選択したら、`action` として [人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) に渡します。"
},
"title": {
"type": "string",
"maxLength": 100,
"description": "受信者に表示されるボタンのラベル。"
},
"button_style": {
"type": "string",
"description": "ボタンの視覚スタイル。使用可能な値:`primary`、`default`、`accent`、`ghost`。"
}
}
},
"description": "送信時に受信者が選択できるアクション(ボタン)。"
},
"display_in_ui": {
"type": "boolean",
"description": "フォームが Dify コンソール UI にも表示されるかどうか。"
},
"form_token": {
"type": "string",
"nullable": true,
"description": "[人間の入力フォームを取得](/api-reference/人間の入力/人間の入力フォームを取得) と [人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) のアクセストークン。人間の入力ノードがメール配信またはコンソール配信を使用する場合は `null` になります(Service API は WebApp 配信のフォームのみ操作できます)。"
},
"resolved_default_values": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "入力の `output_variable_name` をキーとする事前入力デフォルト値。すべての値は文字列化されます。"
},
"expiration_time": {
"type": "integer",
"format": "int64",
"description": "Unix タイムスタンプ(秒)。これを過ぎるとフォームは送信できなくなります。"
}
}
}
}
}
]
},
"StreamEventHumanInputFormFilled": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"node_id": {
"type": "string",
"description": "フォームが記入された Human Input ノードの ID。"
},
"node_title": {
"type": "string",
"description": "Human Input ノードの表示タイトル。"
},
"rendered_content": {
"type": "string",
"description": "受信者の入力値で描画されたフォーム本文(`human_input_required` の `form_content` は未入力のテンプレートです)。"
},
"action_id": {
"type": "string",
"description": "受信者が選択したアクションの識別子([人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) に渡された `action` の値と一致します)。"
},
"action_text": {
"type": "string",
"description": "選択されたアクションの表示テキスト。"
}
}
}
}
}
]
},
"StreamEventHumanInputFormTimeout": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkWorkflowEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"node_id": {
"type": "string",
"description": "フォームが期限切れとなった Human Input ノードの ID。"
},
"node_title": {
"type": "string",
"description": "Human Input ノードの表示タイトル。"
},
"expiration_time": {
"type": "integer",
"format": "int64",
"description": "Unix タイムスタンプ(秒)。フォームが期限切れとなった時刻。"
}
}
}
}
}
]
}
}
},
"tags": [
{
"name": "ワークフロー",
"description": "ワークフローの実行と管理のための操作です。"
},
{
"name": "ファイル操作",
"description": "ファイルのアップロードとダウンロードの操作です。"
},
{
"name": "エンドユーザー",
"description": "エンドユーザー情報に関連する操作です。"
},
{
"name": "音声・テキスト変換",
"description": "音声からテキストおよびテキストから音声への変換です。"
},
{
"name": "アプリケーション設定",
"description": "アプリケーションの設定、パラメータ、メタデータです。"
},
{
"name": "人間の入力",
"description": "人間の入力を要する一時停止中のワークフローの再開操作です。"
}
]
}