Athena
Home
Environments
Environments
  • Development Server
  • Production
Home
Environments
Environments
  • Development Server
  • Production
  1. Workflow
  • Getting Started
    • Start Guide
  • Installation & Setup
    • Windows
  • Architecture
  • Guide
    • Bundles
      • Backend
    • Permissions
      • Frontend
    • Developers
      • Commit Lint
      • RESTful API
    • Workflows
      • Workflow Variables
  • API Reference
    • Authentication
      • Sign In
      • Logout
    • User
      • Get Authenticated User using Multiplai App Access Token
      • Get Authenticated User using Basic Token
    • Workspace
      • Get Workspaces Metrics
      • Get Workspaces
      • Update a Workspace
      • Retrieve a workspace
      • Delete a Workspace
    • Provider
      • Get Providers
      • Retrieve a Provider
      • Update a Provider
      • Create a Provider
      • Delete a Provider
    • Account
      • Get Accounts
      • Update an Account
      • Create an Account
      • Delete an Account
      • Retrieve an Account
    • Agent
      • Get Agents
      • Update an Agent
      • Create an Agent
      • Delete an Agent
      • Retrieve an Agent
      • Run an Agent
      • Train an Agent
      • Generate an Agent
      • Share Agent
      • Get Agent Leaderboard
    • Workflow
      • Get Workflows
        GET
      • Create a Workflow
        POST
      • Retrieve a Workflow
        GET
      • Update a Workflow
        PUT
      • Delete a Workflow
        DELETE
      • Trigger a webhook
        POST
      • Share Workflow
        POST
      • Generate Workflow
        POST
    • Workflow Execution
      • Get Workflow Executions
      • Get Workflow Execution Counts
      • Retrieve a Workflow Execution
      • Delete a Workflow Execution
    • Prompt
      • Get Prompts
      • Create a Prompt
      • Retrieve a Prompt
      • Update a Prompt
      • Delete a Prompt
      • Run a prompt
    • Memory
      • Get Memories
      • Retrieve a Memory
      • Update a Memory
      • Delete a Memory
    • Thread
      • Get Threads
      • Retrieve a Thread
      • Update a Thread
      • Delete a Thread
      • Create a Thread
      • Run a Thread
      • Generate Thread Name
    • Message
      • Get Messages
      • Retrieve a Message
      • Update a Message
      • Delete a Message
      • Create a Message
    • Large Language Model
      • Get Large Language Models
      • Retrieve a Large Language Model
    • Command Room Task
      • Store Command Room Task
      • Remove Command Room Task
    • Metrics
      • Get Agents Metrics
      • Get Workflows Metrics
      • Get Threads Metrics
      • Get Messages Metrics
      • Get Workflow Executions Metrics
  • Schemas
    • Resources
      • User
      • Workspace
      • Provider
      • Account
      • Agent
      • Workflow
      • Share
      • WorkflowExecution
      • WorkflowExecutionData
      • Prompt
      • Memory
      • Thread
      • Attachment
      • Media
      • Tool
      • Message
      • LargeLanguageModel
      • AgentLeaderboard
    • Utils
      • Pagination
        • PaginationMeta
        • PaginationLinks
      • Provider
        • AuthenticationConfig
      • Profile
        • ProfilePhotoConfig
      • Workflow
        • WorkflowExecutionDataWorkflowData
        • Node
        • Edge
  1. Workflow

Generate Workflow

Developing
Local
https://localhost
Local
https://localhost
POST
/api/v1/workflows/generate
Generates a workflow from a natural-language prompt in the specified workspace (requires auth and workspace_uuid). Supports non-streaming (returns the generated workflow JSON as a string) and SSE streaming; when streaming is off, you can set auto_create to immediately persist and return the created workflow. Defaults to model gpt-4.1-mini and outputs a workflow object with nodes and edges.

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Header Params

Body Params multipart/form-data

Responses

🟢201Created
application/json
When the auto_create is enabled, the response will be a Workflow instance.
Body

🟢200OK
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://localhost/api/v1/workflows/generate' \
--header 'X-Multiplai-Authorization;' \
--header 'Authorization: Bearer <token>' \
--form 'workspace_uuid=""' \
--form 'prompt=""' \
--form 'stream=""' \
--form 'auto_create=""' \
--form 'visibility=""'
Response Response Example
201 - Example 1
{
    "data": {
        "id": 42,
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "user_id": 15,
        "workspace_id": 3,
        "template_id": null,
        "name": "Customer Onboarding Flow",
        "description": "Automated workflow for onboarding new customers",
        "profile_photo_url": null,
        "profile_photo_config": null,
        "visibility": "workspace",
        "is_active": true,
        "is_owner": true,
        "is_favorite": false,
        "trigger_count": 2,
        "allow_cloning": true,
        "allow_account_usage": false,
        "last_used_at": "2026-02-10T14:30:00.000000Z",
        "created_at": "2026-01-15T10:00:00.000000Z",
        "updated_at": "2026-02-10T09:15:00.000000Z",
        "deleted_at": null,
        "executions_count": 156,
        "executions_in_progress_count": 3,
        "executions_for_review_count": 7,
        "executions_completed_count": 142
    }
}
Modified at 2025-12-19 04:20:01
Previous
Share Workflow
Next
Get Workflow Executions
Built with