request_chart
AUTARIO-INTERNAL (admin only). HIGH-LEVEL chart request: you do NOT build a spec, but you DO write the insight. TWO-STEP FLOW for a first-try hit: (1) PREPARE - call with dataset_id/query and NO insight; the server composes the chart deterministically and returns charted_entities (the exact entity set it drew, each with latest/peak/trough/average) + chart_type, WITHOUT publishing. IMPORTANT: a multi-country dataset is charted as an ENTITY FAMILY (the top economies, G7, the aggregate rows...), so your insight is verified ONLY against the entities actually in charted_entities | anchor every claim on one of THOSE entities and cite only THOSE per-entity values. (2) PUBLISH - call again with the same dataset_id/query PLUS your 2-3 sentence insight; the server verifies it against the real data (number-hallucination gate) and publishes, returning the URL. The server runs NO LLM of its own (you write the insight). One request = one chart. On reject it returns 422 naming WHICH number/claim failed + the charted_entities + available anchors so you fix in one step. Use THIS over create_chart_from_spec whenever you want "a good chart for this dataset/topic" without assembling a full Builder spec. Non-admin keys receive 403; third parties use create_chart_from_spec / publish_chart.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time | No | OPTIONAL time-range hint (e.g. "2010-2024"). Soft preference; the server uses the actual data span. | |
| query | No | Free-form topic/search string the server resolves to the best chartable dataset (e.g. "global inflation", "US unemployment rate"). Use instead of dataset_id when you only know the topic. dataset_id wins if both are given. | |
| region | No | OPTIONAL hint to focus a multi-country dataset on a region/entity (e.g. "G7", "Europe"). Soft preference; the server picks the final entity set. | |
| insight | No | Your 2-3 sentence data insight. OMIT IT on the PREPARE call to receive charted_entities + anchors first; SEND IT on the PUBLISH call to verify + publish. Every cited number MUST be one of the per-entity values in charted_entities (latest/peak/trough/average) returned by the prepare call. The server verifies it against the real data and publishes on pass, or returns the failing number(s) + charted_entities + anchors on fail. The server does NOT write this for you. | |
| chart_type | No | OPTIONAL hint (line | bar | snapshot). The server still owns the final chart-type decision based on the data shape; this is a soft preference only. | |
| dataset_id | No | UUID of the dataset to chart (from search_datasets / discover_by_topic / list_chart_candidates). Preferred when you already know the dataset. |