---
title: "Dag Endpoint"
method: POST
path: "/api/dag"
---

# Dag Endpoint

`POST /api/dag`

Run a DAG planner pipeline with SSE progress updates.

Parameters
----------
request : Request
    The incoming HTTP request; used to detect client disconnects.
body : ChatStreamRequest
    JSON request body containing the query and optional parameters.

## Request body

- ChatStreamRequest — Request body for ReAct/DAG streaming endpoints.
  - `q` string, required
  - `conversation_id` string, nullable
  - `agent_id` string, nullable
  - `token` string, nullable
  - `image_ids` string, nullable
  - `user_metadata` string, nullable
  - `doc_mode` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-03-30** `3dd5aff604de` — 1 info
  - added the new optional request property `doc_mode`
- **2026-03-22** `ba8f4d37bae5` — 1 warning
  - removed the request property `domain_hint`
- **2026-03-22** `6dc2d6f33d44` — 6 breaking, 12 info
  - the request property `agent_id` became not nullable
  - the request property `conversation_id` became not nullable
  - the request property `image_ids` became not nullable
  - the request property `token` became not nullable
  - …14 more

[Change history](https://skmtc.dev/fim-ai/apis/fim-one-api/changes/api/dag/post.md)

---

[API](https://skmtc.dev/fim-ai/apis/fim-one-api.md) · [All operations](https://skmtc.dev/fim-ai/apis/fim-one-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fim-ai/fim-one-api/revisions/89738ff55831/schema)
