> For the complete documentation index, see [llms.txt](https://docs.autogon.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.autogon.ai/other-apis/dataset/visualize-dataset.md).

# Visualize Dataset

The Visualize Dataset endpoint allows users to visualize a dataset by providing a URL to the dataset in CSV format. Users can choose to receive the visualization in either JSON format (dataframe representation) or HTML format (plots).

### Pricing Information

* When the response is in HTML format (plots), it costs 2 units.
* When the response is in JSON format, it costs 1 unit.

## Visualize a CSV dataset.

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/engine/visualize/`

#### Headers

| Name                                           | Type   | Description          |
| ---------------------------------------------- | ------ | -------------------- |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json     |
| X-AUG-KEY<mark style="color:red;">\*</mark>    | String | Your Autogon API Key |

#### Request Body

| Name                                   | Type   | Description                                                                                                                                                                 |
| -------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| data<mark style="color:red;">\*</mark> | String | The URL of the dataset to be visualized in CSV format.                                                                                                                      |
| return\_json                           | String | If true, the response will be the dataframe representation of the dataset in JSON format. If false or omitted, the response will be the visualization plots in HTML format. |

{% tabs %}
{% tab title="200: OK return\_json: true" %}

```json
{
    "status": "true",
    "plots": {
        "column1: 0": {
            "0": 1,
            "1": 2,
            "2": 3,
            "3": 4,
            "4": 5,
            "5": 6,
        }
    }
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
    "status": "false",
    "error": "Error in Visualizing the data"
}
```

{% endtab %}

{% tab title="200: OK return\_json:false" %}

```json
{
    "status": "true",
    "plots": []
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.autogon.ai/other-apis/dataset/visualize-dataset.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
