Execute Templates

Run a published template by reference — your credits, the author's workflow, outputs only.

Execute-by-reference lets you run a community template directly, without duplicating it into your workspace. You pass input values, the template runs on Wireflow's infrastructure, and you get the outputs. The execution and polling surfaces never return the workflow graph (nodes, edges, prompts, configuration) — you receive outputs only, in the execute response and while polling.

You pay for the run with your own credits. The author's balance is never touched, and nothing is created in your workspace.

Execute a Template

POST /api/v1/templates/{slugOrId}/execute

Requires the templates:execute scope (wildcard keys work). {slugOrId} is the template's publishedSlug or id from GET /api/v1/templates.

Templates are executable by reference only when the author has enabled API execution. Templates that publish to social accounts or otherwise depend on the author's connected accounts or secrets can never be executed by reference.

Request Body

Field Type Description
inputs object Input values keyed by input-node id, matching the inputInterface returned by GET /api/v1/templates. All optional.

Inputs can only target the template's declared input nodes. Keys outside the inputInterface are rejected with 400 unknown_input — you cannot override arbitrary node configuration.

Request

curl -X POST "https://www.wireflow.ai/api/v1/templates/anime-reel-factory/execute" \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": {
      "node-prompt": "a story about a robot learning to paint"
    }
  }'

Response 202 Accepted

{
  "data": {
    "executionId": "exec_abc123",
    "status": "running",
    "poll": "/api/v1/workflows/executions/exec_abc123/poll"
  }
}

Polling

Poll the returned URL until the status is terminal. For template executions, the poll response is projected to outputs only:

{
  "executionId": "exec_abc123",
  "status": "COMPLETED",
  "creditsUsed": 42,
  "outputs": [
    {
      "nodeId": "node-llm",
      "label": "Script writer",
      "nodeType": "llm:anthropic",
      "status": "success",
      "text": "Generated script..."
    },
    {
      "nodeId": "node-video",
      "label": "Final reel",
      "nodeType": "video:seedance",
      "status": "success",
      "url": "https://cdn.wireflow.ai/renders/reel-final.mp4"
    }
  ]
}

Each output carries the node id, label, type, status, and its result (a media CDN url and/or text). Outputs are scoped to nodes that ran in this execution. The execution and poll responses never include nodes, edges, or node configuration — execute-by-reference adds no graph exposure beyond what a template's public page already shows.

Billing

  • You pay. The run is billed to your account at standard credit rates. The template author is not charged and receives nothing from the run.
  • Pre-flight check. Your balance must cover 3× the estimated cost before the run starts. The static estimator cannot see iterator fan-out, so the buffer protects you from mid-run credit exhaustion (you are only ever charged for jobs that actually run).
  • Per-call ceiling. A single template execution is rejected up front if its estimate exceeds 2,000 credits, regardless of your balance.
  • A 402 response includes requiredCredits, estimatedCredits, and availableCredits.

Rate Limits

On top of the standard API limits:

  • 120 executions per hour per account (shared with all other execution endpoints)
  • 100 executions per hour per template, across all callers

Errors

Status Code Meaning
403 api_execution_not_enabled The author has not enabled API execution for this template
400 template_not_platform_billed The template needs the author's connected accounts/secrets; response lists the ineligible nodes
400 unknown_input An inputs key is not an input-node id; response includes validInputs
400 estimate_exceeds_ceiling Estimated cost above the 2,000-credit per-call ceiling
402 insufficient_credits Balance below the 3× estimate buffer (or zero)
404 not_found No published template with that slug or id

Enabling API Execution (template authors)

API execution is off by default for every template. It is currently enabled per template by the Wireflow team — reach out if you want your template to be executable by reference. Runs of your template never spend your credits, and the execution API returns callers outputs only — no more of your graph than your template's public page already shows.

© 2026 Wireflow. All rights reserved.

Execute Templates | Wireflow Docs