curl --request POST \
--url "${UNSTRUCTURED_API_URL}/api/v1/workflows/f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c/run" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}"
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.workflows.run_workflow(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
async def run_workflow():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.workflows.run_workflow_async(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
asyncio.run(run_workflow())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"workflow_id": "f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"workflow_name": "my-workflow",
"status": "SCHEDULED",
"stop_requested": false,
"created_at": "2026-04-29T10:00:00Z",
"runtime": null,
"input_file_ids": null,
"output_node_files": null,
"job_type": "ephemeral"
}
Workflow
Run workflow
Run an existing workflow manually by starting a new job if none is currently active. The response includes the job’s ID and lifecycle state.
POST
/
api
/
v1
/
workflows
/
{workflow_id}
/
run
curl --request POST \
--url "${UNSTRUCTURED_API_URL}/api/v1/workflows/f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c/run" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}"
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.workflows.run_workflow(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
async def run_workflow():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.workflows.run_workflow_async(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
asyncio.run(run_workflow())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"workflow_id": "f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"workflow_name": "my-workflow",
"status": "SCHEDULED",
"stop_requested": false,
"created_at": "2026-04-29T10:00:00Z",
"runtime": null,
"input_file_ids": null,
"output_node_files": null,
"job_type": "ephemeral"
}
This endpoint starts a job for an existing workflow. To create a workflow for a single job run using local files, use the create job endpoint.
Path parameters
Body
Response
Job lifecycle state. One of:
SCHEDULED, IN_PROGRESS, COMPLETED, STOPPED, FAILED, REJECTED. COMPLETED means job execution finished. Check processing_status for the document outcome. A REJECTED job failed the Job Preflight Check and processed no documents.Output file metadata objects. Each object includes
node_id, file_id, node_type, and node_subtype.Document processing outcome. This field is absent when a newly created job has not processed documents.
Number of documents recorded as failed so far. A zero on an unfinished job is not a final result.
Reason a completed job delivered no documents, if detected:
NO_DOCUMENTS_DISCOVERED or NO_DOCUMENTS_SUCCEEDED.curl --request POST \
--url "${UNSTRUCTURED_API_URL}/api/v1/workflows/f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c/run" \
--header "unstructured-api-key: ${UNSTRUCTURED_API_KEY}"
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = client.workflows.run_workflow(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
import asyncio
import os
from unstructured_client import UnstructuredClient
from unstructured_client.models.operations import RunWorkflowRequest
async def run_workflow():
client = UnstructuredClient(
api_key_auth=os.getenv("UNSTRUCTURED_API_KEY"),
server_url=os.getenv("UNSTRUCTURED_API_URL"),
)
response = await client.workflows.run_workflow_async(
request=RunWorkflowRequest(
workflow_id="f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c"
)
)
print(response)
asyncio.run(run_workflow())
{
"id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"workflow_id": "f0a1b2c3-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"workflow_name": "my-workflow",
"status": "SCHEDULED",
"stop_requested": false,
"created_at": "2026-04-29T10:00:00Z",
"runtime": null,
"input_file_ids": null,
"output_node_files": null,
"job_type": "ephemeral"
}
Was this page helpful?

