POST
/
apps
/
{appSlug}
/
scenarios
/
{scenarioId}
/
generate-message
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
}

Authorizations

Authorization
string
header
required

API Key created in the Autoblocks Webapp

Path Parameters

appSlug
string
required
scenarioId
string
required

Body

application/json

Response

200 - application/json

The message was generated successfully

The response is of type object.