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 (--workflow can be separate or inside the JSON)
modelriver trigger --workflow my-workflow --payload '{"messages": [...], "metadata": {"ticket_id":"TCK-1"}}'
 
# 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

Event-driven tip

If the workflow is event-driven, keep modelriver listen --print running, then complete with:

Bash
modelriver callback --channel-id CHANNEL_ID --data '{"summary":"..."}'

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
> For event-driven workflows, complete with: modelriver callback --channel-id <id> --data '{...}'

Options

OptionDescription
--workflow <name>Workflow name (required unless included in --payload)
--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
  • Callback: Complete event-driven flows
  • API: Full async request documentation