API Reference
Generate a message for a scenario based on conversation history
Python
from autoblocks.api.app_client import AutoblocksAppClient client = AutoblocksAppClient( api_key="<YOUR_API_KEY>", app_slug="my-app", ) response = client.scenarios.generate_message( scenario_id="scenario_123", messages=[ {"role": "user", "content": "Hello"}, {"role": "assistant", "content": "Hi there!"} ] )
{ "message": "Hello, how are you?", "isFinalMessage": true }
API Key created in the Autoblocks Webapp
Show child attributes
The message was generated successfully
The generated message
"Hello, how are you?"
Whether the message is the final message in the scenario
true