Workflows Endpoints¶
Once a workflow is deployed in OI Agents, a unique API gateway endpoint is generated, allowing external systems to programmatically execute, monitor, and fetch the workflow definition.
Each deployed workflow has its own Base URL, API Key, and dedicated set of endpoints.
Authentication¶
All requests must include a valid API Key using Bearer token authentication:
You can generate and manage keys via the "View API Keys" button in the deployment view.
Available Endpoints¶
1. Execute Workflow¶
POST /workflow/run
Run a deployed workflow using input payloads.
curl -X POST '{BASE_URL}/workflow/run' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: application/json' \
--data-raw '{
"initial_input": "Hello, world!",
"ctx": {},
"stream": true
}'
initial_input: Required input for the workflowctx: Optional context object for runtime valuesstream: Settrueto enable streaming (for sync execution)
2. Health Check¶
GET /workflow/health
Check the health of the deployed workflow to ensure it's operational.
3. Get Workflow Definition¶
GET /workflow
Fetch the current deployed JSON definition of the workflow.
Notes¶
- Base URL is unique to each deployed workflow.
- These endpoints only function when the workflow is actively deployed.
- Executions can be done in both sync and async modes, with streaming support available in sync runs.
- Logs and execution history are available from the Logs tab for debugging and traceability.