Overview
Create a new workflow to process queries against a knowledge engine. Workflows represent individual question-answer sessions that leverage your uploaded documents and data sources.Error Handling
This endpoint can return various error responses. For comprehensive error handling information, see the Workflows Error Handling Guide.Common Error Scenarios
Knowledge Engine Not Ready (400)
Knowledge Engine Not Ready (400)
No Active Data Sources (400)
No Active Data Sources (400)
Invalid Model (400)
Invalid Model (400)
Model Not Enabled (400)
Model Not Enabled (400)
Best Practices
Pre-flight Validation
Always validate the knowledge engine status before creating workflows:Error Handling
Implement proper error handling with retry logic for transient failures:Body
Name of the workflow
50
"Fintech Companies"
The query to ask the knowledge engine
"What is the latest revenue of Square?"
ID of the knowledge engine this workflow belongs to
"kng_abc123xyz789"
Type of the workflow
query
"query"
Short description of what the workflow is comprised of
"Workflow for processing and analyzing fintech companies"
Context ID used in case of thread mode for chat based workflows
"ctx_abc123xyz78910"
Flag to enable advanced reasoning for the workflow
true
LLM to use for the query
auto
, claude-3.5-sonnet
, llama-v3-70b
, o1
, o3-mini
, gpt-4o
, gpt-5
"llama-v3-70b"
Response
Workflow created successfully
Alphanumeric 14 character string identifier
"wfl_abc123xyz78910"
Name of the workflow
"Fintech Companies"
The query to ask the knowledge engine
"What is the latest revenue of Square?"
The response from the knowledge engine
"Square's latest revenue is $1.2 billion"
Context ID used in case of thread mode for chat based workflows
"ctx_abc123xyz78910"
Flag to enable advanced reasoning for the workflow
true
LLM to use for the query
auto
, claude-3.5-sonnet
, llama-v3-70b
, o1
, o3-mini
, gpt-4o
, gpt-5
, gpt-5-mini
, gpt-5-nano
, gpt-5-chat
"llama-v3-70b"
List of citations referenced in the response, or null if no citations are available
Current status of the workflow
PROCESSING
, PROCESSED
"PROCESSED"
Unix timestamp when this entity was created
1679644800