Skip to Content
DocumentationAPI ReferencePipeline Execution

Pipeline Execution API

Execute a saved pipeline with custom input data.

Endpoint: POST /api/v1/pipelines/{pipelineId}/run Required permission: pipelines

Request

curl -X POST https://forgejson.com/api/v1/pipelines/jp7abc123/run \ -H "Authorization: Bearer fje_your_key" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "default": { "name": "Alice", "age": 25, "tags": ["admin", "active"] } }, "verbose": true }'

Request body

{ "inputs": { "<input-node-name>": <any JSON value> }, "verbose": true }
FieldTypeRequiredDescription
inputsobjectNoNamed input values matched to pipeline input nodes
verbosebooleanNoInclude stepOutputs in the response when true

If the pipeline has one input node and you send exactly one input key, that value is used even if the key does not match the node name exactly. For pipelines with multiple input nodes, keys should match sanitized input node names.

Response (200) — Success

{ "success": true, "output": { "name": "ALICE", "age": 25, "tags": ["ADMIN", "ACTIVE"], "fullName": "ALICE" }, "stepOutputs": { "step-1-abc": { "name": "ALICE", "age": 25, "tags": ["ADMIN", "ACTIVE"] }, "step-2-def": { "name": "ALICE", "age": 25, "tags": ["ADMIN", "ACTIVE"], "fullName": "ALICE" } }, "durationMs": 42, "creditsUsed": 1 }
FieldTypeDescription
outputany JSONThe final result after all pipeline steps
stepOutputsobjectOutput from each individual step, keyed by step ID. Returned only when verbose is true.
durationMsnumberExecution time in milliseconds
creditsUsednumberCredits consumed (1 per successful run)

Response (400) — Pipeline failure

{ "success": false, "error": "Pipeline produced no output" }
FieldTypeDescription
errorstringDescription of what went wrong

Size limits

LimitValue
Maximum payload size50 MB
Worker thresholdPayloads > 2 KB run in a worker thread
Worker timeout30 seconds

Large payloads (> 2 KB) are executed in a worker thread with a 30-second timeout. If your pipeline processes very large documents, consider breaking the work into smaller chunks.

Error responses

StatusMeaning
400Pipeline execution failed, malformed input
401Authentication failed
403Missing pipelines permission
404Pipeline not found
408Execution timed out (30s for worker)
413Payload exceeds 50 MB
429Rate limit exceeded
500Internal server error

How pipelines are resolved

When you call this endpoint:

  1. The pipeline definition is loaded from Convex (nodes, edges, step configurations)
  2. Your inputs object is matched against the pipeline input nodes
  3. Steps are executed in topological order based on connections
  4. Each step’s output feeds into downstream steps
  5. The last step’s output becomes the output field in the response

The pipeline must be saved and owned by the same account as the API key. You cannot execute another user’s pipeline.

Last updated on