> ## Documentation Index
> Fetch the complete documentation index at: https://doc.featherhq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate a workflow from a brief, template, or blank scaffold

> Create a Workflow + one draft revision from a single seed.

``brief`` runs the async compile pipeline (HTTP 202, poll
``GET /workflows/revisions/{revision_id}``); ``template_id`` / ``blank`` seed a
graph synchronously (HTTP 201, LLM-free). Exactly one seed must be provided.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/workflows/generate
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.87.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/workflows/generate:
    post:
      tags:
        - workflows
      summary: Generate a workflow from a brief, template, or blank scaffold
      description: >-
        Create a Workflow + one draft revision from a single seed.


        ``brief`` runs the async compile pipeline (HTTP 202, poll

        ``GET /workflows/revisions/{revision_id}``); ``template_id`` / ``blank``
        seed a

        graph synchronously (HTTP 201, LLM-free). Exactly one seed must be
        provided.
      operationId: generateWorkflow
      parameters:
        - name: x-feather-client
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Feather-Client
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowGenerateRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGenerateResponse'
        '202':
          description: brief mode — the compile pipeline was enqueued (poll the revision).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowGenerateResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    WorkflowGenerateRequest:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        brief:
          anyOf:
            - type: string
            - type: 'null'
          title: Brief
        template_id:
          anyOf:
            - type: string
              pattern: ^[a-z0-9_-]+$
            - type: 'null'
          title: Template Id
        blank:
          type: boolean
          title: Blank
          default: false
        kind:
          $ref: '#/components/schemas/WorkflowKind'
          default: component
      type: object
      required:
        - name
      title: WorkflowGenerateRequest
      description: |-
        Body for ``POST /workflows/generate``.

        Exactly one of ``brief`` / ``template_id`` / ``blank`` must be supplied
        (enforced below; else 422). ``brief`` runs the async compile pipeline;
        ``template_id`` / ``blank`` seed a graph synchronously (LLM-free).
    WorkflowGenerateResponse:
      properties:
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        revision_id:
          type: string
          format: uuid
          title: Revision Id
        generation_status:
          type: string
          title: Generation Status
        mode:
          type: string
          enum:
            - brief
            - template
            - blank
          title: Mode
      type: object
      required:
        - workflow_id
        - revision_id
        - generation_status
        - mode
      title: WorkflowGenerateResponse
      description: |-
        Result of ``generate``. ``generation_status`` is the new revision's
        ``compilation_status`` (``pending`` for a fresh brief, ``succeeded`` for
        template/blank/cache-hit). ``mode`` echoes which seed ran.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
        retryable:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Retryable
        retry_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Retry After
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowKind:
      type: string
      enum:
        - assistant
        - component
      title: WorkflowKind
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````