Salt AI Docs
Publishing Pipelines

Publish a Pipeline as an API

Turn a Pipeline into a REST endpoint other applications can call.

Publishing a Pipeline as an API gives it a stable, authenticated endpoint that any application can call over HTTP, without opening the editor. You control which inputs and outputs are visible to callers, and Salt handles queuing, execution, and result retrieval.

Prerequisites

Your Pipeline's latest run must complete successfully. Salt discovers the API contract from the Input and Output nodes in that run, so make sure your Pipeline uses those node types for whatever it exposes. If you don't have a Pipeline yet, start with Pipeline Builder and Running Pipelines.

Publish stays disabled until the Pipeline has a successful run — a note next to the button reads "Run the pipeline successfully before publishing." while that's missing. If you publish or update anyway through a raw API call, the same requirement is enforced server-side, returning "To deploy the workflow, there must be at least one successful execution."

Publish the pipeline as an API

Open the Publish page

With the Pipeline open in the editor, click Publish in the header. If API publishing is enabled, select the API surface button on the Publish page.

Check readiness

The Readiness panel at the top tells you where this Pipeline stands:

  • Run required — "Run this pipeline successfully before publishing it as an API. The API contract is discovered from its SaltInput / SaltOutput nodes in the latest successful run."
  • Not published — "Configure the contract below and publish to create a callable API endpoint. Discovered N input(s) and N output(s) from the latest run."
  • Live — "Published and live. The API matches your latest run — N input(s) and N output(s) (time ago)."
  • Ahead of the published API (no separate badge, just a banner) — "Your pipeline has changed since you last published. API callers keep using the published endpoint until you publish the update."

Configure visible inputs and outputs

The Inputs section lists what Salt discovered, with the description "Visible inputs can be overridden by API requests." Each row has an eye icon to show or hide that input from callers — hidden inputs are marked "Hidden from API" — and a Request key, a copyable chip showing the node ID callers use as the key in their request body.

The Outputs section works the same way, described as "Visible outputs are returned in the API result," with a Response key chip per row instead of a Request key. If your Pipeline has no Input or Output nodes yet, each section shows a prompt to add one and rerun the Pipeline before it can be configured.

Publish

Click Publish. This creates the endpoint using your current contract, or updates it if you've published this Pipeline as an API before. The right-rail Publish panel then shows the endpoint URL, plus ready-to-copy example requests for executing the API, checking status, and fetching results.

Calling the API

Every request is authenticated with a static API key. Salt includes the key in the generated Example request rather than showing it as a separate field. Execute the Pipeline with a POST to the endpoint URL:

curl -X POST --location "https://api.salt.ai/v1/deployments/3fa85f64-5717-4562-b3fc-2c963f66afa6/executions/" \
    -H "Content-Type: application/json" \
    -H "X-API-Key: sk_live_9f2a1c7d3b0e4f5a8c6d1b2e3f4a5b6c" \
    -d '{
          "callback": "<CALLBACK URL>", "workflow_input": {"3": {"value": "Summarize the attached quarterly filing in three sentences.", "value_type": "RAW"}}
        }'

Salt generates this exact command for you in the Example request panel, with your endpoint URL and API key already filled in — copy it from there rather than typing it by hand. The 3 in workflow_input is the input's Request key from the Inputs table; callback is optional and, if set, receives the result once the execution finishes. Both fields are optional — an empty body defaults workflow_input to {}.

Execution is asynchronous. The request returns immediately with 202 Accepted:

{
  "status": "queued",
  "status_url": "https://api.salt.ai/v1/deployments/executions/1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f/status/",
  "result_url": "https://api.salt.ai/v1/deployments/executions/1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f/result/",
  "deployment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "execution_id": "1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f"
}

Poll status_url (also copyable from the Check status panel) until status reaches a terminal value:

{
  "status": "completed",
  "execution_id": "1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f",
  "deployment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "result_url": "https://api.salt.ai/v1/deployments/executions/1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f/result/",
  "created_at": "2026-07-07T15:04:00Z",
  "started_at": "2026-07-07T15:04:01Z",
  "completed_at": "2026-07-07T15:04:07Z",
  "completion_duration": 6,
  "error_message": null
}

Right after you submit, status is pending; the initial 202 response above shows "queued" only as a one-time confirmation that the request was accepted, not a value you'll see from this endpoint. From here, status moves through pending, then running, and lands on completed, failed, or cancelled. Once it's terminal, fetch result_url:

{
  "status": "completed",
  "execution_id": "1c2eaf40-9b3d-4a2e-8f1c-6d5b4a3c2e1f",
  "deployment_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "completion_duration": 6,
  "output_artifacts": [],
  "error_message": null,
  "response_data": {"7": {"value": "The filing reports...", "value_type": "RAW"}}
}

response_data is keyed by each output's Response key. output_artifacts is only populated for web form deployments — it's always empty for an API. Fetching the result before the execution finishes returns 409 Conflict with {"error": "Execution not completed", "status": "running"}.

Keep your API key secure — anyone with it can execute your Pipeline. Send it as either X-API-Key: <key> or Authorization: Api-Key <key>. If a request omits both, or sends the wrong key, Salt rejects it before running anything.

Managing a published API

Editing the Pipeline after publishing doesn't touch the live API — callers keep hitting the endpoint you published until you publish again. After a subsequent run uses a different Pipeline version, the Readiness panel flags this as "Your pipeline has changed since you last published," and the Publish panel's status badge switches to "Needs publish."

To remove the API entirely, open the Actions menu and choose Delete. The confirmation dialog is titled "Delete API?" and warns that the endpoint becomes unavailable immediately and the action can't be undone.

Confirming with Delete API removes the endpoint right away — there's no pause or archive state in between.

On this page