# Pipelines

URL: https://bridge.wekoya.tech/docs/pipelines
Updated: 2026-11-08

> Several steps behind one endpoint: listen to a voice note, pull out the order, check for a complaint, and speak a reply. Each step reads the request…

Several steps behind one endpoint: listen to a voice note, pull out the order, check for a complaint, and speak a reply. Each step reads the request (`{{input.audio}}`) or an earlier step (`{{steps.order.customer_name}}`).

```
curl https://wekoya-api.wekoya.tech/v1/workflows \
  -H "Authorization: Bearer $WEKOYA_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "name": "voice-orders",
    "steps": [
      { "id": "hear", "type": "transcribe", "audio": "{{input.audio}}", "language": "multi" },
      { "id": "order", "type": "chat", "model": "cfg:orders", "prompt": "{{steps.hear}}", "json": true },
      { "id": "complaint", "type": "decide", "state": "{{steps.hear}}",
        "questions": { "complaint": { "type": "noul", "instructions": "Is the customer complaining?" } } },
      { "id": "confirm", "type": "speak", "text": "Thank you {{steps.order.customer_name}}, your order is on its way." }
    ]
  }'

# Run it: one call, every step in order
curl https://wekoya-api.wekoya.tech/v1/workflows/voice-orders/run \
  -H "Authorization: Bearer $WEKOYA_API_KEY" -H "Content-Type: application/json" \
  -d '{ "input": { "audio": "data:audio/ogg;base64,..." } }'
```

- Step types: `transcribe`, `chat` (any model or a `cfg:` name, can read a file with `attach`), `decide` (Jev), `speak`, `image` (draw from a prompt, or edit pictures given in `images`, such as an outfit onto `{{input.photo}}`) and `music`.
- The reply lists every step with its output, time and cost. If a step fails, the pipeline stops there and `status` is `failed`, unless the step is marked `optional`.
- Every run costs money: each step is billed like a direct request, and the reply shows each step's cost. Pictures are the dearest step (about ₦57 or more each), so a pipeline makes at most 8. Creating or changing a pipeline needs an admin; running one needs the chat scope. Up to 8 steps and 25 MB of input.
