Skip to main content
POST
/
v1
/
workflows
/
revisions
/
{revision_id}
/
compile
Compile a workflow revision (async)
curl --request POST \
  --url https://api-sandbox.featherhq.com/v1/workflows/revisions/{revision_id}/compile \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "force": false,
  "compilation_strategy": "<string>"
}
'
{
  "status": "<string>",
  "revision": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "workflow_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "instructions": "<string>",
    "compilation_strategy": "<string>",
    "compilation_status": "<string>",
    "trigger_type": "<string>",
    "trigger_config": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "system_prompt": "<string>",
    "compiled_graph": {},
    "quality_report": {},
    "compilation_errors": [
      "<string>"
    ],
    "compilation_task_id": "<string>",
    "compilation_input_hash": "<string>",
    "router_config_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "analyzer_model_settings": {
      "model": "<string>",
      "config": {
        "temperature": 123,
        "max_tokens": 123,
        "top_p": 123,
        "stop_sequences": [
          "<string>"
        ],
        "request_timeout_ms": 123,
        "thinking_budget": 2
      }
    },
    "router_model_settings": {
      "model": "<string>",
      "config": {
        "temperature": 123,
        "max_tokens": 123,
        "top_p": 123,
        "stop_sequences": [
          "<string>"
        ],
        "request_timeout_ms": 123,
        "thinking_budget": 2
      }
    },
    "policy_ids": [
      "<unknown>"
    ],
    "tool_input_defaults": {},
    "tools": [
      {
        "tool": {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "name": "<string>",
          "description": "<string>",
          "active_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "active_revision": {
            "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "tool_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
            "name": "<string>",
            "description": "<string>",
            "status": "<string>",
            "created_by": "<string>",
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "default_count": 123,
            "pinned_count": 123,
            "stale_input_fields": [
              "<string>"
            ],
            "merged_input_preview": {},
            "configuration": {
              "url": "<string>",
              "method": "GET",
              "headers": [
                {
                  "key": "<string>",
                  "value": "<string>",
                  "secure": false
                }
              ],
              "query_params": [
                {
                  "key": "<string>",
                  "value": "<string>",
                  "secure": false
                }
              ],
              "body": {},
              "timeout": 30,
              "variables": [
                {
                  "name": "<string>",
                  "type": "str",
                  "description": "<string>",
                  "required": false
                }
              ],
              "retry": {
                "max_retries": 0,
                "base_delay_seconds": 1,
                "max_delay_seconds": 30,
                "jitter": true
              }
            },
            "transfer_target": {
              "destination": "<string>",
              "mode": "cold"
            },
            "response_schema": {
              "field_mappings": [
                {
                  "path": "<string>",
                  "alias": "<string>"
                }
              ]
            },
            "has_secrets": false,
            "input_defaults": {}
          },
          "metadata": {}
        },
        "tool_revision_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      }
    ],
    "knowledge_base_ids": [
      "3c90c3cc-0d44-4b50-8888-8dd25736052a"
    ],
    "created_by": "<string>"
  },
  "task_id": "<string>",
  "cached": false
}

Authorizations

x-api-key
string
header
required

Path Parameters

revision_id
string<uuid>
required

Body

application/json

Body for POST /workflows/revisions/{id}/compile.

force
boolean
default:false
compilation_strategy
string | null

Response

Cache hit — the stored compiled graph was reused; no compile enqueued.

Result of a compile request.

cached=True → the stored graph was reused (HTTP 200, no task ran). Otherwise the compile was enqueued (HTTP 202) and task_id is the handle for polling (GET /workflows/revisions/{id}) and cancelling. status is the revision's compilation_status after the call (succeeded for a cache hit, pending for a fresh enqueue).

status
string
required
revision
WorkflowRevisionResponse · object
required

Full revision response — the compile-poll target (WF-08).

Clients poll GET /workflows/revisions/{id} and read compilation_status

  • compilation_errors + compiled_graph to determine whether an async compile job is done. compilation_task_id is the Celery task handle the conductor uses to cancel an in-flight compile.
task_id
string | null
cached
boolean
default:false