# Workflow API

> Documentation Index / 文档总索引  
> https://x2v.light-ai.top/llms.txt  
> Source: https://x2v.light-ai.top/en/api-docs#workflow-api  
> Locale: en  
> This page is optimized for Agent/LLM reading.

Discover a workflow contract, start a run, stream or poll state, and collect outputs.

## Discover

Use `GET /api/v1/workflow/list`, then `GET /api/v1/workflow/{workflow_id}` and `/inputs`. Do not infer workflow inputs from task model specs.

## Run

Submit `POST /api/v1/workflow/{workflow_id}/runs` with the workflow's declared inputs. Save `run_id`. Observe `/runs/{run_id}` or `/runs/{run_id}/stream`, then fetch `/runs/{run_id}/outputs`. Cancel with the documented run or node cancel endpoints.

## Authentication and recovery

Discovery and execution currently require Bearer API authentication. If a connection drops, query the existing `run_id`; do not start a second run just because the stream ended.

## Related topics

[quick-start](/en/api-docs/quick-start.md) · [authentication](/en/api-docs/authentication.md) · [model-discovery](/en/api-docs/model-discovery.md) · [task-api](/en/api-docs/task-api.md) · [errors](/en/api-docs/errors.md)

OpenAPI: https://x2v.light-ai.top/openapi.json · Live models: https://x2v.light-ai.top/api/v1/model/list · Skill: https://github.com/ModelTC/LightX2V-Skills
