Overview
The trigger command sends an async AI request to ModelRiver and returns the channel details you need to monitor the response: either via WebSocket or webhook.
Usage
Bash
# Basic triggermodelriver trigger --workflow my-workflow --message "Test message" # With custom payloadmodelriver trigger --workflow my-workflow --payload '{"messages": [...]}' # Create webhook to receive responsemodelriver trigger --workflow my-workflow --message "Test" --webhook-url https://webhook.site/your-id # Print channel detailsmodelriver trigger --workflow my-workflow --message "Test" --print-channelExample output
✓ Async request created Channel Details{ "channel_id": "abc-123-def", "project_id": "xyz-789", "websocket_url": "wss://api.modelriver.com/socket", "websocket_channel": "ai_response:xyz-789:abc-123-def", "status": "pending"} > Use --webhook-url to automatically receive responses via webhook> Or use "modelriver websocket" to connect and receive responsesOptions
| Option | Description |
|---|---|
--workflow <name> | Workflow name (required) |
--message <text> | Simple text message |
--payload <json> | Custom JSON payload |
--webhook-url <url> | Webhook URL for responses |
--print-channel | Print channel details |
--verbose | Show detailed logs |