POST
/
v1
/
pipeline
/
run

Description

Any pipeline can be called and accessed externally through an API. First, you need to set the target version of the pipeline, and then the target pipeline version will be exposed as an endpoint.

You can send request with various inputs. Inputs can be of type string, or ChatMessage.

The response is an object. It contains runId and outputs. outputs is an object which has output node names as keys. Each value is an object, with a key value, and the value is the actual value.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
pipeline
string
required

Name of the pipeline to be called. Not to be confused with the pipeline version name. Target pipeline version for the pipeline is set in the UI.

inputs
object
required
env
object
required

The keys are env variables such as OPENAI_API_KEY, POSTGRES_URL, etc.

metadata
object | null

Per-request metadata. Keys are arbitrary strings such as user_id, etc.

stream
boolean | null

If true, each node's output will be streamed. For some nodes, the whole execution will be streamed (e.g. LLM). Final value will be the run trace.

Response

200 - application/json
runId
string
required
outputs
object
required