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

This aiprompt call returns a persistence-ready updated dashboard asset but does not save it. To persist the edit, use the existing dashboard's id together with the returned asset's name and contents in an Update Dashboard API call.

Install
npm install @luzmo/nodejs-sdk
Example Response
200
400
500
{
  "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
  "user_message": {
    "id": "c1d2e3f4-5678-4901-8234-56789abcdef0",
    "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
    "message": "Add a detail table at the bottom of the dashboard.",
    "role": "user",
    "agent": "dashboard",
    "task": "generate",
    "locale_id": "en",
    "created_at": "2026-05-14T10:30:11.000Z",
    "updated_at": "2026-05-14T10:30:11.000Z",
    "aiMessageAssets": [
      {
        "id": "d2e3f4a5-6789-4012-9345-6789abcdef01",
        "message_id": "c1d2e3f4-5678-4901-8234-56789abcdef0",
        "type": "dashboard",
        "value": {
          "type": "dashboard",
          "id": "6c07f5b4-3f8c-4fa3-ae17-6ff90b1f311f",
          "name": {
            "en": "Sales overview"
          },
          "currentScreenMode": "desktop",
          "contents": {
            "version": "0.1.100",
            "timezone": {
              "type": "fixed",
              "id": "UTC"
            },
            "syncScreenModes": true,
            "datasetLinks": {},
            "parameters": [],
            "views": [
              {
                "screenModus": "desktop",
                "options": {
                  "theme": {
                    "id": "default"
                  }
                },
                "filterGroups": [],
                "items": [
                  {
                    "id": "c29a4540-2eb0-4306-94a0-dda07908cf4d",
                    "type": "bar-chart",
                    "options": {
                      "title": {
                        "en": "Monthly revenue"
                      }
                    },
                    "slots": [],
                    "position": {
                      "col": 0,
                      "row": 0,
                      "sizeX": 48,
                      "sizeY": 16
                    }
                  }
                ]
              }
            ]
          }
        },
        "created_at": "2026-05-14T10:30:11.000Z",
        "updated_at": "2026-05-14T10:30:11.000Z"
      }
    ]
  },
  "assistant_message": {
    "id": "e3f4a5b6-7890-4123-a456-789abcdef012",
    "conversation_id": "fdce930b-4f6d-4d2b-8a43-7ea7d62457a2",
    "message": "Added a detail table at the bottom of the dashboard.",
    "role": "assistant",
    "agent": null,
    "task": null,
    "locale_id": "en",
    "created_at": "2026-05-14T10:30:18.000Z",
    "updated_at": "2026-05-14T10:30:18.000Z",
    "aiMessageAssets": [
      {
        "id": "f4a5b6c7-8901-4234-b567-89abcdef0123",
        "message_id": "e3f4a5b6-7890-4123-a456-789abcdef012",
        "type": "dashboard",
        "value": {
          "type": "dashboard",
          "id": "6c07f5b4-3f8c-4fa3-ae17-6ff90b1f311f",
          "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": "c29a4540-2eb0-4306-94a0-dda07908cf4d",
                    "type": "bar-chart",
                    "options": {
                      "title": {
                        "en": "Monthly revenue"
                      }
                    },
                    "slots": [],
                    "position": {
                      "col": 0,
                      "row": 0,
                      "sizeX": 48,
                      "sizeY": 16
                    }
                  },
                  {
                    "id": "19ad8c3d-476f-41cc-809c-47584785a358",
                    "type": "regular-table",
                    "options": {},
                    "slots": [],
                    "position": {
                      "col": 0,
                      "row": 16,
                      "sizeX": 48,
                      "sizeY": 16
                    }
                  }
                ]
              }
            ]
          }
        },
        "created_at": "2026-05-14T10:30:18.000Z",
        "updated_at": "2026-05-14T10:30:18.000Z"
      }
    ]
  }
}