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
The message was generated successfully
The response is of type object.
object