How to hit the Gamma API

Gamma's Generate API at https://public-api.gamma.app/v1.0 turns text into a presentation, document, or webpage. It's asynchronous: create a generation, then poll it until status is completed.

Authentication

Create a key in your Gamma account settings and send it as the X-API-KEY header. In the examples it's written {{GAMMA_API_KEY}}.

Full reference: https://developers.gamma.app/

Create a generation

curl -X POST https://public-api.gamma.app/v1.0/generations \
  -H "X-API-KEY: {{GAMMA_API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{"inputText": "The history of the taco, in 5 slides", "textMode": "generate", "format": "presentation", "numCards": 5}'
Run in PostTaco

Check a generation

curl https://public-api.gamma.app/v1.0/generations/{{GENERATION_ID}} \
  -H "X-API-KEY: {{GAMMA_API_KEY}}"
Run in PostTaco