Files
dify-docs/ja/api-reference/openapi_chatflow.json
T
Riskey 32e1b169da feat: consolidate and restructure the API reference (Phase 1) (#846)
* docs: correct HITL API integration flow and sync translations

- Fix the claim that the resume endpoint differs per app type (same
  endpoint; only the entry endpoint differs)
- Tie workflow_run_id guidance to the human_input_required event
  (chatflow message chunks don't carry it)
- Require the same user when resuming the event stream (mismatch
  returns 404); add include_state_snapshot and continue_on_pause
  guidance
- Note at the capture step that a null form_token means Email delivery
- Soften the upload-time validation claim to file size limits
- Split long paragraphs; align zh endpoint name with the reference page

* fix: correct API references against verified backend behavior

Audit of the Service API specs against dify hotfix/1.15.0-fix.1, with
every change code-verified and the serious items adversarially
confirmed. Applies to en/zh/ja.

- Add curl samples for GET endpoints with required query params
  (Mintlify omits query params from generated snippets)
- Document 401 once in every spec's auth scheme description
- Correct wrong facts: workflow run detail returns inputs as a JSON
  string; DELETE /conversations requires a JSON body; audio-to-text
  accepts audio/{mp3,m4a,wav,amr,mpga} by MIME type; workflow log
  created_by_account filters by email; triggered_from values are
  app-run/webhook/schedule/plugin; stop endpoints' user semantics
  differ per app type
- Remove unreachable docs: phantom text_replace SSE event, annotation
  403, file preview endpoint in the workflow spec, invented
  score_threshold bounds
- Make upload user optional (DEFAULT-USER fallback), fix upload
  response example, add missing invalid_param error
- Declare text_to_speech.autoPlay in parameters responses (prose
  values, no response-field enums)

* fix: complete API reference audit for knowledge and completion specs

* feat: add API spec consolidation pipeline

Phase-1 of the API docs consolidation: tooling that merges the five per-app-type Service API specs into one openapi_service.json per language, with every divergence resolved explicitly in resolutions.json and rendering-preserving namespacing for mode-scoped schema families. Includes the audit lint and parity checks (lint taught the new language-prefixed href scheme), hand-merged mode-aware SSE documentation for POST /chat-messages in en/zh/ja, and the New Agent (Beta) virtual nav group with code-verified mode notes.

* feat: consolidate API reference into one spec per language

Emit {en,zh,ja}/api-reference/openapi_service.json (82 ops, 130 components) from the audit-fixed per-app-type specs; wire docs.json to them with explicit per-app-type endpoint lists, x-mint.href URLs (/{lang}/api-reference/{tag}/{summary} with shared English slugs for in-place language switching), 265 redirects covering the legacy en and CJK URLs, per-app-type overview pages including New Agent (Beta), and rewritten legacy API links in 21 MDX bodies. The old five specs per language stay as pipeline input; they are no longer rendered.

* fix: remove dead conversation_completed error from chat specs

ConversationCompletedError is never raised anywhere at the verified 1.15.0 ref (7a4252b3de): controllers catch it, but no service code raises it, so the documented 400 conversation_completed can never fire. Remove the bullet and example from the chat and chatflow /chat-messages docs in en/zh/ja. Found and adversarially confirmed during the New Agent (PR #836) verification; filed on the upstream bug list.

* feat: add membership matrix and restructure nav config

* feat: rename resource tags and update all references

* feat: stamp per-operation availability lines

* feat: wire three-group API navigation

* feat: add app-type page coverage lint

* docs: rewrite chatflow overview as app-type API guide

* docs: polish chatflow overview zh and ja wording

* docs: rewrite workflow overview as app-type API guide

* docs: align workflow overview details across languages

* docs: expand new agent overview into app-type API guide

* docs: use task-oriented heading on new agent overview

* docs: rewrite chatbot and agent overview as app-type API guide

* docs: rewrite text generator overview as app-type API guide

* docs: match end user link text to merged spec summary

* docs: rewrite knowledge overview as app-type API guide

* docs: move knowledge api guide into api reference

* docs: localize ui labels on knowledge overview

* docs: refresh pipeline readme for restructure modes

* docs: name app-type pages in the guides sidebar

* feat: rename zh completion messages tag to match resource framing

* docs: prototype endpoints-first layout on chatflow overview

* docs: correct detail accuracy on chatflow overview

* docs: move human input flow guide into api reference

Move the shared HITL API integration walkthrough from its six per-product
copies into {en,zh,ja}/api-reference/guides/human-input-flow as the first
task guide in the API docs. Guides gains an App Types subgroup (expanded
by default) with the flow guide after it; six redirects cover the old
paths; the Human Input node docs and the chatflow overview link to the
new home.

* fix: update spec links to the moved human input guide

* fix: let spec lint accept mdx guide pages under api-reference

* docs: align chatflow zh and ja overviews to endpoints-first layout

* docs: polish chatflow zh and ja mode terms and hitl wording

* docs: align workflow overviews to endpoints-first layout

* docs: document form expiry path in human input flow guide

* docs: align new agent overviews to endpoints-first layout

* docs: align chatbot and agent overviews to endpoints-first layout

* docs: align text generator overviews to endpoints-first layout

* docs: align knowledge overviews to endpoints-first layout

* docs: correct built-in metadata examples and agent heading

* docs: flatten app-type pages directly under guides

* docs: make guide pages self-contained and trim reference detail

* docs: add get started guide and retire developing-with-apis

* docs: update new agent api behavior for latest main

New Agent behavior re-verified against dify origin/main (f3ba2846):
agent_thought events now stream through the Service API carrying the
model's reasoning steps and tool calls; a new agent_not_published 400
fires on Send Chat Message and Get App Parameters; the files claim is
softened to contents-not-processed (raw references now reach the prompt;
runtime confirmation pending). Streaming-only, message_end metadata, and
the endpoint surface are unchanged.

* docs: audit fixes for get started and human input flow guides

* docs: fix em dash spacing and ja sentence length in get started

* docs: move message_end note to the send endpoint line

* docs: update writing guides and API skill for app-type naming

- Glossary and zh/ja translation guides: Workflow and Chatflow app types stay English (Workflow 应用 / Chatflow アプリ); lowercase workflow localizes to 工作流 / ワークフロー.
- formatting-guide: API reference links use the language prefix with English slugs.
- dify-docs-api-reference skill: Spec Structure documents source specs merged into openapi_service.json by the pipeline.

* feat: add operation sidebar titles and simplify API redirects

- merge_specs stamps x-mint.metadata.sidebarTitle per operation so translated summaries show in the sidebar.
- Redirects reduced to a catch-all to the English API home plus three knowledge-base exceptions.
- memberships, strings, and SSE overrides carry app-type labels (Workflow/Chatflow English, New Agent, API Overviews group).

* docs: correct app-type naming and translations across API specs

- English mode enum labels Chatflow and Workflow apps.
- zh/ja app references use Workflow/Chatflow; New Agent is 新 Agent / 新しい Agent.
- ja knowledge tag データセット becomes ナレッジベース; zh 模型提供商 becomes 模型供应商.
- Regenerate merged openapi_service.json with per-operation sidebar titles.

* docs: add streaming, errors, and end-user identity API guides

- Consume Streaming Responses: response modes, SSE parsing, event dispatch, and reconnect.
- Handle Errors and Rate Limits: the error envelope, status classes, and retry guidance.
- End User Identity: what the user field scopes and why it stays consistent.
- English source with zh and ja translations.

* docs: reconcile API guides and apply app-type naming

- Reader-test fixes and content audit on get-started and the app-type overview pages.
- zh/ja reconciled to the English source.
- Workflow/Chatflow and New Agent naming applied in prose.

* feat: wire API nav and redirects for consolidated guides

- Rename the guides group to API Overviews and register the new guide pages.
- Redirects: catch-all to the English API home plus three product-embedded knowledge-base links to the Knowledge guide.

* fix: normalize zh model-provider term to 模型供应商

Aligns the POSITION_PROVIDER_* descriptions with the canonical glossary term.

* docs: use Info callouts for guide forward-link notes

Wrap the authentication, base URL, and `user` field forward-reference in each app-type guide (agent, chat, chatflow, completion, workflow; en/zh/ja) in an `<Info>` callout.

* refactor: remove one-time analyze mode and verification compose

- Drop the `analyze` mode (design-time spec-overlap analysis) and its helpers; the merge is stable and nothing invokes it.
- Delete `compose.swagger.yml`, the throwaway local code-vs-spec verification stack (flagged in review for inline credentials).
- README: drop the analyze entry and correct the redirect description.

* fix: correct Chatflow naming and reasoning wording in SSE overrides

- Use "Chatflow" (English) for the app type in the `/chat-messages` SSE tables instead of 对话流/チャットフロー, and fix the legacy zh chatflow "对话流工作流" description. Standalone table cells were missed by the earlier app-type rename.
- Describe `reasoning_chunk` as "reasoning content" in en/ja (matching the `reasoning` field and the zh wording) instead of "chain-of-thought".

* docs: refine API guide wording and simplify the human-input example

* docs: standardize Workflow and Chatflow app-type capitalization

Capitalize Chatflow and Workflow when they name an app type; keep "workflow" lowercase for the general engine, graph, or run sense.

* fix: use 供应商 for model provider in the zh Knowledge spec

* fix: rename the Knowledge API nav group to "Knowledge APIs"

* fix: un-deprecate Update Document by Text in the Knowledge spec

* translate: un-deprecate Update Document by Text in zh/ja specs

Mirror the en fix (6802d5eb) into the zh and ja Knowledge specs, source and merged: drop the deprecated flag and the leading Deprecated notice from the update-by-text operation. It is the canonical text-update route; only Update Document by File stays deprecated.
2026-07-09 16:40:54 +08:00

6831 lines
278 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 (Chatflow API)",
"description": "Chatflow アプリケーションはセッションの永続化をサポートし、過去のチャット履歴をレスポンスのコンテキストとして使用できます。Chatflow アプリは `advanced-chat` モードを使用し、ノードの開始・完了、イテレーション、ワークフローのライフサイクルを含む詳細な実行追跡のためのワークフローレベルのストリーミングイベントを提供します。",
"version": "1.0.0"
},
"servers": [
{
"url": "https://{api_base_url}",
"description": "Chatflow アプリ API のベース URL です。セルフホスト環境では、独自の API ベース URL に置き換えてください。",
"variables": {
"api_base_url": {
"default": "api.dify.ai/v1",
"description": "API ベース URL のホストとパス(`https://` を除く)。"
}
}
}
],
"security": [
{
"ApiKeyAuth": []
}
],
"paths": {
"/chat-messages": {
"post": {
"summary": "チャットメッセージを送信",
"description": "チャットアプリケーションにリクエストを送信します。",
"operationId": "sendChatflowMessageJp",
"tags": [
"チャットフロー"
],
"requestBody": {
"description": "チャットメッセージを送信するためのリクエストボディ。",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatRequest"
},
"examples": {
"streaming_example": {
"summary": "リクエスト例 - ストリーミングモード",
"value": {
"inputs": {
"city": "San Francisco"
},
"query": "What are the specs of the iPhone 13 Pro Max?",
"response_mode": "streaming",
"conversation_id": "",
"user": "abc-123",
"files": [
{
"type": "image",
"transfer_method": "remote_url",
"url": "https://cloud.dify.ai/logo/logo-site.png"
}
]
}
},
"blocking_example": {
"summary": "リクエスト例 - ブロッキングモード",
"value": {
"inputs": {},
"query": "What are the specs of the iPhone 13 Pro Max?",
"response_mode": "blocking",
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "リクエスト成功。コンテンツタイプと構造はリクエストの `response_mode` パラメータに依存します。\n\n- `response_mode` が `blocking` の場合、 `application/json` で `ChatCompletionResponse` オブジェクトを返します。\n- `response_mode` が `streaming` の場合、`text/event-stream` でサーバー送信イベントのストリームを返します。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionResponse"
},
"examples": {
"blockingResponse": {
"summary": "レスポンス例 - ブロッキングモード",
"value": {
"event": "message",
"task_id": "c3800678-a077-43df-a102-53f23ed20b88",
"id": "b01a39de-3480-4f3e-9f1e-4841a80f8e5e",
"message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"mode": "advanced-chat",
"answer": "iPhone 13 Pro Max specs are listed here:...",
"metadata": {
"usage": {
"prompt_tokens": 1033,
"prompt_unit_price": "0.001",
"prompt_price_unit": "0.001",
"prompt_price": "0.0010330",
"completion_tokens": 128,
"completion_unit_price": "0.002",
"completion_price_unit": "0.001",
"completion_price": "0.0002560",
"total_tokens": 1161,
"total_price": "0.0012890",
"currency": "USD",
"latency": 0.7682376249867957
},
"retriever_resources": [
{
"position": 1,
"dataset_id": "101b4c97-fc2e-463c-90b1-5261a4cdcafb",
"dataset_name": "iPhone",
"document_id": "8dd1ad74-0b5f-4175-b735-7d98bbbb4e00",
"document_name": "iPhone List",
"segment_id": "ed599c7f-2766-4294-9d1d-e5235a61270a",
"score": 0.98457545,
"content": "\"Model\",\"Release Date\",\"Display Size\",\"Resolution\",\"Processor\",\"RAM\",\"Storage\",\"Camera\",\"Battery\",\"Operating System\" \"iPhone 13 Pro Max\",\"September 24, 2021\",\"6.7 inch\",\"1284 x 2778\",\"Hexa-core (2x3.23 GHz Avalanche + 4x1.82 GHz Blizzard)\",\"6 GB\",\"128, 256, 512 GB, 1TB\",\"12 MP\",\"4352 mAh\",\"iOS 15\""
}
]
},
"created_at": 1705407629
}
}
}
},
"text/event-stream": {
"schema": {
"type": "string",
"description": "サーバー送信イベント (SSE) のストリームです。\n\n**パース**:各イベントは `data: ` プレフィックス付きの JSON オブジェクトの行で、`\\n\\n` で終了します。JSON をパースする前に `data: ` プレフィックスを除去し、`event` フィールドを読み取ってイベントタイプを判定してください。`ping` イベントは `event: ping` 行(`data:` ペイロードなし)として 10 秒ごとに接続維持のために送信されるため、無視してください。\n\n**ストリームライフサイクル**:ワークフローの進行は `workflow_started`、ノードイベント(`node_started` と `node_finished`、およびイテレーションとループの各バリアント)として、回答は `message` イベントとしてストリーミングされます(`reasoning_format: separated` を指定した LLM ノードは、モデルの思考過程を伝える `reasoning_chunk` イベントも並行して発行します)。終了シーケンスは実行結果によって異なります:\n- **成功**`message_end`、続いて `workflow_finished`\n- **失敗**:ステータスが `failed` の `workflow_finished`、続いて `error`。`message_end` は送信されません\n- **一時停止**`human_input_required`、続いて `workflow_paused`(ストリームはここで終了し、実行は別途再開されます)\n\nテキスト読み上げ(TTS)の自動再生が有効な場合、`tts_message_end` が終了イベントの後に続きます。\n\n**イベント**:`ping` を除き、すべてのイベントには `conversation_id`、`message_id`、`created_at`Unix エポック秒)が含まれます。`error` を除くイベントには `task_id` も含まれます。ワークフロー、ノード、人間の入力イベントは、ペイロードを `data` の下にネストし、`agent_log` を除いてトップレベルの `workflow_run_id` を持ちます。\n\n**応答イベント**\n\n| イベント | 発生タイミング | 主なフィールド |\n|:---|:---|:---|\n| `message` | 回答の各チャンク(順番に連結) | `answer` |\n| `message_replace` | 出力モデレーションがそれまでの回答を置き換える | `answer`、`reason` |\n| `reasoning_chunk` | 思考過程の各デルタ(LLM ノードが `reasoning_format: separated` を使用する場合)。順番に連結してください。`is_final: true` の最終イベントは思考の完了を示し、空の `reasoning` を伴う場合があります | `data.message_id`、`data.reasoning`、`data.node_id`、`data.is_final` |\n| `message_end` | 回答が完了 | `metadata``usage`、`retriever_resources` |\n| `tts_message`、`tts_message_end` | 音声チャンク/終了(TTS 自動再生が有効な場合) | `audio` |\n\n**ワークフロー・ノードイベント**\n\n各イベントはペイロードを `data` オブジェクトの下にネストします。\n\n| イベント | 発生タイミング | 主な `data` フィールド |\n|:---|:---|:---|\n| `workflow_started` | 実行開始 | `inputs` |\n| `node_started` | ノード開始 | `node_id`、`node_type`、`title` |\n| `node_finished` | ノード終了 | `status`、`outputs`、`execution_metadata` |\n| `node_retry` | 失敗後にノードを再試行 | `retry_index` |\n| `iteration_started`、`iteration_next`、`iteration_completed` | イテレーションノードの進行(情報提供のみ、処理は任意) | `data` |\n| `loop_started`、`loop_next`、`loop_completed` | ループノードの進行(情報提供のみ、処理は任意) | `data` |\n| `agent_log` | Agent ノードのステップログ(情報提供のみ、処理は任意、`workflow_run_id` なし) | `data` |\n| `workflow_finished` | 実行終了 | `status``succeeded`、`failed`、`partial-succeeded`、`stopped`)、`outputs`、`total_tokens` |\n| `workflow_paused` | 実行が一時停止 | `paused_nodes`、`reasons` |\n| `human_input_required` | 実行が人間の入力ノードに到達 | `form_token`、`form_content`、`expiration_time` |\n\n一時停止後、このストリームは `workflow_paused` で終了します。[人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) でフォームを送信するか、タイムアウトさせてください。再開後の実行(`human_input_form_filled`/`human_input_form_timeout` から `workflow_finished` までを含む)は、[ワークフローイベントをストリーム](/api-reference/チャットフロー/ワークフローイベントをストリーム) からストリーミングされます。\n\n**トランスポートイベント**\n\n| イベント | 発生タイミング | 主なフィールド |\n|:---|:---|:---|\n| `error` | 失敗によりストリームが終了。HTTP は `200` のまま | `status`(例:`400`)、`code`(例:`invalid_param`)、`message` |\n| `ping` | 10 秒ごとのキープアライブ | なし |"
},
"examples": {
"streamingResponseBasic": {
"summary": "Response Example - Streaming (Basic)",
"value": "data: {\"event\": \"message\", \"task_id\": \"mock_task_id\", \"message_id\": \"5ad4cb98-f0c7-4085-b384-88c403be6290\", \"conversation_id\": \"45701982-8118-4bc5-8e9b-64562b4555f2\", \"answer\": \" I\", \"created_at\": 1679586595} data: {\"event\": \"message_end\", \"task_id\": \"mock_task_id\", \"message_id\": \"5ad4cb98-f0c7-4085-b384-88c403be6290\", \"conversation_id\": \"45701982-8118-4bc5-8e9b-64562b4555f2\", \"created_at\": 1679586595, \"metadata\": {\"usage\": {\"total_tokens\": 10, \"latency\": 1.0}}}"
},
"streamingResponseWorkflow": {
"summary": "Response Example - Streaming (Workflow)",
"value": "data: {\"event\": \"workflow_started\", \"task_id\": \"task123\", \"workflow_run_id\": \"wfr_abc123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395332, \"data\": {\"id\": \"wfr_abc123\", \"workflow_id\": \"wf_def456\", \"inputs\": {\"city\": \"San Francisco\"}, \"created_at\": 1705395332}} data: {\"event\": \"node_started\", \"task_id\": \"task123\", \"workflow_run_id\": \"wfr_abc123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395332, \"data\": {\"id\": \"ne_001\", \"node_id\": \"node_llm_1\", \"node_type\": \"llm\", \"title\": \"LLM\", \"index\": 1, \"created_at\": 1705395332}} data: {\"event\": \"reasoning_chunk\", \"task_id\": \"task123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395333, \"data\": {\"message_id\": \"msg123\", \"reasoning\": \"The user greeted me, so\", \"node_id\": \"node_llm_1\", \"is_final\": false}} data: {\"event\": \"reasoning_chunk\", \"task_id\": \"task123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395333, \"data\": {\"message_id\": \"msg123\", \"reasoning\": \"\", \"node_id\": \"node_llm_1\", \"is_final\": true}} data: {\"event\": \"message\", \"task_id\": \"task123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"answer\": \" I\", \"created_at\": 1705395333} data: {\"event\": \"node_finished\", \"task_id\": \"task123\", \"workflow_run_id\": \"wfr_abc123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395334, \"data\": {\"id\": \"ne_001\", \"node_id\": \"node_llm_1\", \"node_type\": \"llm\", \"title\": \"LLM\", \"index\": 1, \"status\": \"succeeded\", \"elapsed_time\": 1.5, \"created_at\": 1705395332, \"finished_at\": 1705395334}} data: {\"event\": \"message_end\", \"task_id\": \"task123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395334, \"metadata\": {\"usage\": {\"total_tokens\": 50, \"latency\": 2.5}}} data: {\"event\": \"workflow_finished\", \"task_id\": \"task123\", \"workflow_run_id\": \"wfr_abc123\", \"message_id\": \"msg123\", \"conversation_id\": \"conv123\", \"created_at\": 1705395335, \"data\": {\"id\": \"wfr_abc123\", \"workflow_id\": \"wf_def456\", \"status\": \"succeeded\", \"elapsed_time\": 2.5, \"total_tokens\": 50, \"total_steps\": 2, \"created_at\": 1705395332, \"finished_at\": 1705395335}}"
},
"humanInputPause": {
"summary": "レスポンス例 - 人間の入力での一時停止",
"value": "data: {\"event\": \"workflow_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407629, \"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\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407629, \"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\": \"paragraph\", \"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\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407629, \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"paused_nodes\": [\"approval_node\"], \"outputs\": {}, \"reasons\": [{\"TYPE\": \"human_input_required\", \"form_id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\", \"form_content\": \"Please review the draft.\", \"inputs\": [{\"type\": \"paragraph\", \"output_variable_name\": \"comment\", \"default\": null}], \"actions\": [{\"id\": \"approve\", \"title\": \"Approve\", \"button_style\": \"primary\"}], \"node_id\": \"approval_node\", \"node_title\": \"Approval\", \"resolved_default_values\": {\"comment\": \"\"}, \"form_token\": \"tok_abc123\", \"expiration_time\": 1705494029}], \"status\": \"paused\", \"created_at\": 1705407629, \"elapsed_time\": 0.5, \"total_tokens\": 0, \"total_steps\": 1}}"
}
}
}
}
},
"400": {
"description": "- `app_unavailable` : アプリケーションが利用できないか、設定が正しくありません。\n- `not_chat_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` : テキスト生成に失敗しました。\n- `bad_request` : Cannot use draft workflow version.\n- `bad_request` : Invalid `workflow_id` format.",
"content": {
"application/json": {
"examples": {
"app_unavailable": {
"summary": "app_unavailable",
"value": {
"status": 400,
"code": "app_unavailable",
"message": "App unavailable, please check your app configurations."
}
},
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_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."
}
},
"is_draft_workflow": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "Cannot use draft workflow version. Workflow ID: a1b2c3d4-5678-90ab-cdef-1234567890ab. "
}
},
"workflow_id_format_error": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "Invalid workflow_id format: 'not-a-valid-id'. "
}
}
}
}
}
},
"404": {
"description": "- `not_found` : 会話が存在しません。\n- `not_found` : 指定された `workflow_id` のワークフローが見つかりません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
},
"workflow_not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Workflow not found with id: a1b2c3d4-5678-90ab-cdef-1234567890ab"
}
}
}
}
}
},
"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."
}
}
}
}
}
}
}
}
},
"/chat-messages/{task_id}/stop": {
"post": {
"summary": "生成を停止",
"description": "チャットメッセージ生成タスクを停止します。`streaming` モードでのみサポートされます。",
"operationId": "stopChatflowMessageGenerationJp",
"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": "ユーザー識別子です。メッセージ送信時に渡した `user` と一致する必要があります。一致しない場合、停止は行われず、レスポンスは成功を返します。"
}
}
},
"examples": {
"example": {
"summary": "リクエスト例",
"value": {
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/SuccessResult"
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
}
}
}
},
"/messages/{message_id}/suggested": {
"get": {
"summary": "次の推奨質問を取得",
"description": "現在のメッセージに対する次の質問の提案を取得します。",
"operationId": "getChatflowSuggestedQuestionsJp",
"tags": [
"チャットフロー"
],
"parameters": [
{
"name": "message_id",
"in": "path",
"required": true,
"description": "メッセージ ID。",
"schema": {
"type": "string"
}
},
{
"name": "user",
"in": "query",
"required": true,
"description": "ユーザー識別子。",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "提案された質問の取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuggestedQuestionsResponse"
},
"examples": {
"suggestedQuestions": {
"summary": "レスポンス例",
"value": {
"result": "success",
"data": [
"What colors does the iPhone 13 Pro Max come in?",
"How does the battery compare to iPhone 12?",
"What is the price range?"
]
}
}
}
}
}
},
"400": {
"description": "- `not_chat_app` : アプリモードが API ルートと一致しません。\n- `bad_request` : 推奨質問機能が無効です。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_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": "Suggested Questions Is Disabled."
}
}
}
}
}
},
"404": {
"description": "`not_found` : メッセージが存在しません。",
"content": {
"application/json": {
"examples": {
"message_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Message Not Exists."
}
}
}
}
}
},
"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."
}
}
}
}
}
}
},
"x-codeSamples": [
{
"lang": "bash",
"label": "cURL",
"source": "curl --request GET \\\n --url 'https://{api_base_url}/messages/{message_id}/suggested?user={user}' \\\n --header 'Authorization: Bearer {api_key}'"
}
]
}
},
"/files/upload": {
"post": {
"operationId": "uploadChatflowFileJp",
"tags": [
"ファイル操作"
],
"summary": "ファイルをアップロード",
"description": "メッセージ送信時に使用するファイルをアップロードします。画像、ドキュメント、音声、動画のマルチモーダル理解が可能です。アップロードされたファイルは現在のエンドユーザーのみが使用できます。",
"requestBody": {
"description": "ファイルアップロードリクエスト。multipart/form-data 形式が必要です。",
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "アップロードするファイル。サポートされるタイプには画像、ドキュメント、音声、動画が含まれます。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。開発者のルールで定義され、アプリケーション内で一意である必要があります。Service API と WebApp のユーザー ID は独立しており、値が同じでも同じユーザーを指しません。省略した場合、アップロードは共有の `DEFAULT-USER` エンドユーザーに帰属します。ファイルは、アップロード時と同じ `user` 値を持つリクエストからのみ使用できます。"
}
}
}
}
}
},
"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": "https://upload.dify.ai/files/a1b2c3d4-5678-90ab-cdef-1234567890ab/file-preview?timestamp=1705407629&nonce=8b3e26a5&sign=rN5DXW3xkVGwGE5MSvptu_BhQVXpMbXWmVJ0ib0LMzI=",
"original_url": null,
"user_id": null,
"tenant_id": "11223344-5566-7788-99aa-bbccddeeff00",
"conversation_id": null,
"file_key": null
}
}
}
}
}
},
"400": {
"description": "- `no_file_uploaded` : リクエストにファイルが提供されていません。\n- `too_many_files` : 1 回のリクエストにつき 1 ファイルのみ許可されています。\n- `filename_not_exists_error` : アップロードされたファイルにファイル名がありません。\n- `invalid_param` : ファイル名に不正な文字(`/` または `\\`)が含まれています。",
"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."
}
},
"invalid_param": {
"summary": "invalid_param",
"value": {
"status": 400,
"code": "invalid_param",
"message": "Filename contains invalid characters"
}
}
}
}
}
},
"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": "previewChatflowFileJp",
"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": "getEndUserChatflowJp",
"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."
}
}
}
}
}
}
}
}
},
"/messages/{message_id}/feedbacks": {
"post": {
"operationId": "postChatflowMessageFeedbackJp",
"tags": [
"メッセージフィードバック"
],
"summary": "メッセージフィードバックを送信",
"description": "メッセージに対するフィードバックを送信します。エンドユーザーはメッセージを `like` または `dislike` で評価でき、任意でテキストフィードバックを提供できます。`rating` に `null` を渡すと、以前送信したフィードバックを取り消せます。",
"parameters": [
{
"name": "message_id",
"in": "path",
"required": true,
"description": "メッセージ ID。",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageFeedbackRequest"
},
"examples": {
"likeFeedback": {
"summary": "リクエスト例",
"value": {
"rating": "like",
"user": "abc-123",
"content": "This answer was very helpful!"
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/SuccessResult"
},
"404": {
"description": "`not_found` : メッセージが存在しません。",
"content": {
"application/json": {
"examples": {
"message_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Message Not Exists."
}
}
}
}
}
}
}
}
},
"/app/feedbacks": {
"get": {
"operationId": "getChatflowAppFeedbacksJp",
"tags": [
"メッセージフィードバック"
],
"summary": "アプリのフィードバック一覧を取得",
"description": "このアプリケーションのメッセージに対して送信されたすべてのフィードバックのページネーション付きリストを取得します。エンドユーザーと管理者のフィードバックの両方が含まれます。",
"parameters": [
{
"name": "page",
"in": "query",
"description": "ページネーションのページ番号。",
"required": false,
"schema": {
"type": "integer",
"default": 1,
"minimum": 1
}
},
{
"name": "limit",
"in": "query",
"description": "1ページあたりのレコード数。",
"required": false,
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 101
}
}
],
"responses": {
"200": {
"description": "アプリケーションフィードバックのリスト。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppFeedbacksResponse"
},
"examples": {
"feedbacksList": {
"summary": "レスポンス例",
"value": {
"data": [
{
"id": "b7e2f8a1-3c4d-5e6f-7890-abcdef123456",
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"message_id": "9da23599-e713-473b-982c-4328d4f5c78a",
"rating": "like",
"content": "The response accurately answered my question about product specifications.",
"from_source": "user",
"from_end_user_id": "f1e2d3c4-b5a6-7890-abcd-ef1234567890",
"from_account_id": null,
"created_at": "2025-01-16T14:30:29Z",
"updated_at": "2025-01-16T14:30:29Z"
},
{
"id": "c8f3a9b2-4d5e-6f70-8901-bcdef2345678",
"app_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"conversation_id": "56812a93-9229-5cd6-9f0c-75673b666603",
"message_id": "ae24b5c0-f814-584d-a493-5439e5d6b7b1",
"rating": "dislike",
"content": "The answer was too vague and did not address the specific pricing question.",
"from_source": "user",
"from_end_user_id": "d2c1b0a9-8765-4321-fedc-ba9876543210",
"from_account_id": null,
"created_at": "2025-01-15T09:12:45Z",
"updated_at": "2025-01-15T09:12:45Z"
}
]
}
}
}
}
}
}
}
}
},
"/conversations": {
"get": {
"summary": "会話一覧を取得",
"description": "現在のユーザーの会話リストを、最近アクティブな順に取得します。",
"operationId": "getChatflowConversationsListJp",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "user",
"in": "query",
"required": false,
"description": "ユーザー識別子。",
"schema": {
"type": "string"
}
},
{
"name": "last_id",
"in": "query",
"required": false,
"description": "現在のページの最後のレコードの ID(ページネーション用)です。",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "返すレコード数です。",
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 100
}
},
{
"name": "sort_by",
"in": "query",
"required": false,
"description": "ソートフィールドです。降順にするには '-' プレフィックスを使用します。",
"schema": {
"type": "string",
"enum": [
"created_at",
"-created_at",
"updated_at",
"-updated_at"
],
"default": "-updated_at"
}
}
],
"responses": {
"200": {
"description": "会話リストの取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationsListResponse"
},
"examples": {
"conversationsList": {
"summary": "レスポンス例",
"value": {
"limit": 20,
"has_more": false,
"data": [
{
"id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"name": "iPhone Specs Chat",
"inputs": {
"city": "San Francisco"
},
"status": "normal",
"introduction": "Welcome! How can I help you today?",
"created_at": 1705407629,
"updated_at": 1705411229
}
]
}
}
}
}
}
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : 前の会話が存在しません(無効な `last_id`)。",
"content": {
"application/json": {
"examples": {
"last_conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Last Conversation Not Exists."
}
}
}
}
}
}
}
}
},
"/messages": {
"get": {
"summary": "会話履歴メッセージ一覧を取得",
"description": "スクロール読み込み形式で過去のチャット記録を返します。最初のページは最新の `limit` 件のメッセージを返します(時系列の逆順)。",
"operationId": "getChatflowConversationHistoryJp",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "conversation_id",
"in": "query",
"required": true,
"description": "会話 ID。",
"schema": {
"type": "string"
}
},
{
"name": "user",
"in": "query",
"required": false,
"description": "ユーザー識別子。",
"schema": {
"type": "string"
}
},
{
"name": "first_id",
"in": "query",
"required": false,
"description": "現在のページの最初のチャット記録の ID です。デフォルトは `null`(最新のメッセージを取得)です。次のページを取得するには、現在のリストの最初のメッセージの ID を使用して、より古いメッセージを取得します。",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "リクエストごとに返すチャット履歴メッセージの数です。",
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 100
}
}
],
"responses": {
"200": {
"description": "会話履歴の取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationHistoryResponse"
},
"examples": {
"conversationHistory": {
"summary": "レスポンス例",
"value": {
"limit": 20,
"has_more": false,
"data": [
{
"id": "9da23599-e713-473b-982c-4328d4f5c78a",
"conversation_id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"parent_message_id": null,
"inputs": {
"city": "San Francisco"
},
"query": "What are the specs of the iPhone 13 Pro Max?",
"answer": "iPhone 13 Pro Max specs are listed here:...",
"status": "normal",
"error": null,
"message_files": [],
"feedback": {
"rating": "like"
},
"retriever_resources": [],
"agent_thoughts": [],
"created_at": 1705407629
}
]
}
}
}
}
}
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "- `not_found` : 会話が存在しません。\n- `not_found` : 最初のメッセージが存在しません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
},
"first_message_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "First Message Not Exists."
}
}
}
}
}
}
},
"x-codeSamples": [
{
"lang": "bash",
"label": "cURL",
"source": "curl --request GET \\\n --url 'https://{api_base_url}/messages?conversation_id={conversation_id}&user={user}' \\\n --header 'Authorization: Bearer {api_key}'"
}
]
}
},
"/conversations/{conversation_id}/variables": {
"get": {
"summary": "会話変数の取得",
"description": "特定の会話から変数を取得します。",
"operationId": "getChatflowConversationVariablesJp",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "conversation_id",
"in": "path",
"required": true,
"description": "会話 ID。",
"schema": {
"type": "string"
}
},
{
"name": "user",
"in": "query",
"required": false,
"description": "ユーザー識別子です。",
"schema": {
"type": "string"
}
},
{
"name": "last_id",
"in": "query",
"required": false,
"description": "現在のページの最後のレコードの ID(ページネーション用)です。",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"in": "query",
"required": false,
"description": "返すレコード数です。",
"schema": {
"type": "integer",
"default": 20,
"minimum": 1,
"maximum": 100
}
},
{
"name": "variable_name",
"in": "query",
"required": false,
"description": "指定した名前で変数をフィルタリングします。",
"schema": {
"type": "string",
"minLength": 1,
"maxLength": 255
}
}
],
"responses": {
"200": {
"description": "会話変数の取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationVariablesResponse"
},
"examples": {
"conversationVariables": {
"summary": "レスポンス例",
"value": {
"limit": 20,
"has_more": false,
"data": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"name": "user_preference",
"value_type": "string",
"value": "dark_mode",
"description": "ユーザー設定",
"created_at": 1705407629,
"updated_at": 1705411229
}
]
}
}
}
}
}
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : 会話が存在しません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
}
}
}
}
}
}
}
},
"/conversations/{conversation_id}/name": {
"post": {
"summary": "会話の名前を変更",
"description": "会話の名前を変更するか、自動的に生成します。会話名は複数の会話をサポートするクライアントでの表示に使用されます。",
"operationId": "renameChatflowConversationJp",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "conversation_id",
"in": "path",
"required": true,
"description": "会話 ID。",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationRenameRequest"
},
"examples": {
"renameExample": {
"summary": "リクエスト例",
"value": {
"name": "iPhone Specs Chat",
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "会話が正常に名前変更されました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationListItem"
},
"examples": {
"renamedConversation": {
"summary": "レスポンス例",
"value": {
"id": "45701982-8118-4bc5-8e9b-64562b4555f2",
"name": "iPhone Specs Chat",
"inputs": {
"city": "San Francisco"
},
"status": "normal",
"introduction": "Welcome! How can I help you today?",
"created_at": 1705407629,
"updated_at": 1705411229
}
}
}
}
}
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : 会話が存在しません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
}
}
}
}
}
}
}
},
"/conversations/{conversation_id}/variables/{variable_id}": {
"put": {
"summary": "会話変数を更新",
"description": "特定の会話変数の値を更新します。値は期待される型と一致する必要があります。",
"operationId": "updateChatflowConversationVariableJa",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "conversation_id",
"in": "path",
"required": true,
"description": "会話 ID。",
"schema": {
"type": "string",
"format": "uuid"
}
},
{
"name": "variable_id",
"in": "path",
"required": true,
"description": "Variable ID.",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationVariableUpdateRequest"
},
"examples": {
"updateStringVariable": {
"summary": "リクエスト例",
"value": {
"value": "new value",
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "変数が正常に更新されました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationVariableItem"
},
"examples": {
"updatedVariable": {
"summary": "レスポンス例",
"value": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"name": "user_preference",
"value_type": "string",
"value": "new value",
"description": "ユーザー設定",
"created_at": 1705407629,
"updated_at": 1705411229
}
}
}
}
}
},
"400": {
"description": "- `not_chat_app` : アプリモードが API ルートと一致しません。\n- `bad_request` : 変数値の型が一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
},
"type_mismatch": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "Value type mismatch: expected string, got integer."
}
}
}
}
}
},
"404": {
"description": "- `not_found` : 会話が存在しません。\n- `not_found` : 会話変数が存在しません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
},
"variable_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Variable Not Exists."
}
}
}
}
}
}
}
}
},
"/conversations/{conversation_id}": {
"delete": {
"summary": "会話を削除",
"description": "会話を削除します。",
"operationId": "deleteChatflowConversationJp",
"tags": [
"会話管理"
],
"parameters": [
{
"name": "conversation_id",
"in": "path",
"required": true,
"description": "会話 ID。",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"description": "JSON ボディは常に必須です。`user` を省略する場合は `{}` を送信してください。",
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"type": "string",
"description": "ユーザー識別子です。"
}
}
},
"examples": {
"deleteExample": {
"value": {
"user": "abc-123"
},
"summary": "リクエスト例"
}
}
}
}
},
"responses": {
"204": {
"description": "会話の削除に成功しました。コンテンツは返されません。"
},
"400": {
"description": "`not_chat_app` : アプリモードが API ルートと一致しません。",
"content": {
"application/json": {
"examples": {
"not_chat_app": {
"summary": "not_chat_app",
"value": {
"status": 400,
"code": "not_chat_app",
"message": "Please check if your app mode matches the right API route."
}
}
}
}
}
},
"404": {
"description": "`not_found` : 会話が存在しません。",
"content": {
"application/json": {
"examples": {
"conversation_not_exists": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Conversation Not Exists."
}
}
}
}
}
}
}
}
},
"/audio-to-text": {
"post": {
"operationId": "chatflowAudioToTextJp",
"tags": [
"音声・テキスト変換"
],
"summary": "音声をテキストに変換",
"description": "音声ファイルをテキストに変換します。アップロードされたファイルの MIME タイプで検証され、`audio/mp3`、`audio/m4a`、`audio/wav`、`audio/amr`、`audio/mpga` のいずれかである必要があります。それ以外のタイプ(一般的な `audio/mpeg` を含む)は `unsupported_audio_type` エラーで拒否されます。ファイルサイズの上限は `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": "chatflowTextToAudioJp",
"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": "getChatflowAppInfoJp",
"tags": [
"アプリケーション設定"
],
"summary": "アプリケーションの基本情報を取得",
"description": "このアプリケーションの基本情報(名前、説明、タグ、モード)を取得します。",
"responses": {
"200": {
"description": "アプリケーションの基本情報。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AppInfoResponse"
},
"examples": {
"appInfo": {
"summary": "レスポンス例",
"value": {
"name": "My Chatflow App",
"description": "便利なカスタマーサービスチャットボット。",
"tags": [
"customer-service",
"chatbot"
],
"mode": "advanced-chat",
"author_name": "Dify Team"
}
}
}
}
}
}
}
}
},
"/parameters": {
"get": {
"operationId": "getChatflowAppParametersJp",
"tags": [
"アプリケーション設定"
],
"summary": "アプリケーションのパラメータ情報を取得",
"description": "アプリケーションの入力フォーム設定(機能スイッチ、入力パラメータ名、タイプ、デフォルト値)を取得します。",
"responses": {
"200": {
"description": "アプリケーションパラメータ情報。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatAppParametersResponse"
},
"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": "getChatflowAppMetaJp",
"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": "getChatflowWebAppSettingsJp",
"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."
}
}
}
}
}
}
}
}
},
"/apps/annotations": {
"post": {
"summary": "アノテーションを作成",
"description": "新しいアノテーションを作成します。アノテーションは、アプリがレスポンスを生成する代わりに直接マッチして返すことができる、事前定義された質問と回答のペアを提供します。",
"operationId": "createChatflowAnnotationJa",
"tags": [
"アノテーション管理"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAnnotationRequest"
},
"examples": {
"createAnnotation": {
"summary": "リクエスト例",
"value": {
"question": "What is Dify?",
"answer": "Dify is an open-source LLM application development platform."
}
}
}
}
}
},
"responses": {
"201": {
"description": "アノテーションが正常に作成されました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationItem"
},
"examples": {
"createdAnnotation": {
"summary": "レスポンス例",
"value": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"question": "What is Dify?",
"answer": "Dify is an open-source LLM application development platform.",
"hit_count": 0,
"created_at": 1705407629
}
}
}
}
}
}
}
},
"get": {
"summary": "アノテーションリストを取得",
"description": "アプリケーションのアノテーションをページネーションリストで取得します。キーワード検索によるフィルタリングをサポートしています。",
"operationId": "listChatflowAnnotationsJa",
"tags": [
"アノテーション管理"
],
"parameters": [
{
"name": "page",
"in": "query",
"description": "ページネーションのページ番号。",
"required": false,
"schema": {
"type": "integer",
"default": 1
}
},
{
"name": "limit",
"in": "query",
"description": "1 ページあたりの件数です。",
"required": false,
"schema": {
"type": "integer",
"default": 20
}
},
{
"name": "keyword",
"in": "query",
"description": "質問または回答の内容でアノテーションをフィルタリングするためのキーワードです。",
"required": false,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "アノテーションリストの取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationListResponse"
},
"examples": {
"annotationList": {
"summary": "レスポンス例",
"value": {
"data": [
{
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"question": "What is Dify?",
"answer": "Dify is an open-source LLM application development platform.",
"hit_count": 5,
"created_at": 1705407629
}
],
"has_more": false,
"limit": 20,
"total": 1,
"page": 1
}
}
}
}
}
}
}
}
},
"/apps/annotations/{annotation_id}": {
"put": {
"summary": "アノテーションを更新",
"description": "既存のアノテーションの質問と回答を更新します。",
"operationId": "updateChatflowAnnotationJa",
"tags": [
"アノテーション管理"
],
"parameters": [
{
"name": "annotation_id",
"in": "path",
"required": true,
"description": "更新するアノテーションの一意の識別子です。",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateAnnotationRequest"
},
"examples": {
"updateAnnotation": {
"summary": "リクエスト例",
"value": {
"question": "What is Dify?",
"answer": "Dify is an open-source LLM application development platform for building AI-powered apps."
}
}
}
}
}
},
"responses": {
"200": {
"description": "アノテーションが正常に更新されました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AnnotationItem"
},
"examples": {
"updatedAnnotation": {
"summary": "レスポンス例",
"value": {
"id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"question": "What is Dify?",
"answer": "Dify is an open-source LLM application development platform for building AI-powered apps.",
"hit_count": 5,
"created_at": 1705407629
}
}
}
}
}
},
"404": {
"description": "`not_found` : アノテーションが存在しません。",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Annotation not found."
}
}
}
}
}
}
}
},
"delete": {
"summary": "アノテーションを削除",
"description": "アノテーションとその関連するヒット履歴を削除します。",
"operationId": "deleteChatflowAnnotationJa",
"tags": [
"アノテーション管理"
],
"parameters": [
{
"name": "annotation_id",
"in": "path",
"required": true,
"description": "削除するアノテーションの一意の識別子です。",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"204": {
"description": "アノテーションが正常に削除されました。"
},
"404": {
"description": "`not_found` : アノテーションが存在しません。",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "Annotation not found."
}
}
}
}
}
}
}
}
},
"/apps/annotation-reply/{action}": {
"post": {
"summary": "アノテーション返信を設定",
"description": "アノテーション返信機能を有効または無効にします。リクエストボディはアクションの実行前に検証されるため、`enable` と `disable` のどちらでも `embedding_provider_name`、`embedding_model_name`、`score_threshold` が必須です。非同期で実行されます。進捗は [アノテーション返信の初期設定タスクステータスを取得](/api-reference/アノテーション管理/アノテーション返信の初期設定タスクステータスを取得) で追跡してください。",
"operationId": "setChatflowAnnotationReplyJa",
"tags": [
"アノテーション管理"
],
"parameters": [
{
"name": "action",
"in": "path",
"required": true,
"description": "実行するアクションです。",
"schema": {
"type": "string",
"enum": [
"enable",
"disable"
]
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InitialAnnotationReplySettingsRequest"
},
"examples": {
"enableAnnotationReply": {
"summary": "リクエスト例",
"value": {
"score_threshold": 0.9,
"embedding_provider_name": "openai",
"embedding_model_name": "text-embedding-3-small"
}
}
}
}
}
},
"responses": {
"200": {
"description": "アノテーション返信設定タスクが開始されました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InitialAnnotationReplySettingsResponse"
},
"examples": {
"annotationReplyResponse": {
"summary": "レスポンス例",
"value": {
"job_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"job_status": "waiting"
}
}
}
}
}
}
}
}
},
"/apps/annotation-reply/{action}/status/{job_id}": {
"get": {
"summary": "アノテーション返信の初期設定タスクステータスを取得",
"description": "[アノテーション返信を設定](/api-reference/アノテーション管理/アノテーション返信を設定) で開始された非同期アノテーション返信設定ジョブのステータスを取得します。",
"operationId": "getChatflowAnnotationReplyStatusJa",
"tags": [
"アノテーション管理"
],
"parameters": [
{
"name": "action",
"in": "path",
"required": true,
"description": "アクションタイプです。[アノテーション返信を設定](/api-reference/アノテーション管理/アノテーション返信を設定) の呼び出しと一致する必要があります。",
"schema": {
"type": "string",
"enum": [
"enable",
"disable"
]
}
},
{
"name": "job_id",
"in": "path",
"required": true,
"description": "[アノテーション返信を設定](/api-reference/アノテーション管理/アノテーション返信を設定) から返されたジョブ ID です。",
"schema": {
"type": "string",
"format": "uuid"
}
}
],
"responses": {
"200": {
"description": "タスクステータスの取得に成功しました。",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InitialAnnotationReplySettingsStatusResponse"
},
"examples": {
"jobStatus": {
"summary": "レスポンス例",
"value": {
"job_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab",
"job_status": "completed",
"error_msg": ""
}
}
}
}
}
},
"400": {
"description": "`invalid_param` : 指定されたジョブが存在しません。",
"content": {
"application/json": {
"examples": {
"invalid_param": {
"summary": "invalid_param",
"value": {
"status": 400,
"code": "invalid_param",
"message": "The job does not exist."
}
}
}
}
}
}
}
}
},
"/workflows/run/{workflow_run_id}": {
"get": {
"summary": "ワークフロー実行詳細を取得",
"description": "ワークフロー実行 ID に基づいて、ワークフロータスクの現在の実行結果を取得します。",
"operationId": "getChatflowWorkflowRunDetailJa",
"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": "過去のワークフロー実行を、任意のフィルターで一覧表示します。各エントリは実行単位のサマリー(ステータス、トークン使用量、ステップ数、所要時間)であり、ノードごとの実行ログではありません。\n\n実行のノードレベルのイベントを追跡するには、代わりにストリーミングを使用します。\n\n- **自分で開始する実行**:[チャットメッセージを送信](/api-reference/チャットフロー/チャットメッセージを送信) をストリーミングモードで使用すると、実行の進行に応じて `node_started` と `node_finished` が送信されます。\n- **すでに進行中の実行**:[ワークフローイベントをストリーム](/api-reference/チャットフロー/ワークフローイベントをストリーム) を `include_state_snapshot=true` 付きで呼び出し、実行済み各ノードのステータスを再送してから、残りをストリーミングします。\n\n完了した実行のノードレベルのログは、サービス API 経由では取得できません。",
"operationId": "listChatflowWorkflowLogsJa",
"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": "作成者のアカウントのメールアドレス(例:`name@example.com`)でフィルタリングします。",
"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
},
"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_chatflow_123"
},
"created_at": 1705407629
}
]
}
}
}
}
}
}
}
}
},
"/form/human_input/{form_token}": {
"get": {
"tags": [
"人間の入力"
],
"summary": "人間の入力フォームを取得",
"description": "一時停止中の人間の入力フォームの内容を取得します。 WebApp 配信が必要です。\n\n人間の入力エンドポイントを呼び出す一連の流れについては、[API 連携フロー](/ja/api-reference/guides/human-input-flow) を参照してください。",
"operationId": "getChatflowHumanInputForm",
"parameters": [
{
"name": "form_token",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "一時停止中のフォームへのアクセストークン。ストリーミングモードのワークフローを実行エンドポイントまたはチャットメッセージを送信エンドポイントが返す `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": "フォーム入力コントロールの種類。利用可能な値: `paragraph` (複数行テキスト入力)、 `select` (リストからの単一選択)、 `file` (単一ファイルアップロード)、 `file-list` (複数ファイルアップロード)。"
},
"output_variable_name": {
"type": "string",
"description": "ワークフロー内でこの入力の送信値を参照する際の変数名。送信リクエストの `inputs` オブジェクトのキーに対応します。"
},
"default": {
"type": "object",
"nullable": true,
"description": "`paragraph` 入力の生のデフォルト値設定。クライアントはこのフィールドを直接解決すべきではありません。デフォルトの表示には `resolved_default_values` を使用してください。その他の入力タイプ、またはデフォルト値が未設定の場合は `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` の場合のリテラルなデフォルト値。常に文字列です。"
}
}
},
"option_source": {
"type": "object",
"description": "`select` 入力の選択肢のソース。 `type` が `select` の場合のみ含まれます。",
"properties": {
"type": {
"type": "string",
"enum": [
"variable",
"constant"
],
"description": "選択肢のソース。 `constant` は `value` に選択肢を直接列挙することを示します。 `variable` は `selector` が選択肢を提供する `array[string]` 型のワークフロー変数を指すことを示します。"
},
"selector": {
"type": "array",
"items": {
"type": "string"
},
"description": "`type` が `variable` の場合の変数参照パス。"
},
"value": {
"type": "array",
"items": {
"type": "string"
},
"description": "`type` が `constant` の場合のリテラルな選択肢リスト。"
}
}
},
"allowed_file_types": {
"type": "array",
"items": {
"type": "string",
"enum": [
"image",
"document",
"audio",
"video",
"custom"
]
},
"description": "受信者がアップロード可能なファイルカテゴリ。 `file` および `file-list` 入力に含まれます。値: `image`、 `document`、 `audio`、 `video`、 `custom`。"
},
"allowed_file_extensions": {
"type": "array",
"items": {
"type": "string"
},
"description": "`allowed_file_types` に `custom` が含まれる場合に許可されるファイル拡張子。各拡張子には先頭の `.` を含めてください。たとえば `.md` です。`file` および `file-list` 入力に含まれます。"
},
"allowed_file_upload_methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"local_file",
"remote_url"
]
},
"description": "受信者が使用できるアップロード方法。値: `local_file`、 `remote_url`。 `file` および `file-list` 入力に含まれます。"
},
"number_limits": {
"type": "integer",
"description": "受信者がアップロードできるファイルの最大数。 `file-list` 入力のみに含まれます。"
}
}
},
"description": "フォーム入力フィールドの定義。"
},
"resolved_default_values": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"description": "フォームに表示するための事前計算済みデフォルト値。入力の `output_variable_name` をキーとします。デフォルト値がワークフロー変数から解決可能な `paragraph` 入力にのみ設定されます。解決可能なデフォルトがない入力では空になります。クライアントはこれらの値をそのまま表示してください。 `default` をクライアント側で再解決する必要はありません。すべての値は文字列化されています。"
},
"user_actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"maxLength": 20,
"pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
"description": "アクションボタンの識別子。受信者がこのボタンを選択したときに、[人間の入力フォームを送信](/api-reference/人間の入力/人間の入力フォームを送信) エンドポイントの `action` として渡します。"
},
"title": {
"type": "string",
"maxLength": 100,
"description": "受信者に表示されるボタンのラベル。"
},
"button_style": {
"type": "string",
"description": "ボタンの視覚スタイル。利用可能な値: `primary`、 `default`、 `accent`、 `ghost`。"
}
}
},
"description": "利用可能な送信アクション。"
},
"expiration_time": {
"type": "integer",
"format": "int64",
"description": "Unix タイムスタンプ(秒)。この時刻以降、フォームは送信できなくなります。",
"nullable": true
}
}
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {
"form_content": "Please review the draft, set a priority, and confirm or request changes.",
"inputs": [
{
"type": "paragraph",
"output_variable_name": "feedback",
"default": {
"type": "constant",
"selector": [],
"value": ""
}
},
{
"type": "select",
"output_variable_name": "priority",
"option_source": {
"type": "constant",
"selector": [],
"value": [
"low",
"medium",
"high"
]
}
},
{
"type": "file",
"output_variable_name": "attachment",
"allowed_file_types": [
"image",
"document"
],
"allowed_file_extensions": [],
"allowed_file_upload_methods": [
"local_file",
"remote_url"
]
},
{
"type": "file-list",
"output_variable_name": "attachments",
"allowed_file_types": [
"image",
"document"
],
"allowed_file_extensions": [],
"allowed_file_upload_methods": [
"local_file",
"remote_url"
],
"number_limits": 5
}
],
"resolved_default_values": {
"feedback": ""
},
"user_actions": [
{
"id": "approve",
"title": "Approve",
"button_style": "primary"
},
{
"id": "reject",
"title": "Request changes",
"button_style": "default"
}
],
"expiration_time": 1745510400
}
}
}
}
}
},
"404": {
"description": "`not_found` :フォームが見つかりません。",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "フォームが見つかりません"
}
}
}
}
}
},
"412": {
"description": "- `human_input_form_submitted` :フォームは送信済みです。フォームはワンショットで、最初の応答が有効になります(送信したユーザーは問いません)。\n- `human_input_form_expired` :送信が到達する前にフォームの有効期限が切れています。",
"content": {
"application/json": {
"examples": {
"human_input_form_submitted": {
"summary": "human_input_form_submitted",
"value": {
"status": 412,
"code": "human_input_form_submitted",
"message": "このフォームは他のユーザーによって送信済みです。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": "このフォームは有効期限切れです。form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}
}
}
}
}
},
"post": {
"tags": [
"人間の入力"
],
"summary": "人間の入力フォームを送信",
"description": "一時停止中の人間の入力フォームに受信者の応答を送信します。受理されるとワークフローが再開され、後続のイベントはワークフローイベントをストリーミングエンドポイントで追跡できます。 WebApp 配信が必要です。",
"operationId": "submitChatflowHumanInputForm",
"parameters": [
{
"name": "form_token",
"in": "path",
"required": true,
"schema": {
"type": "string"
},
"description": "一時停止中のフォームへのアクセストークン。ストリーミングモードのワークフローを実行エンドポイントまたはチャットメッセージを送信エンドポイントが返す `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` をキーとして送信する値。段落と選択の入力は文字列、`file` 入力は単一のファイルマッピング、`file-list` 入力はファイルマッピングの配列です。ファイルマッピングは `{transfer_method: local_file, upload_file_id, type}` または `{transfer_method: remote_url, url, type}` で、`type` はそのフィールドの `allowed_file_types` のいずれか(`image`、`document`、`audio`、`video`、`custom`)です。`local_file` の場合、`upload_file_id` は [ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) が返す `id` です。実行、アップロード、送信の各呼び出しで一貫した `user` を使用してください。"
},
"action": {
"type": "string",
"description": "受信者が選択したアクションボタンの ID。フォームの `user_actions` リスト([人間の入力フォームを取得](/api-reference/人間の入力/人間の入力フォームを取得) エンドポイントから返される)にある `id` のいずれかと一致する必要があります。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。開発者のルールで定義され、アプリケーション内で一意である必要があります。Service API と WebApp のユーザー ID は独立しており、値が同じでも同じユーザーを指しません。"
}
}
},
"examples": {
"approve": {
"summary": "リクエスト例",
"value": {
"inputs": {
"feedback": "公開して問題ありません",
"priority": "high",
"attachment": {
"transfer_method": "local_file",
"upload_file_id": "3c8fa1b2-7d4e-4f9a-b0c1-d2e3f4a5b6c7",
"type": "image"
},
"attachments": [
{
"transfer_method": "local_file",
"upload_file_id": "1a77f0df-c0e6-461c-987c-e72526f341ee",
"type": "document"
},
{
"transfer_method": "remote_url",
"url": "https://example.com/report.pdf",
"type": "document"
}
]
},
"action": "approve",
"user": "abc-123"
}
}
}
}
}
},
"responses": {
"200": {
"description": "フォームの送信に成功しました。レスポンスボディは空のオブジェクトです。",
"content": {
"application/json": {
"schema": {
"type": "object"
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {}
}
}
}
}
},
"400": {
"description": "- `bad_request` :フォーム受信者のタイプが無効です。\n- `invalid_form_data` :送信内容がフォーム定義の検証に失敗しました。",
"content": {
"application/json": {
"examples": {
"bad_request": {
"summary": "bad_request",
"value": {
"status": 400,
"code": "bad_request",
"message": "フォーム受信者のタイプが無効です"
}
},
"invalid_form_data": {
"summary": "invalid_form_data",
"value": {
"status": 400,
"code": "invalid_form_data",
"message": "必須入力が不足しています:feedback"
}
}
}
}
}
},
"404": {
"description": "`not_found` :フォームが見つかりません。",
"content": {
"application/json": {
"examples": {
"not_found": {
"summary": "not_found",
"value": {
"status": 404,
"code": "not_found",
"message": "フォームが見つかりません"
}
}
}
}
}
},
"412": {
"description": "- `human_input_form_submitted` :フォームは送信済みです。フォームはワンショットで、最初の応答が有効になります(送信したユーザーは問いません)。\n- `human_input_form_expired` :送信が到達する前にフォームの有効期限が切れています。",
"content": {
"application/json": {
"examples": {
"human_input_form_submitted": {
"summary": "human_input_form_submitted",
"value": {
"status": 412,
"code": "human_input_form_submitted",
"message": "このフォームは他のユーザーによって送信済みです。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": "このフォームは有効期限切れです。form_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
}
}
}
}
}
}
},
"/workflow/{workflow_run_id}/events": {
"get": {
"tags": [
"チャットフロー"
],
"summary": "ワークフローイベントをストリーム",
"description": "一時停止後または元の SSE 接続が切断された後にワークフロー実行の Server-Sent Events ストリームを再開します。すでに完了している実行に対しては、`workflow_finished` イベントを 1 つ送信してストリームを閉じます。\n\n進行中の実行のノードレベルのステータスと進捗を確認するには、`include_state_snapshot=true` を指定して呼び出します。ストリームは新しいイベントの送信前に、実行済み各ノードのステータスを再送します。",
"operationId": "streamChatflowEvents",
"parameters": [
{
"name": "workflow_run_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
},
"description": "イベントストリームを再開するワークフロー実行 ID(元の [チャットメッセージを送信](/api-reference/チャットフロー/チャットメッセージを送信) レスポンスの `workflow_run_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 ストリームです。形式は [チャットメッセージを送信](/api-reference/チャットフロー/チャットメッセージを送信) と同じです。再開された部分で `reasoning_format: separated` を指定した LLM ノードが実行される場合、このストリームには `reasoning_chunk` イベントも含まれます。"
},
"examples": {
"resumedRun": {
"summary": "レスポンス例 - 再開実行",
"value": "data: {\"event\": \"human_input_form_filled\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407705, \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"node_id\": \"approval_node\", \"node_title\": \"Approval\", \"rendered_content\": \"Please review the draft.\", \"action_id\": \"approve\", \"action_text\": \"Approve\"}} data: {\"event\": \"node_started\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407705, \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"ne_002\", \"node_id\": \"node_llm_1\", \"node_type\": \"llm\", \"title\": \"LLM\", \"index\": 2, \"created_at\": 1705407705}} data: {\"event\": \"reasoning_chunk\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407705, \"data\": {\"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"reasoning\": \"The reviewer approved the draft.\", \"node_id\": \"node_llm_1\", \"is_final\": false}} data: {\"event\": \"reasoning_chunk\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407705, \"data\": {\"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"reasoning\": \"\", \"node_id\": \"node_llm_1\", \"is_final\": true}} data: {\"event\": \"message\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"answer\": \"Approved\", \"created_at\": 1705407706} data: {\"event\": \"node_finished\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407706, \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"ne_002\", \"node_id\": \"node_llm_1\", \"node_type\": \"llm\", \"title\": \"LLM\", \"index\": 2, \"status\": \"succeeded\", \"elapsed_time\": 1.2, \"created_at\": 1705407705, \"finished_at\": 1705407706}} data: {\"event\": \"message_end\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407706, \"metadata\": {\"usage\": {\"total_tokens\": 42, \"latency\": 1.3}}} data: {\"event\": \"workflow_finished\", \"task_id\": \"c3800678-a077-43df-a102-53f23ed20b88\", \"message_id\": \"2e4f6a8b-1c3d-5e7f-9a0b-2c4d6e8f0a1b\", \"conversation_id\": \"9d3a2f1b-6c7d-4e8f-a0b1-c2d3e4f5a6b7\", \"created_at\": 1705407706, \"workflow_run_id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"data\": {\"id\": \"fb47b2e6-5e43-4f90-be01-d5c5a088d156\", \"workflow_id\": \"7c3e33d4-2a8b-4e5f-9b1a-d3c6e8f12345\", \"status\": \"succeeded\", \"elapsed_time\": 2.1, \"total_tokens\": 42, \"total_steps\": 2, \"created_at\": 1705407629, \"finished_at\": 1705407706}}"
}
}
}
}
},
"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"
}
}
}
}
}
}
},
"x-codeSamples": [
{
"lang": "bash",
"label": "ストリームを再開",
"source": "curl -N --request GET \\\n --url 'https://{api_base_url}/workflow/{workflow_run_id}/events?user={user}' \\\n --header 'Authorization: Bearer {api_key}'"
},
{
"lang": "bash",
"label": "状態スナップショット付き",
"source": "curl -N --request GET \\\n --url 'https://{api_base_url}/workflow/{workflow_run_id}/events?user={user}&include_state_snapshot=true' \\\n --header 'Authorization: Bearer {api_key}'"
}
]
}
}
},
"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 の漏洩は深刻な結果につながる可能性があります。**API Key が欠落または無効な場合、HTTP `401` とエラーコード `unauthorized` が返されます。"
}
},
"responses": {
"SuccessResult": {
"description": "操作が成功しました。",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "結果ステータス。"
}
}
},
"examples": {
"success": {
"summary": "レスポンス例",
"value": {
"result": "success"
}
}
}
}
}
}
},
"schemas": {
"ChatRequest": {
"type": "object",
"required": [
"inputs",
"query",
"user"
],
"properties": {
"query": {
"type": "string",
"description": "ユーザーの入力/質問内容です。"
},
"inputs": {
"type": "object",
"description": "アプリで定義されたさまざまな変数の値を入力できます。キーと値のペアを含みます。アプリが期待する変数名と型については、[アプリケーションのパラメータ情報を取得](/api-reference/アプリケーション設定/アプリケーションのパラメータ情報を取得) レスポンスの `user_input_form` フィールドを参照してください。",
"additionalProperties": true
},
"response_mode": {
"type": "string",
"enum": [
"streaming",
"blocking"
],
"description": "レスポンスの返却モード。`streaming`(推奨)は SSE を使用します。`blocking` は完了後に返却します(長時間の処理では中断される場合があります)。Cloudflare のタイムアウトは `100 s` です。省略した場合、デフォルトでブロッキングモードになります。"
},
"user": {
"type": "string",
"description": "アプリケーション内で一意のユーザー識別子です。この識別子はデータアクセスの範囲を限定します——会話、メッセージ、ファイルは同じ `user` 値でクエリした場合にのみ表示されます。"
},
"conversation_id": {
"type": "string",
"description": "会話を継続するための会話 ID です。前のメッセージの `conversation_id` を渡します。新しい会話を開始するには、このフィールドを省略するか空文字列を渡します。レスポンスで `conversation_id` が返されます——以降のメッセージでこの値を渡すとその会話を継続できます。"
},
"files": {
"type": "array",
"description": "マルチモーダル理解用のファイルリストです。画像、ドキュメント、音声、動画を含みます。ローカルファイルを添付するには、まず [ファイルをアップロード](/api-reference/ファイル操作/ファイルをアップロード) でアップロードし、返された `id` を `upload_file_id` として `transfer_method: local_file` で使用します。",
"items": {
"type": "object",
"required": [
"type",
"transfer_method"
],
"properties": {
"type": {
"type": "string",
"enum": [
"image",
"document",
"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` の場合は必須)。"
}
}
}
},
"auto_generate_name": {
"type": "boolean",
"description": "会話タイトルを自動生成します。`false` の場合、[会話の名前を変更](/api-reference/会話管理/会話の名前を変更) API で `auto_generate: true` を設定して非同期でタイトルを生成します。",
"default": true
},
"workflow_id": {
"type": "string",
"description": "実行する公開済みワークフローバージョンの ID を指定します。指定しない場合、最新の公開バージョンが使用されます。"
}
}
},
"ChatCompletionResponse": {
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "イベントタイプ。`message` に固定されています。"
},
"task_id": {
"type": "string",
"format": "uuid",
"description": "リクエスト追跡およびレスポンス停止 API 用のタスク ID です。"
},
"id": {
"type": "string",
"format": "uuid",
"description": "このレスポンスイベントの一意 ID です。"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "一意のメッセージ ID です。フィードバックや推奨質問のエンドポイントを呼び出す際に `message_id` パラメータとして使用します。"
},
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "会話 ID。"
},
"mode": {
"type": "string",
"description": "アプリモード、`advanced-chat` 固定です。"
},
"answer": {
"type": "string",
"description": "完全なレスポンスコンテンツ。"
},
"metadata": {
"type": "object",
"description": "使用量と検索リソースを含むメタデータ。",
"properties": {
"usage": {
"$ref": "#/components/schemas/Usage"
},
"retriever_resources": {
"type": "array",
"description": "使用された検索リソースのリスト。",
"items": {
"$ref": "#/components/schemas/RetrieverResource"
}
}
}
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "メッセージ作成タイムスタンプ(Unix エポック秒)。"
}
}
},
"ChunkChatEvent": {
"type": "object",
"description": "ストリーミングモードにおける Server-Sent Event チャンクのベーススキーマです。",
"properties": {
"event": {
"type": "string",
"description": "イベントの種類です。",
"enum": [
"message",
"tts_message",
"tts_message_end",
"message_file",
"message_end",
"message_replace",
"reasoning_chunk",
"workflow_started",
"workflow_finished",
"node_started",
"node_finished",
"node_retry",
"iteration_started",
"iteration_next",
"iteration_completed",
"loop_started",
"loop_next",
"loop_completed",
"workflow_paused",
"human_input_required",
"human_input_form_filled",
"human_input_form_timeout",
"agent_log",
"text_chunk",
"error",
"ping"
]
}
},
"discriminator": {
"propertyName": "event",
"mapping": {
"message": "#/components/schemas/StreamEventChatMessage",
"tts_message": "#/components/schemas/StreamEventChatTtsMessage",
"tts_message_end": "#/components/schemas/StreamEventChatTtsMessageEnd",
"message_file": "#/components/schemas/StreamEventChatMessageFile",
"message_end": "#/components/schemas/StreamEventChatMessageEnd",
"message_replace": "#/components/schemas/StreamEventChatMessageReplace",
"reasoning_chunk": "#/components/schemas/StreamEventChatReasoningChunk",
"workflow_started": "#/components/schemas/StreamEventWorkflowStarted",
"workflow_finished": "#/components/schemas/StreamEventWorkflowFinished",
"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",
"workflow_paused": "#/components/schemas/StreamEventWorkflowPaused",
"human_input_required": "#/components/schemas/StreamEventHumanInputRequired",
"human_input_form_filled": "#/components/schemas/StreamEventHumanInputFormFilled",
"human_input_form_timeout": "#/components/schemas/StreamEventHumanInputFormTimeout",
"agent_log": "#/components/schemas/StreamEventAgentLog",
"text_chunk": "#/components/schemas/StreamEventChatTextChunk",
"error": "#/components/schemas/StreamEventChatError",
"ping": "#/components/schemas/StreamEventChatPing"
}
}
},
"StreamEventBase": {
"type": "object",
"description": "ストリームイベントの基本プロパティです。",
"properties": {
"task_id": {
"type": "string",
"format": "uuid",
"description": "タスク ID。"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "一意のメッセージ ID。"
},
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "会話 ID。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ。"
}
}
},
"StreamEventChatMessage": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"answer": {
"type": "string",
"description": "LLM が返したテキストチャンクです。"
}
}
}
]
},
"StreamEventChatTtsMessage": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "TTS 音声ストリームイベント(base64 エンコードの Mp3)です。自動再生が有効な場合に利用できます。",
"properties": {
"audio": {
"type": "string",
"format": "byte",
"description": "Base64 エンコードされた MP3 音声チャンク。すべてのチャンクを順番にデコードして連結すると、完全な音声ファイルが生成されます。"
}
}
}
]
},
"StreamEventChatTtsMessageEnd": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "TTS 音声ストリーム終了イベント。",
"properties": {
"audio": {
"type": "string",
"description": "空の文字列。音声ストリームの終了を示します。"
}
}
}
]
},
"StreamEventChatMessageFile": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "メッセージファイルイベント。ツールによって作成された新しいファイルです。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "ファイルの一意の ID。"
},
"type": {
"type": "string",
"description": "ファイルタイプ(例:`image`)。"
},
"belongs_to": {
"type": "string",
"enum": [
"assistant"
],
"description": "このファイルの所有者。ここでは常に `assistant` です。"
},
"url": {
"type": "string",
"format": "url",
"description": "ファイルのリモート URL。"
}
}
}
]
},
"StreamEventChatMessageEnd": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "メッセージ終了イベント、ストリーミングが終了しました。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メッセージの一意な ID。"
},
"metadata": {
"type": "object",
"description": "使用量と検索リソースを含むメタデータ。",
"properties": {
"usage": {
"$ref": "#/components/schemas/Usage"
},
"retriever_resources": {
"type": "array",
"description": "使用された検索リソースのリスト。",
"items": {
"$ref": "#/components/schemas/RetrieverResource"
}
}
}
}
}
}
]
},
"StreamEventChatMessageReplace": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "メッセージコンテンツ置換イベント(例:コンテンツモデレーションによるもの)。",
"properties": {
"answer": {
"type": "string",
"description": "置換コンテンツ。"
},
"reason": {
"type": "string",
"description": "コンテンツ置換の理由。"
}
}
}
]
},
"StreamEventChatError": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ストリーミング中のエラーイベント。",
"properties": {
"status": {
"type": "integer",
"description": "HTTP ステータスコード。"
},
"code": {
"type": "string",
"description": "エラーコード。"
},
"message": {
"type": "string",
"description": "エラーメッセージ。"
}
}
}
]
},
"StreamEventChatPing": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"type": "object",
"description": "接続を維持するための Ping イベント。`event: ping` 行として送信され、`data:` ペイロードはありません。"
}
]
},
"Usage": {
"type": "object",
"description": "モデルの使用情報です。",
"properties": {
"prompt_tokens": {
"type": "integer",
"description": "プロンプト内のトークン数。"
},
"prompt_unit_price": {
"type": "string",
"format": "decimal",
"description": "プロンプトトークンあたりの単価。"
},
"prompt_price_unit": {
"type": "string",
"format": "decimal",
"description": "プロンプトトークンの価格単位。"
},
"prompt_price": {
"type": "string",
"format": "decimal",
"description": "プロンプトトークンの合計価格。"
},
"completion_tokens": {
"type": "integer",
"description": "補完のトークン数。"
},
"completion_unit_price": {
"type": "string",
"format": "decimal",
"description": "補完トークンあたりの単価。"
},
"completion_price_unit": {
"type": "string",
"format": "decimal",
"description": "補完トークンの価格単位。"
},
"completion_price": {
"type": "string",
"format": "decimal",
"description": "補完トークンの合計価格。"
},
"total_tokens": {
"type": "integer",
"description": "使用されたトークンの合計数。"
},
"total_price": {
"type": "string",
"format": "decimal",
"description": "すべてのトークンの合計価格。"
},
"currency": {
"type": "string",
"description": "課金通貨。"
},
"latency": {
"type": "number",
"format": "double",
"description": "レイテンシ(秒)。"
}
}
},
"RetrieverResource": {
"type": "object",
"description": "検索リソースの引用および帰属情報です。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "検索リソースの一意の ID。"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "このリソースが属するメッセージの ID。"
},
"position": {
"type": "integer",
"description": "リスト内のリソースの位置。"
},
"dataset_id": {
"type": "string",
"format": "uuid",
"description": "ナレッジベース ID。"
},
"dataset_name": {
"type": "string",
"description": "ナレッジベース名。"
},
"document_id": {
"type": "string",
"format": "uuid",
"description": "ドキュメント ID。"
},
"document_name": {
"type": "string",
"description": "ドキュメント名。"
},
"data_source_type": {
"type": "string",
"description": "データソースのタイプ。"
},
"segment_id": {
"type": "string",
"format": "uuid",
"description": "ドキュメント内の特定のチャンクの ID。"
},
"score": {
"type": "number",
"format": "float",
"description": "リソースの関連性スコア。"
},
"hit_count": {
"type": "integer",
"description": "このチャンクがヒットした回数。"
},
"word_count": {
"type": "integer",
"description": "チャンクの単語数。"
},
"segment_position": {
"type": "integer",
"description": "ドキュメント内のチャンクの位置。"
},
"index_node_hash": {
"type": "string",
"description": "インデックスノードのハッシュ。"
},
"content": {
"type": "string",
"description": "リソースからのコンテンツスニペット。"
},
"summary": {
"type": "string",
"nullable": true,
"description": "チャンクコンテンツの要約。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ(Unix エポック秒)。"
}
}
},
"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",
"description": "ファイルの署名付きダウンロード URL です。"
},
"original_url": {
"type": "string",
"nullable": true,
"description": "ファイルの元の URL。"
},
"user_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "未使用です。常に `null` になります。"
},
"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": "未使用です。常に `null` になります。"
}
}
},
"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": "最終更新タイムスタンプ。"
}
}
},
"MessageFeedbackRequest": {
"type": "object",
"description": "メッセージフィードバックを送信するためのリクエストボディ。",
"required": [
"user"
],
"properties": {
"rating": {
"type": "string",
"enum": [
"like",
"dislike",
null
],
"nullable": true,
"description": "フィードバック評価。以前送信したフィードバックを取り消すには `null` に設定します。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。開発者が定義し、アプリケーション内での一意性を確保する必要があります。"
},
"content": {
"type": "string",
"description": "追加の詳細を提供する任意のテキストフィードバック。"
}
}
},
"AppFeedbacksResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"description": "フィードバック項目のリスト。",
"items": {
"$ref": "#/components/schemas/FeedbackItem"
}
}
}
},
"FeedbackItem": {
"type": "object",
"description": "単一のフィードバック項目。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "フィードバック ID。"
},
"app_id": {
"type": "string",
"format": "uuid",
"description": "アプリケーション ID。"
},
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "会話 ID。"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "メッセージ ID。"
},
"rating": {
"type": "string",
"description": "フィードバック評価。肯定的な場合は `like`、否定的な場合は `dislike`。"
},
"content": {
"type": "string",
"nullable": true,
"description": "任意のテキストフィードバック。"
},
"from_source": {
"type": "string",
"description": "フィードバックのソース。API 経由でエンドユーザーが送信したフィードバックの場合は `user`、コンソールから送信されたフィードバックの場合は `admin`。"
},
"from_end_user_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "フィードバックを送信したエンドユーザー ID。`from_source` が `user` の場合に存在します。"
},
"from_account_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "フィードバックを送信したアカウント ID。`from_source` が `admin` の場合に存在します。"
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "作成タイムスタンプ。"
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "最終更新タイムスタンプ。"
}
}
},
"SuggestedQuestionsResponse": {
"type": "object",
"properties": {
"result": {
"type": "string",
"description": "結果ステータス。"
},
"data": {
"type": "array",
"items": {
"type": "string"
},
"description": "提案された質問のリストです。"
}
}
},
"ConversationHistoryResponse": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "1 ページあたりの件数です。"
},
"has_more": {
"type": "boolean",
"description": "さらにメッセージがあるかどうかです。"
},
"data": {
"type": "array",
"description": "メッセージのリストです。",
"items": {
"$ref": "#/components/schemas/ConversationMessageItem"
}
}
}
},
"ConversationMessageItem": {
"type": "object",
"description": "会話内の単一メッセージです。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "メッセージ ID。"
},
"conversation_id": {
"type": "string",
"format": "uuid",
"description": "会話 ID。"
},
"parent_message_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "スレッド会話の親メッセージ ID です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "このメッセージの入力変数です。"
},
"query": {
"type": "string",
"description": "ユーザークエリテキストです。"
},
"answer": {
"type": "string",
"description": "アシスタントの回答テキストです。"
},
"status": {
"type": "string",
"description": "メッセージステータスです。成功したメッセージの場合は `normal`、生成に失敗した場合は `error` です。"
},
"error": {
"type": "string",
"nullable": true,
"description": "`status` が `error` の場合のエラーメッセージです。"
},
"message_files": {
"type": "array",
"description": "このメッセージに添付されたファイルです。",
"items": {
"$ref": "#/components/schemas/MessageFileItem"
}
},
"feedback": {
"type": "object",
"nullable": true,
"description": "このメッセージのユーザーフィードバックです。",
"properties": {
"rating": {
"type": "string",
"description": "フィードバック評価。肯定的な場合は `like`、否定的な場合は `dislike`。"
}
}
},
"retriever_resources": {
"type": "array",
"description": "このメッセージに使用された検索リソースです。",
"items": {
"$ref": "#/components/schemas/RetrieverResource"
}
},
"agent_thoughts": {
"type": "array",
"description": "このメッセージのエージェント思考です。",
"items": {
"$ref": "#/components/schemas/AgentThoughtItem"
}
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ(Unix エポック秒)。"
},
"extra_contents": {
"type": "array",
"description": "このメッセージに関連する追加の実行コンテンツです。chatflow ワークフローの人間の入力ノードからのフォームデータなどが含まれます。",
"items": {
"$ref": "#/components/schemas/HumanInputContent"
}
}
}
},
"MessageFileItem": {
"type": "object",
"description": "メッセージに添付されたファイルです。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "File ID."
},
"filename": {
"type": "string",
"description": "元のファイル名です。"
},
"type": {
"type": "string",
"description": "ファイルの種類(例: `image`)です。"
},
"url": {
"type": "string",
"format": "url",
"nullable": true,
"description": "ファイルのプレビュー URL。"
},
"mime_type": {
"type": "string",
"nullable": true,
"description": "ファイルの MIME タイプ。"
},
"size": {
"type": "integer",
"nullable": true,
"description": "ファイルサイズ(バイト)。"
},
"transfer_method": {
"type": "string",
"description": "使用された転送方法です。`remote_url` は URL ベースのファイル、`local_file` はアップロード済みファイル、`tool_file` はツール生成ファイルを示します。"
},
"belongs_to": {
"type": "string",
"nullable": true,
"description": "このファイルの所有者です。ユーザーがアップロードしたファイルの場合は `user`、アシスタントが生成したファイルの場合は `assistant` です。"
},
"upload_file_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "`local_file` で転送された場合のアップロードファイル ID です。"
}
}
},
"AgentThoughtItem": {
"type": "object",
"description": "メッセージ内のエージェント思考ステップです。",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "エージェント思考 ID です。"
},
"chain_id": {
"type": "string",
"nullable": true,
"description": "この思考のチェーン ID です。"
},
"message_id": {
"type": "string",
"format": "uuid",
"description": "この思考が属する一意のメッセージ ID です。"
},
"position": {
"type": "integer",
"description": "この思考の位置です。"
},
"thought": {
"type": "string",
"description": "LLM が思考している内容です。"
},
"tool": {
"type": "string",
"description": "呼び出されたツール(`;` で区切り)です。"
},
"tool_labels": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "使用されたツールのラベルです。"
},
"tool_input": {
"type": "string",
"description": "ツールの入力(JSON 形式)です。"
},
"observation": {
"type": "string",
"description": "ツール呼び出しからのレスポンスです。"
},
"files": {
"type": "array",
"items": {
"type": "string"
},
"description": "この思考に関連するファイル ID です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ。"
}
}
},
"ConversationsListResponse": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "1 ページあたりの件数です。"
},
"has_more": {
"type": "boolean",
"description": "さらに会話があるかどうかです。"
},
"data": {
"type": "array",
"description": "会話のリストです。",
"items": {
"$ref": "#/components/schemas/ConversationListItem"
}
}
}
},
"ConversationListItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "会話 ID。"
},
"name": {
"type": "string",
"description": "会話名です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "会話の入力変数です。"
},
"status": {
"type": "string",
"description": "会話ステータスです。アクティブな会話の場合は `normal` です。"
},
"introduction": {
"type": "string",
"description": "会話の紹介文です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ。"
},
"updated_at": {
"type": "integer",
"format": "int64",
"description": "最終更新タイムスタンプ。"
}
}
},
"ConversationRenameRequest": {
"type": "object",
"description": "会話の名前変更用リクエストボディです。",
"required": [
"user"
],
"properties": {
"name": {
"type": "string",
"description": "会話の名前です。`auto_generate` が `false` の場合は必須です。"
},
"auto_generate": {
"type": "boolean",
"default": false,
"description": "会話名を自動生成します。`true` の場合、`name` フィールドは無視されます。"
},
"user": {
"type": "string",
"description": "ユーザー識別子です。"
}
}
},
"ConversationVariablesResponse": {
"type": "object",
"properties": {
"limit": {
"type": "integer",
"description": "1 ページあたりの件数です。"
},
"has_more": {
"type": "boolean",
"description": "次のページがあるかどうかです。"
},
"data": {
"type": "array",
"description": "会話変数のリストです。",
"items": {
"$ref": "#/components/schemas/ConversationVariableItem"
}
}
}
},
"ConversationVariableItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Variable ID."
},
"name": {
"type": "string",
"description": "変数名です。"
},
"value_type": {
"type": "string",
"description": "変数の値の型です。指定可能な値:`string`、`number`、`object`、`secret`、`file`、`boolean`、`array[any]`、`array[string]`、`array[number]`、`array[object]`、`array[file]`、`array[boolean]`。"
},
"value": {
"type": "string",
"description": "変数値(複雑な型の場合は JSON 文字列)。"
},
"description": {
"type": "string",
"description": "変数の説明です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "作成タイムスタンプ。"
},
"updated_at": {
"type": "integer",
"format": "int64",
"description": "最終更新タイムスタンプ。"
}
}
},
"ConversationVariableUpdateRequest": {
"type": "object",
"description": "会話変数を更新するためのリクエストボディです。",
"required": [
"value"
],
"properties": {
"value": {
"description": "変数の新しい値。変数の期待される型と一致する必要があります。"
},
"user": {
"type": "string",
"description": "ユーザー識別子。"
}
}
},
"AudioToTextRequest": {
"type": "object",
"description": "音声からテキストへの変換のリクエストボディ。",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "音声ファイルです。MIME タイプで検証され、`audio/mp3`、`audio/m4a`、`audio/wav`、`audio/amr`、`audio/mpga` のいずれかである必要があります。上限:`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` は Workflow アプリです。"
},
"author_name": {
"type": "string",
"description": "アプリケーション作成者の名前。"
}
}
},
"ChatAppParametersResponse": {
"type": "object",
"properties": {
"opening_statement": {
"type": "string",
"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 の言語。"
},
"autoPlay": {
"type": "string",
"description": "自動再生設定です。音声を自動再生するには `enabled`、手動再生を要求するには `disabled` を指定します。"
}
}
},
"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",
"description": "ユーザー入力フォーム要素のリスト。",
"items": {
"$ref": "#/components/schemas/UserInputFormItem"
}
},
"file_upload": {
"type": "object",
"description": "ファイルアップロードの設定。",
"properties": {
"image": {
"type": "object",
"description": "画像アップロードの設定。",
"properties": {
"enabled": {
"type": "boolean",
"description": "画像アップロードが有効かどうか。"
},
"number_limits": {
"type": "integer",
"description": "最大画像数。"
},
"detail": {
"type": "string",
"description": "画像の詳細レベル。"
},
"transfer_methods": {
"type": "array",
"items": {
"type": "string"
},
"description": "許可された転送方法。"
}
}
}
}
},
"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": "ワークフローファイルアップロードの最大ファイル数。"
}
}
}
}
},
"UserInputFormItem": {
"type": "object",
"oneOf": [
{
"$ref": "#/components/schemas/TextInputControlWrapper"
},
{
"$ref": "#/components/schemas/ParagraphControlWrapper"
},
{
"$ref": "#/components/schemas/SelectControlWrapper"
}
]
},
"TextInputControlWrapper": {
"title": "Text Input",
"type": "object",
"properties": {
"text-input": {
"$ref": "#/components/schemas/TextInputControl"
}
}
},
"ParagraphControlWrapper": {
"title": "Paragraph",
"type": "object",
"properties": {
"paragraph": {
"$ref": "#/components/schemas/ParagraphControl"
}
}
},
"SelectControlWrapper": {
"title": "Select",
"type": "object",
"properties": {
"select": {
"$ref": "#/components/schemas/SelectControl"
}
}
},
"TextInputControl": {
"type": "object",
"description": "テキスト入力フォームコントロールです。",
"properties": {
"label": {
"type": "string",
"description": "表示ラベルです。"
},
"variable": {
"type": "string",
"description": "変数名です。"
},
"required": {
"type": "boolean",
"description": "入力が必須かどうかです。"
},
"default": {
"type": "string",
"description": "デフォルト値です。"
}
}
},
"ParagraphControl": {
"type": "object",
"description": "段落(複数行テキスト)フォームコントロールです。",
"properties": {
"label": {
"type": "string",
"description": "表示ラベルです。"
},
"variable": {
"type": "string",
"description": "変数名です。"
},
"required": {
"type": "boolean",
"description": "入力が必須かどうかです。"
},
"default": {
"type": "string",
"description": "デフォルト値です。"
}
}
},
"SelectControl": {
"type": "object",
"description": "セレクト(ドロップダウン)フォームコントロールです。",
"properties": {
"label": {
"type": "string",
"description": "表示ラベルです。"
},
"variable": {
"type": "string",
"description": "変数名です。"
},
"required": {
"type": "boolean",
"description": "選択が必須かどうかです。"
},
"default": {
"type": "string",
"description": "デフォルトで選択される値。"
},
"options": {
"type": "array",
"items": {
"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": "ツールアイコン。キーはツール名です。"
}
}
},
"ToolIconDetail": {
"title": "Emoji Icon",
"type": "object",
"description": "絵文字を使用したツールアイコンの詳細。",
"properties": {
"background": {
"type": "string",
"description": "16進数形式の背景色。"
},
"content": {
"type": "string",
"description": "Emoji コンテンツ。"
}
}
},
"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": "アプリアイコンを回答アイコンとして使用するかどうか。"
}
}
},
"AnnotationListResponse": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AnnotationItem"
},
"description": "現在のページのアノテーション項目のリストです。"
},
"has_more": {
"type": "boolean",
"description": "現在の結果セットの後にさらにページがある場合は `true` です。"
},
"limit": {
"type": "integer",
"description": "1 ページあたりの件数です。"
},
"total": {
"type": "integer",
"description": "クエリに一致するアノテーションの合計数です。"
},
"page": {
"type": "integer",
"description": "現在のページ番号です。"
}
}
},
"AnnotationItem": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "アノテーションの一意識別子です。"
},
"question": {
"type": "string",
"nullable": true,
"description": "このアノテーションをトリガーする質問テキストです。"
},
"answer": {
"type": "string",
"nullable": true,
"description": "アノテーションがマッチした際に返される定義済みの回答です。"
},
"hit_count": {
"type": "integer",
"nullable": true,
"description": "このアノテーションがマッチして返信として返された回数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"nullable": true,
"description": "作成タイムスタンプ(Unix エポック秒)。"
}
}
},
"CreateAnnotationRequest": {
"type": "object",
"description": "新しいアノテーションを作成するためのリクエストボディです。",
"required": [
"question",
"answer"
],
"properties": {
"question": {
"type": "string",
"description": "アノテーションの質問です。"
},
"answer": {
"type": "string",
"description": "アノテーションの回答です。"
}
}
},
"UpdateAnnotationRequest": {
"type": "object",
"description": "アノテーション更新のリクエストボディです。",
"required": [
"question",
"answer"
],
"properties": {
"question": {
"type": "string",
"description": "更新されたアノテーションの質問です。"
},
"answer": {
"type": "string",
"description": "更新されたアノテーションの回答です。"
}
}
},
"InitialAnnotationReplySettingsRequest": {
"type": "object",
"description": "アノテーション返信設定を構成するためのリクエストボディです。",
"required": [
"score_threshold",
"embedding_provider_name",
"embedding_model_name"
],
"properties": {
"embedding_provider_name": {
"type": "string",
"description": "埋め込みモデルプロバイダーの名前(例:`openai`、`cohere`)です。"
},
"embedding_model_name": {
"type": "string",
"description": "アノテーションマッチングに使用する埋め込みモデルの名前です(例:`text-embedding-3-small`)。"
},
"score_threshold": {
"type": "number",
"format": "float",
"description": "アノテーションがマッチとみなされるための最低類似度スコアです。値が高いほど、より正確なマッチが必要になります。"
}
}
},
"InitialAnnotationReplySettingsResponse": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"description": "非同期ジョブ ID です。[アノテーション返信の初期設定タスクステータスを取得](/api-reference/アノテーション管理/アノテーション返信の初期設定タスクステータスを取得) と組み合わせて進捗を追跡します。"
},
"job_status": {
"type": "string",
"description": "現在のジョブステータスです。このエンドポイントが返すのは `waiting`(キュー待ち)または `processing`(処理中)のみです。`completed` と `error` は [アノテーション返信の初期設定タスクステータスを取得](/api-reference/アノテーション管理/アノテーション返信の初期設定タスクステータスを取得) からのみ返されます。"
}
}
},
"InitialAnnotationReplySettingsStatusResponse": {
"type": "object",
"properties": {
"job_id": {
"type": "string",
"format": "uuid",
"description": "[アノテーション返信を設定](/api-reference/アノテーション管理/アノテーション返信を設定) 呼び出しから取得したジョブ ID です。"
},
"job_status": {
"type": "string",
"description": "現在のジョブステータスです。`waiting` はキュー待ち、`processing` は処理中、`completed` は完了、`error` は失敗を示します。"
},
"error_msg": {
"type": "string",
"description": "ジョブが失敗した理由を説明するエラーメッセージです。`job_status` が `error` でない場合は空文字列です。"
}
}
},
"StreamEventWorkflowStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ワークフローの実行が開始されました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークフロー実行 ID です。"
},
"workflow_id": {
"type": "string",
"description": "関連するワークフロー ID です。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "このワークフロー実行の入力変数です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "開始タイムスタンプ(Unix エポック秒)です。"
},
"reason": {
"type": "string",
"description": "ワークフロー開始の理由です。`initial` は初回開始、`resumption` は一時停止後の再開(例:人間の入力後)を示します。"
}
}
}
}
}
]
},
"StreamEventWorkflowFinished": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ワークフローの実行が完了しました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ワークフロー実行 ID です。"
},
"workflow_id": {
"type": "string",
"description": "関連するワークフロー ID です。"
},
"status": {
"type": "string",
"description": "実行ステータスです。`running` は進行中、`succeeded` は成功、`failed` は失敗、`stopped` は手動停止、`partial-succeeded` は部分完了、`paused` は人間の入力待ちを示します。"
},
"outputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ワークフローの出力データです。"
},
"error": {
"type": "string",
"nullable": true,
"description": "実行が失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"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",
"nullable": true,
"description": "実行中の例外数です。"
},
"files": {
"type": "array",
"nullable": true,
"items": {
"type": "object",
"additionalProperties": true
},
"description": "ワークフロー実行中に生成されたファイルです。"
}
}
}
}
}
]
},
"StreamEventNodeStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ノードの実行が開始されました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "ノードタイプ(例:`llm`、`knowledge-retrieval`、`code`)です。"
},
"title": {
"type": "string",
"description": "Node title."
},
"index": {
"type": "integer",
"description": "実行インデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID です。"
},
"inputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの入力データです。簡略化された API レスポンスでは `null` の場合があります。"
},
"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/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ノードの実行が完了しました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "Node title."
},
"index": {
"type": "integer",
"description": "実行インデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID です。"
},
"inputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの入力データです。簡略化された API レスポンスでは `null` の場合があります。"
},
"process_data": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの処理データです。簡略化された API レスポンスでは `null` の場合があります。"
},
"outputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの出力データです。簡略化された API レスポンスでは `null` の場合があります。"
},
"status": {
"type": "string",
"description": "ノードの実行ステータスです。`running` は進行中、`succeeded` は成功、`failed` は失敗、`exception` は例外発生を示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ノードが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"description": "ノードの実行時間(秒)です。"
},
"execution_metadata": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "実行メタデータ(例:トークン使用量、モデル情報)です。簡略化された API レスポンスでは `null` の場合があります。"
},
"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/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ノードのリトライ回数です。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ノード実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ワークフローグラフ内のノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "Node title."
},
"index": {
"type": "integer",
"description": "実行インデックスです。"
},
"predecessor_node_id": {
"type": "string",
"nullable": true,
"description": "先行ノードの ID です。"
},
"inputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの入力データです。"
},
"process_data": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの処理データです。"
},
"outputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ノードの出力データです。"
},
"status": {
"type": "string",
"description": "ノードの実行ステータスです。`running` は進行中、`succeeded` は成功、`failed` は失敗、`exception` は例外発生を示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "このリトライのエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"description": "この試行の実行時間(秒)です。"
},
"execution_metadata": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "実行メタデータです。"
},
"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(該当する場合)です。"
},
"retry_index": {
"type": "integer",
"description": "リトライ回数インデックス、`0` から開始します。"
}
}
}
}
}
]
},
"StreamEventIterationStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "イテレーションループが開始されました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "イテレーション実行 ID です。"
},
"node_id": {
"type": "string",
"description": "イテレーションノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "イテレーションノードのタイトルです。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "開始タイムスタンプ(Unix エポック秒)です。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"description": "追加メタデータです。"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "イテレーションのメタデータです。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "イテレーションの入力データです。"
}
}
}
}
}
]
},
"StreamEventIterationNext": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "イテレーションが次の項目に進みました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "イテレーション実行 ID です。"
},
"node_id": {
"type": "string",
"description": "イテレーションノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "イテレーションノードのタイトルです。"
},
"index": {
"type": "integer",
"description": "現在のイテレーションインデックス(0 始まり)です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "タイムスタンプ(Unix エポック秒)です。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"description": "追加メタデータです。"
}
}
}
}
}
]
},
"StreamEventIterationCompleted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "イテレーションループが完了しました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "イテレーション実行 ID です。"
},
"node_id": {
"type": "string",
"description": "イテレーションノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "イテレーションノードのタイトルです。"
},
"outputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "イテレーションの出力データです。"
},
"status": {
"type": "string",
"description": "イテレーションの実行ステータスです。`running` は進行中、`succeeded` は成功、`failed` は失敗、`exception` は例外発生を示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "イテレーションが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"description": "イテレーションの合計時間(秒)です。"
},
"total_tokens": {
"type": "integer",
"description": "すべてのイテレーションで消費されたトークンの合計です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "開始タイムスタンプ(Unix エポック秒)です。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"description": "終了タイムスタンプ(Unix エポック秒)です。"
},
"steps": {
"type": "integer",
"description": "実行されたイテレーションステップの合計数です。"
}
}
}
}
}
]
},
"StreamEventLoopStarted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ループが開始されました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ループ実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ループノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "ループノードのタイトルです。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "開始タイムスタンプ(Unix エポック秒)です。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"description": "追加メタデータです。"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"description": "ループのメタデータです。"
},
"inputs": {
"type": "object",
"additionalProperties": true,
"description": "ループの入力データです。"
}
}
}
}
}
]
},
"StreamEventLoopNext": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ループが次のイテレーションに進みました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ループ実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ループノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "ループノードのタイトルです。"
},
"index": {
"type": "integer",
"description": "現在のループインデックス(0 始まり)です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "タイムスタンプ(Unix エポック秒)です。"
},
"pre_loop_output": {
"description": "前回のループイテレーションからの出力です。"
},
"extras": {
"type": "object",
"additionalProperties": true,
"description": "追加メタデータです。"
}
}
}
}
}
]
},
"StreamEventLoopCompleted": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ループが完了しました。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"data": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "ループ実行 ID です。"
},
"node_id": {
"type": "string",
"description": "ループノード ID です。"
},
"node_type": {
"type": "string",
"description": "Node type."
},
"title": {
"type": "string",
"description": "ループノードのタイトルです。"
},
"outputs": {
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "ループの出力データです。"
},
"status": {
"type": "string",
"description": "ループの実行ステータスです。`running` は進行中、`succeeded` は成功、`failed` は失敗、`exception` は例外発生を示します。"
},
"error": {
"type": "string",
"nullable": true,
"description": "ループが失敗した場合のエラーメッセージです。"
},
"elapsed_time": {
"type": "number",
"description": "ループの合計実行時間(秒)です。"
},
"total_tokens": {
"type": "integer",
"description": "すべてのループイテレーションで消費されたトークンの合計です。"
},
"created_at": {
"type": "integer",
"format": "int64",
"description": "開始タイムスタンプ(Unix エポック秒)です。"
},
"finished_at": {
"type": "integer",
"format": "int64",
"description": "終了タイムスタンプ(Unix エポック秒)です。"
},
"steps": {
"type": "integer",
"description": "実行されたループの合計ステップ数です。"
}
}
}
}
}
]
},
"StreamEventHumanInputRequired": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"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": "フォーム入力コントロールの種類。使用可能な値:`paragraph`(複数行テキスト)、`select`(リストからの単一選択)、`file`(単一ファイルのアップロード)、`file-list`(複数ファイルのアップロード)。"
},
"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 タイムスタンプ(秒)。これを過ぎるとフォームは送信できなくなります。"
}
}
}
}
}
]
},
"StreamEventWorkflowPaused": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"workflow_run_id": {
"type": "string",
"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": "実行された合計ステップ数です。"
}
}
}
}
}
]
},
"StreamEventHumanInputFormFilled": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"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/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "ワークフロー実行の実行 ID です。"
},
"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 タイムスタンプ(秒)。フォームが期限切れとなった時刻。"
}
}
}
}
}
]
},
"StreamEventAgentLog": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"description": "ワークフロー内のエージェントノードからのエージェントログです。",
"properties": {
"data": {
"type": "object",
"properties": {
"node_execution_id": {
"type": "string",
"description": "ノード実行 ID です。"
},
"id": {
"type": "string",
"description": "ログエントリ ID です。"
},
"label": {
"type": "string",
"description": "ログエントリのラベルです。"
},
"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": "ワークフローグラフ内のノード ID です。"
}
}
}
}
}
]
},
"StreamEventChatReasoningChunk": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$ref": "#/components/schemas/StreamEventBase"
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"message_id": {
"type": "string",
"format": "uuid",
"description": "この推論が属するメッセージの ID(トップレベルの `message_id` と同じ値)。"
},
"reasoning": {
"type": "string",
"description": "`reasoning_format` が `separated` の LLM ノードが発行する思考過程のデルタです。連続する `reasoning_chunk` イベントを連結すると、完全な推論を復元できます。このストリームは `message` と並行しており、`message`(回答)ストリームには `<think>` タグが含まれません。"
},
"node_id": {
"type": "string",
"nullable": true,
"description": "推論を生成している LLM ノードの ID です。複数の LLM ノードが実行される場合に、推論の出所を特定できます。"
},
"is_final": {
"type": "boolean",
"description": "`true` は LLM ノードの推論フェーズの終了(「思考完了」のシグナル)を示します。空の `reasoning` を伴う場合があります。"
}
}
}
}
}
]
},
"StreamEventChatTextChunk": {
"allOf": [
{
"$ref": "#/components/schemas/ChunkChatEvent"
},
{
"$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": "ワークフロー内のテキスト変数のソースパスです。"
}
}
}
}
}
]
},
"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": "string",
"nullable": true,
"description": "ワークフロー実行の入力変数です。生の JSON 文字列として返されるため(例:`{\"query\": \"...\"}`)、クライアント側でパースする必要があります。`null` の場合もあります。"
},
"outputs": {
"type": "object",
"additionalProperties": 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": "合計経過時間(秒)です。"
}
}
},
"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": "ワークフロー実行をトリガーしたソースです。`app-run` はアプリまたは API からの実行、`webhook` は Webhook トリガーによる実行、`schedule` はスケジュールトリガーによる実行を示します、`plugin` はプラグイントリガーによる実行を示します。"
}
}
},
"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": "セッション識別子です。"
}
}
},
"HumanInputContent": {
"type": "object",
"description": "人間の入力ノードからの実行コンテンツです。フォーム定義と送信データを含みます。",
"properties": {
"workflow_run_id": {
"type": "string",
"description": "このコンテンツが属するワークフロー実行の ID です。"
},
"submitted": {
"type": "boolean",
"description": "人間の入力フォームが送信されたかどうかです。"
},
"type": {
"type": "string",
"description": "`human_input` は人間の入力コンテンツを示します。"
},
"form_definition": {
"nullable": true,
"description": "人間の入力ノードからのフォーム定義です。コンテンツが送信レスポンスを表す場合は `null` です。",
"$ref": "#/components/schemas/HumanInputFormDefinition"
},
"form_submission_data": {
"nullable": true,
"description": "送信されたフォームデータです。フォームがまだ送信されていない場合は `null` です。",
"$ref": "#/components/schemas/HumanInputFormSubmissionData"
}
}
},
"HumanInputFormDefinition": {
"type": "object",
"description": "人間の入力ノードによってレンダリングされる人間の入力フォームの定義です。",
"properties": {
"form_id": {
"type": "string",
"description": "フォームの一意識別子です。"
},
"node_id": {
"type": "string",
"description": "このフォームを生成した人間の入力ノードの ID です。"
},
"node_title": {
"type": "string",
"description": "人間の入力ノードのタイトルです。"
},
"form_content": {
"type": "string",
"description": "フォームと共に表示される Markdown またはテキストコンテンツです。"
},
"inputs": {
"type": "array",
"description": "フォーム内の入力フィールドです。",
"items": {
"$ref": "#/components/schemas/FormInput"
}
},
"actions": {
"type": "array",
"description": "フォームで利用可能なアクションボタンです。",
"items": {
"$ref": "#/components/schemas/UserAction"
}
},
"display_in_ui": {
"type": "boolean",
"description": "フォームを UI に表示するかどうかです。"
},
"form_token": {
"type": "string",
"nullable": true,
"description": "フォーム送信認証用のトークンです。"
},
"resolved_default_values": {
"type": "object",
"additionalProperties": true,
"description": "出力変数名をキーとする、フォーム入力の解決済みデフォルト値です。"
},
"expiration_time": {
"type": "integer",
"description": "フォームが期限切れになる Unix タイムスタンプです。"
}
}
},
"HumanInputFormSubmissionData": {
"type": "object",
"description": "送信された人間の入力フォームからのデータです。",
"properties": {
"node_id": {
"type": "string",
"description": "人間の入力ノードの ID です。"
},
"node_title": {
"type": "string",
"description": "人間の入力ノードのタイトルです。"
},
"rendered_content": {
"type": "string",
"description": "フォーム送信のレンダリングされた内容です。"
},
"action_id": {
"type": "string",
"description": "クリックされたアクションボタンの ID です。"
},
"action_text": {
"type": "string",
"description": "クリックされたアクションボタンの表示テキストです。"
}
}
},
"FormInput": {
"type": "object",
"description": "フォーム入力フィールドの定義です。",
"properties": {
"type": {
"type": "string",
"description": "フォーム入力コントロールの種類。使用可能な値:`paragraph`(複数行テキスト)、`select`(リストからの単一選択)、`file`(単一ファイルのアップロード)、`file-list`(複数ファイルのアップロード)。"
},
"output_variable_name": {
"type": "string",
"description": "入力値が格納される変数名です。"
},
"default": {
"nullable": true,
"description": "この入力のデフォルト値設定です。",
"$ref": "#/components/schemas/FormInputDefault"
}
}
},
"FormInputDefault": {
"type": "object",
"description": "フォーム入力のデフォルト値設定です。",
"properties": {
"type": {
"type": "string",
"description": "`variable` はワークフロー変数からの動的な値、`constant` は静的な値です。"
},
"selector": {
"type": "array",
"items": {
"type": "string"
},
"description": "`type` が `variable` の場合の変数セレクターパスです。"
},
"value": {
"type": "string",
"description": "`type` が `constant` の場合の静的値。"
}
}
},
"UserAction": {
"type": "object",
"description": "人間の入力フォーム上のアクションボタンです。",
"properties": {
"id": {
"type": "string",
"description": "アクションの一意識別子です。"
},
"title": {
"type": "string",
"description": "ボタンの表示テキストです。"
},
"button_style": {
"type": "string",
"description": "`primary`, `default`, `accent`, or `ghost`."
}
}
}
}
},
"tags": [
{
"name": "チャットフロー",
"description": "Chatflow アプリケーションの操作です(チャットメッセージ、ワークフロー実行詳細、イベントストリーミングを含む)。"
},
{
"name": "ファイル操作",
"description": "ファイルのアップロードとプレビューの操作です。"
},
{
"name": "エンドユーザー",
"description": "エンドユーザー情報に関連する操作です。"
},
{
"name": "メッセージフィードバック",
"description": "ユーザーフィードバックの操作です。"
},
{
"name": "会話管理",
"description": "会話管理に関連する操作です。"
},
{
"name": "音声・テキスト変換",
"description": "テキスト読み上げと音声認識の操作です。"
},
{
"name": "アプリケーション設定",
"description": "アプリケーション設定と情報を取得する操作です。"
},
{
"name": "アノテーション管理",
"description": "ダイレクト返信用のアノテーション管理に関連する操作です。"
},
{
"name": "人間の入力",
"description": "人間の入力を要する一時停止中のワークフローの再開操作です。"
}
]
}