Tables
Slides that use the TABLE layout can render exact cell data when you send a
table object alongside the slide definition. Use this layout for KPI matrices,
feature comparisons, pricing grids, or any structured dataset that benefits from
clear columns and rows.
Using Tables with /presentation/generate/slide-by-slide
Section titled “Using Tables with /presentation/generate/slide-by-slide”- Set
layouttoTABLE - Set
item_amountto0 - Keep
contentas a short textual description of the table (used for context) - Provide the table data via the
tablefield described below - Always place the header row first; only the top row is styled as headers
Table object
Section titled “Table object”The table field is an array of rows, and each row is an array of string cell
values. The first row becomes the header. All subsequent rows render as body
rows.
"table": [ ["Column 1", "Column 2", "Column 3"], ["Row 1 Value 1", "Row 1 Value 2", "Row 1 Value 3"], ["Row 2 Value 1", "Row 2 Value 2", "Row 2 Value 3"]]In this example the ["Column 1", "Column 2", "Column 3"] entry is the header
row. Always keep it at the top to ensure the slide renders headers correctly.
Example: Table slide request
Section titled “Example: Table slide request”curl -X POST https://api.slidespeak.co/api/v1/presentation/generate/slide-by-slide -H "Content-Type: application/json" -H "X-API-Key: <YOUR_API_KEY>" -d '{ "template": "DEFAULT", "slides": [ { "title": "Regional KPIs", "layout": "TABLE", "item_amount": 0, "content": "Quarterly metrics by region", "table": [ ["Region", "Q1", "Q2", "Q3"], ["North America", "$2.1M", "$2.4M", "$2.7M"], ["Europe", "$1.8M", "$1.9M", "$2.0M"], ["Asia Pacific", "$1.2M", "$1.4M", "$1.6M"] ] } ] }'const requestBody = { template: 'DEFAULT', slides: [ { title: 'Regional KPIs', layout: 'TABLE', item_amount: 0, content: 'Quarterly metrics by region', table: [ ['Region', 'Q1', 'Q2', 'Q3'], ['North America', '$2.1M', '$2.4M', '$2.7M'], ['Europe', '$1.8M', '$1.9M', '$2.0M'], ['Asia Pacific', '$1.2M', '$1.4M', '$1.6M'] ] } ]};
fetch('https://api.slidespeak.co/api/v1/presentation/generate/slide-by-slide', { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-API-Key': '<YOUR_API_KEY>' }, body: JSON.stringify(requestBody)}) .then(response => { return response.json(); }) .then(data => { console.log('Response:', data); }) .catch(error => { console.error('Error:', error); });import requests
url = "https://api.slidespeak.co/api/v1/presentation/generate/slide-by-slide"headers = { "Content-Type": "application/json", "X-API-Key": "<YOUR_API_KEY>"}payload = { "template": "DEFAULT", "slides": [ { "title": "Regional KPIs", "layout": "TABLE", "item_amount": 0, "content": "Quarterly metrics by region", "table": [ ["Region", "Q1", "Q2", "Q3"], ["North America", "$2.1M", "$2.4M", "$2.7M"], ["Europe", "$1.8M", "$1.9M", "$2.0M"], ["Asia Pacific", "$1.2M", "$1.4M", "$1.6M"] ] } ]}
response = requests.post(url, headers=headers, json=payload)print(response.json())<?phprequire 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$headers = [ 'Content-Type' => 'application/json', 'X-API-Key' => '<YOUR_API_KEY>'];
$payload = [ "template" => "DEFAULT", "slides" => [ [ "title" => "Regional KPIs", "layout" => "TABLE", "item_amount" => 0, "content" => "Quarterly metrics by region", "table" => [ ["Region", "Q1", "Q2", "Q3"], ["North America", "$2.1M", "$2.4M", "$2.7M"], ["Europe", "$1.8M", "$1.9M", "$2.0M"], ["Asia Pacific", "$1.2M", "$1.4M", "$1.6M"] ] ] ]];
$response = $client->post('https://api.slidespeak.co/api/v1/presentation/generate/slide-by-slide', [ 'headers' => $headers, 'json' => $payload]);
$body = $response->getBody();$data = json_decode($body, true);
print_r($data);?>The first nested array in every snippet defines the headers (Region, Q1,
Q2, Q3). Subsequent arrays supply the body rows.
Data tips
Section titled “Data tips”- Keep headers concise (2–4 words) for best visual results
- Ensure every row has the same number of cells as the header row
- Use strings for all values; formatting (currency symbols, percentages, etc.) is preserved
- Order rows exactly how you expect them to appear on the slide