Create AI Chart

LLM-friendly URL
POST
https://api.luzmo.com/0.1.0/aichart
API call form
Examples
List of examples
  • Generate a chart using a prompt
  • Generate example prompts for a dataset containing information about burritos
Install
pip install luzmo-sdk
Example Response
200
400
500
{
  "generatedChart": {
    "type": "bar-chart",
    "position": {
      "sizeX": 24,
      "sizeY": 28,
      "row": 0,
      "col": 0
    },
    "title": {},
    "options": {
      "title": {
        "en": "Cheesyness by Recipe"
      }
    },
    "content": {},
    "slots": [
      {
        "name": "y-axis",
        "content": [
          {
            "type": "numeric",
            "format": ",.2f",
            "label": "cheesyness",
            "columnId": "99909a5d-aa8f-405b-8325-2d30b67af583",
            "datasetId": "d75f3d79-ae27-4007-8653-19b22db79bbd"
          }
        ]
      },
      {
        "name": "measure",
        "content": []
      },
      {
        "name": "legend",
        "content": [
          {
            "type": "hierarchy",
            "label": "recipe",
            "columnId": "ec281a85-7def-4603-819f-408835780aa9",
            "datasetId": "d75f3d79-ae27-4007-8653-19b22db79bbd"
          }
        ]
      }
    ],
    "aichartId": "303768d2-ff51-4e11-82c8-dffc8691ff48"
  },
  "question": "Visualize burrito cheesyness by recipe",
  "functionCall": "createBarChart",
  "functionResponse": {
    "title": "Cheesyness by Recipe",
    "s__y-axis": [
      {
        "id": "0"
      }
    ],
    "s__measure": [],
    "s__legend": [
      {
        "id": "10"
      }
    ]
  }
}