Bridge by Wekoya / Docs / Improve

Pipelines

Updated

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,..." } }'