Hey Kasei! 👋
You’re right — the Generate API doesn’t expose controls to directly set a chart’s position or size. Layout is handled by the chosen theme and Gamma’s auto-layout. The API’s layout knobs today are card-level only (e.g., cardOptions.dimensions) and header/footer; there aren’t per-chart sizing/position params.
Ways to improve the spacing right now:
Try a different theme: fetch options, then set themeId in your request.
Nudge with instructions: add something like additionalInstructions: "Make the bar chart fill the card width and minimize whitespace." (won’t guarantee exact sizing, but can help).
Quick manual tweak: open the generated gamma in the app and adjust elements there.
Useful endpoints & fields:
# List themes
GET https://public-api.gamma.app/v1.0/themes
# (use one of the returned IDs as themeId)
{
"inputText": "My data + chart prompt ...",
"textMode": "generate",
"format": "presentation",
"themeId": "abc123def456",
"additionalInstructions": "Ensure the bar chart fills the card width and reduce right-side whitespace.",
"cardOptions": {
"dimensions": "16x9" // or "4x3" or "fluid"
}
}
TL;DR: No direct chart size/position controls via API yet → try theme variation, prompt nudges, or quick edits in the app.