Is it possible to download the PPTX file through the API?
this is what i have so far, yet not working
1. POST to /v0.2/generations with:
- X-API-KEY header
- payload including "exportAs": "pptx"
2. Poll GET /v0.2/generations/{id} until status="completed"
3. Extract pptxUrl from response
4. Provide URL to frontend for immediate download
yet still not working
Hey Alaa! 👋 What platform are you building this on? Are you using Make.com, Zapier, N8N, or custom code integration? Your flow looks solid. A few things that commonly trip people up: Export timing: Even when status shows "completed", the export URLs sometimes take an extra 10-30 seconds to generate. The exports object might be empty initially. URL expiration: Export URLs expire pretty quickly (within minutes), so if there's any delay between getting the URL and your frontend trying to download it, it could be dead. Daily limits: You might be hitting the 50 generation daily limit, which would cause exports to fail. When you log the completed response, is the exports object there but empty, or missing entirely? That would tell us if it's a timing issue or something else. The API reference at developers.gamma.app has the exact response format under the GET endpoint docs.
We're using a custom FastAPI backend integration. Thanks for the insights! When we log the completed response, the exports object is missing entirely. We've implemented the polling with a 5-second interval for up to 5 minutes, but we'll add additional delay even after status shows 'completed'. A few questions:
Is there a specific endpoint to check export status separately from generation status?
For URL expiration - should we implement server-side download and storage instead of passing URLs to frontend?
Are there any specific headers or parameters we should include to prioritize PPTX generation?
Hey Alaa! Since you're building a custom backend with FastAPI, that implementation is a bit outside our direct support scope, but I can point you in the right direction. The missing exports object usually means one of two things:
The initial POST request isn't formatted quite right. Double check that "exportAs": "pptx" is included exactly like that (lowercase, as a string).
The response might be getting modified somewhere in your backend code before it reaches your frontend.
Simple debugging tip: Try logging the raw response from Gamma right when you receive it, before your code processes it. This will show if the exports object is actually there but getting lost somewhere along the way. If you're still not seeing the PPTX URL after confirming the request format is correct, it might be worth testing with a simple curl command directly to our API (like in our docs) to isolate whether it's an API issue or something in your backend implementation. Let me know what you find when you check the raw response!
Thank you I will check it and let you know, then any workarounds using N8N that is easier to deploy or use?
N8N could definitely be simpler than custom FastAPI code. Let me walk you through a couple of automation platform options that handle async APIs well. For N8N, their HTTP Request node supports Header Authentication which is perfect for Gamma's X-API-KEY setup. You'd create a visual workflow with an initial HTTP Request node for the POST to https://public api.gamma.app/v0.2/generations. Set the authentication to "Generic Credential Type" then "Header Auth", add your X-API-KEY header, and include "exportAs": "pptx" in your JSON body. Then for the polling part, you'd add a Wait node set to 5-10 seconds, followed by another HTTP Request node to check the generation status. An IF node checks whether status equals "completed" AND the exports object exists. If not ready, it loops back to the Wait node. The N8N community has successfully used this exact pattern for similar async APIs. Here's some good news though, Gamma actually has an official Zapier integration with a "Generate Gamma" action. This handles all the async polling automatically behind the scenes, so you don't need to build any polling logic yourself. It's available for Pro users with the same 50 generations per day limit. Honestly, this might be your easiest path since it eliminates custom polling entirely. For debugging your current setup, try testing with a simple curl command directly to our API (like in our docs) to isolate whether it's an API issue or something in your backend implementation. Make sure "exportAs": "pptx" is formatted exactly like that in your POST body - lowercase, as a string. We're actively expanding our API documentation and integration guides over the next few months, so more detailed platform-specific examples will be available soon.
Thats great to hear! Thanks for building with us! We would love to hear more about what you're creating. Feel free to post in the channel to show what you're doing with it.
I wish the exportAs will be changed from object to array. I hope it would be like "exportAs":["pptx","pdf"]
and in the response, change to: "exportUrl": { "pdf":"...url...", "pptx": "...url..." }
Hey George! Yeah, that would make sense, request multiple formats at once and get all the export URLs back in a single response. Would save an extra API call when you need both formats. Good thinking on the API design. I'll pass this along as we're looking at improvements for the next version.