I have my logos, otf files and images. I am passing those as html links to be used in the presentation. But not being honored properly.
Hi there! 👋 I'll help you troubleshoot this, but I need a bit more detail to understand what's happening. A few clarifications: On fonts/OTF files: The Gamma API doesn't accept font files (OTF, TTF, etc.) as parameters. Custom fonts need to be uploaded directly through the Gamma UI in your workspace settings, and then they'll be available to use in API-generated content. On images: The API accepts image URLs through the images parameter. Can you clarify what you mean by "passing those as html links"? Are you:
Including image URLs in the images array parameter?
Embedding HTML image tags in your inputText?
Something else?
To help you better, I need:
What exactly isn't working?
Are images not appearing at all?
Are they appearing but not where you expect?
Are logos being ignored completely?
Can you share a sample request body? (Feel free to redact sensitive info)
What's the expected behavior vs what you're actually seeing?
Any error messages or response details?
Once I have these details, I can give you specific guidance on how to properly format your request! Looking forward to helping you sort this out.
You can reference our API documentation here as well: https://developers.gamma.app/docs/getting-started
Hey Amir! Got you covered on both: Image URLs in your curl: Just drop the URLs directly into your inputText where you want them: curl -X POST https://public-api.gamma.app/v1.0/generations -H "Content-Type: application/json" -H "X-API-KEY: sk-gamma-xxxxxxxx" -d '{"inputText": "# Slide 1\n\nhttps://example.com/logo.png\n\n## Slide 2\n\nSome text here\n\nhttps://example.com/chart.jpg", "textMode": "preserve", "format": "presentation", "imageOptions": {"source": "noImages"}}' The URLs get embedded right where they appear in your text. Just make sure the images are publicly accessible (JPG, PNG, GIF, WEBP). PDF as input: The API doesn't support file uploads - it only accepts text through the inputText parameter. You'll need to extract the text from your PDF on your end before sending it to the API. Check out the full docs here for all the input text details and examples: https://developers.gamma.app/docs/generate-api-parameters#inputtext Let me know if you hit any snags!
Hi Amir! Great question! You can't use two different imageOptions.source values in a single generation - the API applies one image source to the entire presentation. However, here's the perfect solution for your use case: Use the headerFooter parameter to add your logo as a persistent element, while setting imageOptions.source to aiGenerated for the content images. This is actually the recommended approach for branding! Here's a complete example:
curl -X POST https://public-api.gamma.app/v1.0/generations \
-H "Content-Type: application/json" \
-H "X-API-KEY: sk-gamma-xxxxxxxx" \
-d '{
"inputText": "Your presentation content here",
"textMode": "generate",
"format": "presentation",
"numCards": 10,
"imageOptions": {
"source": "aiGenerated",
"model": "imagen-4-pro",
"style": "professional, clean"
},
"cardOptions": {
"dimensions": "fluid",
"headerFooter": {
"topRight": {
"type": "image",
"source": "custom",
"src": "https://example.com/your-logo.png",
"size": "sm"
},
"bottomRight": {
"type": "cardNumber"
},
"hideFromFirstCard": false,
"hideFromLastCard": false
}
}
}'
Key points: ✅ Your logo appears consistently via cardOptions.headerFooter ✅ AI generates all content images via imageOptions.source: "aiGenerated" ✅ Control logo visibility with hideFromFirstCard and hideFromLastCard options ✅ Position your logo in 6 locations: topLeft, topRight, topCenter, bottomLeft, bottomRight, bottomCenter ✅ Size options: sm, md, lg, xl Alternative approach: Create a template in the Gamma UI with your logo already positioned, then use the Create from Template API (beta feature in v1.0) to generate presentations that inherit your branding. 💡 Pro tip: Make sure your logo URL is publicly accessible and uses HTTPS. Supported formats are JPG, PNG, GIF, and WEBP. Full documentation on headers and footers: https://developers.gamma.app/docs/generate-api-parameters#cardoptionsheaderfooter Let me know if you need help fine-tuning the positioning or sizing!
This is great. Thanks alot. Can yo get both pdf and pptx output in a single generate call?
.png)