Create AIPrompt

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/aiprompt
API call form
Examples
List of examples
  • Generate a chart with the item agent, limited to one dataset
  • Stream a prompt over SSE using item context
  • Answer with the analyst agent using dashboard context
  • Generate a dashboard with the dashboard agent
  • Add a detail table to an existing dashboard
  • Run a saved Agent
  • Run the analyst agent with a saved Agent
Description

The dashboard agent only supports task: "generate" . This aiprompt call does not create a dashboard; it returns a persistence-ready dashboard asset. To persist it as a Luzmo dashboard, use the returned asset's name and contents in a Create Dashboard API call.

Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
  "user_message": {
    "id": "8a3c1e2f-4b5d-6e7f-8091-a2b3c4d5e6f7",
    "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
    "message": "Build a sales overview dashboard with KPI tiles, a monthly revenue line chart, and a top products bar chart.",
    "role": "user",
    "agent": "dashboard",
    "task": "generate",
    "locale_id": "en",
    "created_at": "2026-05-14T10:20:11.000Z",
    "updated_at": "2026-05-14T10:20:11.000Z",
    "aiMessageAssets": []
  },
  "assistant_message": {
    "id": "a5c6d7e8-f901-2345-6789-abcdef012345",
    "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
    "message": "Generated a sales overview dashboard with three items.",
    "role": "assistant",
    "agent": null,
    "task": null,
    "locale_id": "en",
    "created_at": "2026-05-14T10:20:18.000Z",
    "updated_at": "2026-05-14T10:20:18.000Z",
    "aiMessageAssets": [
      {
        "id": "b6d7e8f9-0123-4567-89ab-cdef01234567",
        "message_id": "a5c6d7e8-f901-2345-6789-abcdef012345",
        "type": "dashboard",
        "value": {
          "name": {
            "en": "Sales overview"
          },
          "contents": {
            "version": "0.1.100",
            "timezone": {
              "type": "fixed",
              "id": "UTC"
            },
            "syncScreenModes": true,
            "datasetLinks": {},
            "parameters": [],
            "views": [
              {
                "screenModus": "desktop",
                "options": {
                  "theme": {
                    "id": "default"
                  }
                },
                "filterGroups": [],
                "items": [
                  {
                    "id": "96721b1e-45f3-4f8f-bd39-cdfef03d5d53",
                    "type": "conditional-number",
                    "options": {},
                    "slots": [],
                    "position": {
                      "col": 0,
                      "row": 0,
                      "sizeX": 12,
                      "sizeY": 8
                    }
                  },
                  {
                    "id": "d1d4c468-3597-4c0d-b8d3-5e94bf4337fe",
                    "type": "line-chart",
                    "options": {},
                    "slots": [],
                    "position": {
                      "col": 12,
                      "row": 0,
                      "sizeX": 24,
                      "sizeY": 16
                    }
                  },
                  {
                    "id": "22acfc19-5654-4aa8-a9de-4f5b610e6374",
                    "type": "bar-chart",
                    "options": {},
                    "slots": [],
                    "position": {
                      "col": 0,
                      "row": 16,
                      "sizeX": 24,
                      "sizeY": 16
                    }
                  }
                ]
              }
            ]
          }
        },
        "created_at": "2026-05-14T10:20:18.000Z",
        "updated_at": "2026-05-14T10:20:18.000Z"
      }
    ]
  }
}