Documentation

modelriver trigger

Send test async requests from the terminal. Get channel IDs and WebSocket details for monitoring responses.

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 trigger
modelriver trigger --workflow my-workflow --message "Test message"
 
# With custom payload
modelriver trigger --workflow my-workflow --payload '{"messages": [...]}'
 
# Create webhook to receive response
modelriver trigger --workflow my-workflow --message "Test" --webhook-url https://webhook.site/your-id
 
# Print channel details
modelriver trigger --workflow my-workflow --message "Test" --print-channel

Example 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 responses

Options

OptionDescription
--workflow <name>Workflow name (required)
--message <text>Simple text message
--payload <json>Custom JSON payload
--webhook-url <url>Webhook URL for responses
--print-channelPrint channel details
--verboseShow detailed logs

Next steps

  • WebSocket: Connect and receive the response in real-time
  • Listen: Monitor all webhook events
  • API: Full async request documentation