# Gamma — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Create AI-powered presentations, documents, and webpages from scratch or templates, check generation progress, download completed exports, and manage workspace settings like themes and folders. Access everything through Gamma.app's platform with a valid API key.

**Category:** Developer Tools | **Website:** [gamma.app/](https://gamma.app/) | **Docs:** [parse.bot/marketplace/a8151a38-9bc4-417b-a237-27dbb0161d3b/gamma-app-api](https://parse.bot/marketplace/a8151a38-9bc4-417b-a237-27dbb0161d3b/gamma-app-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### create_from_template

Creates a new gamma based on an existing gamma template. Returns a generation object with an ID for tracking progress.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | Yes | Gamma API key obtained from https://gamma.app/settings/api |
| `exportAs` | string | No | Export format |
| `folderIds` | string | No | Comma-separated folder IDs or JSON array of folder IDs |
| `imageOptions` | object | No | Image generation options as a JSON object |
| `prompt` | string | Yes | Prompt describing what to create from the template |
| `sharingOptions` | object | No | Sharing settings as a JSON object |
| `template_gamma_id` | string | Yes | ID of the template gamma to use as a base |
| `themeId` | string | No | Theme ID to apply |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/create_from_template \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","exportAs":"<string>","folderIds":"<string>","imageOptions":"<object>","prompt":"<string>","sharingOptions":"<object>","template_gamma_id":"<string>","themeId":"<string>"}'
```

### generate_content

Creates a new AI-generated gamma (presentation, document, or webpage) from scratch. Sends the request to Gamma's generation API and returns the generation object with an ID for tracking progress. Requires a valid Gamma API key.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `additionalInstructions` | string | No | Additional instructions for AI generation |
| `api_key` | string | Yes | Gamma API key obtained from https://gamma.app/settings/api |
| `cardOptions` | object | No | Card layout options as a JSON object |
| `cardSplit` | string | No | Card split preference |
| `exportAs` | string | No | Export format |
| `folderIds` | string | No | Comma-separated folder IDs or JSON array of folder IDs to organize the generated content |
| `format` | string | No | Output format such as presentation, document, or webpage |
| `imageOptions` | object | No | Image generation options as a JSON object |
| `input_text` | string | Yes | The text prompt or content to generate from |
| `numCards` | integer | No | Number of cards/slides to generate |
| `sharingOptions` | object | No | Sharing settings as a JSON object |
| `text_mode` | string | No | Text generation mode |
| `textOptions` | object | No | Text generation options as a JSON object |
| `themeId` | string | No | Theme ID to apply to the generated content |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/generate_content \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"additionalInstructions":"<string>","api_key":"<string>","cardOptions":"<object>","cardSplit":"<string>","exportAs":"<string>","folderIds":"<string>","format":"<string>","imageOptions":"<object>","input_text":"<string>","numCards":"<integer>","sharingOptions":"<object>","text_mode":"<string>","textOptions":"<object>","themeId":"<string>"}'
```

### get_export_urls

Retrieves the PDF and PPTX export URLs for a completed generation.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | Yes | Gamma API key |
| `generation_id` | string | Yes | The generation ID to get export URLs for |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/get_export_urls \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","generation_id":"<string>"}'
```

### get_generation_status

Polls the status of an async generation job. Use after generate_content or create_from_template to check progress until status is completed or failed.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `api_key` | string | Yes | Gamma API key obtained from https://gamma.app/settings/api |
| `generation_id` | string | Yes | The generation ID returned from generate_content or create_from_template |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/get_generation_status \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"api_key":"<string>","generation_id":"<string>"}'
```

### list_folders

Returns a paginated list of folders in the workspace. Supports search filtering and cursor-based pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `after` | string | No | Cursor for pagination, obtained from a previous response |
| `api_key` | string | Yes | Gamma API key obtained from https://gamma.app/settings/api |
| `limit` | integer | No | Maximum number of folders to return per page |
| `query` | string | No | Search query to filter folders by name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/list_folders \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"after":"<string>","api_key":"<string>","limit":"<integer>","query":"<string>"}'
```

### list_themes

Returns a paginated list of themes available in the workspace. Supports search filtering and cursor-based pagination.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `after` | string | No | Cursor for pagination, obtained from a previous response |
| `api_key` | string | Yes | Gamma API key obtained from https://gamma.app/settings/api |
| `limit` | integer | No | Maximum number of themes to return per page |
| `query` | string | No | Search query to filter themes by name |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-gamma-app-api-a8151a38/list_themes \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"after":"<string>","api_key":"<string>","limit":"<integer>","query":"<string>"}'
```
