Hey Juan Diego! ๐
That CORS error is a browser security feature that blocks frontend JavaScript from making direct API calls to different domains. This is expected behavior and not specific to Gamma.
Gamma-specific things to verify:
API key starts with sk-gamma-
Using X-API-KEY header (not Authorization or Bearer)
For v1.0, both inputText and textMode are required
Example request body:
json
{
"inputText": "Your content here",
"textMode": "generate",
"format": "presentation",
"numCards": 10
}How your application is structured to call our API falls outside what we can help with. We focus on Gamma-specific configuration, authentication, error messages, and rate limits rather than custom application architecture.
Once requests are reaching us from a server environment, if you hit any Gamma-specific errors, share the x-request-id from the response headers and I can help debug from there.
Full docs: https://developers.gamma.app