> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getalai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Presentation

> Export an existing presentation to one or more formats (PDF, PPTX). This is an async operation.

Poll `GET /generations/{generation_id}` until status is `completed`, then access download URLs in the `formats` field.

Export an existing presentation to PDF, PPT, or get a shareable link. This is an **async operation**.

## Path Parameters

| Parameter         | Type   | Description                      |
| ----------------- | ------ | -------------------------------- |
| `presentation_id` | string | ID of the presentation to export |

***

## Request Body

| Parameter | Type  | Default    | Description                             |
| --------- | ----- | ---------- | --------------------------------------- |
| `formats` | array | `["link"]` | Formats to export: `link`, `pdf`, `ppt` |

***

## Response

```json theme={null}
{
  "generation_id": "abc123-def456-..."
}
```

Poll `GET /generations/{generation_id}` until status is `completed`.

***

## Example

### Export to Multiple Formats

```bash theme={null}
curl -X POST "https://slides-api.getalai.com/api/v1/presentations/xyz789-.../exports" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "formats": ["link", "pdf", "ppt"]
  }'
```

### Status Response

```json theme={null}
{
  "generation_id": "abc123-...",
  "generation_type": "presentation_export",
  "status": "completed",
  "presentation_id": "xyz789-...",
  "formats": {
    "link": {
      "status": "completed",
      "url": "https://app.getalai.com/view/..."
    },
    "pdf": {
      "status": "completed",
      "url": "https://storage.../presentation.pdf"
    },
    "ppt": {
      "status": "completed",
      "url": "https://storage.../presentation.pptx"
    }
  }
}
```

<Tip>
  Download URLs are signed and valid for 24 hours. Download promptly or
  call this endpoint again to get fresh URLs.
</Tip>


## OpenAPI

````yaml POST /api/v1/presentations/{presentation_id}/exports
openapi: 3.1.0
info:
  title: Alai API
  description: API endpoints for programmatic access to Alai presentation generation
  version: 1.0.0
servers:
  - url: https://slides-api.getalai.com
security:
  - BearerAuth: []
paths:
  /api/v1/presentations/{presentation_id}/exports:
    post:
      tags:
        - External API
      summary: Export a presentation
      description: >-
        Export an existing presentation to one or more formats (PDF, PPTX). This
        is an async operation.


        Poll `GET /generations/{generation_id}` until status is `completed`,
        then access download URLs in the `formats` field.
      operationId: export_presentation_api_v1_presentations__presentation_id__exports_post
      parameters:
        - name: presentation_id
          in: path
          required: true
          schema:
            type: string
            title: Presentation Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExportPresentationInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalApiGenerationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ExportPresentationInput:
      properties:
        formats:
          items:
            $ref: '#/components/schemas/ApiExportFormat'
          type: array
          title: Formats
          description: 'Formats to export: ''link'' (shareable URL), ''pdf'', ''ppt'''
          default:
            - link
      type: object
      title: ExportPresentationInput
    ExternalApiGenerationResponse:
      properties:
        generation_id:
          type: string
          title: Generation Id
          description: >-
            Unique identifier to poll for generation status via GET
            /generations/{generation_id}
      type: object
      required:
        - generation_id
      title: ExternalApiGenerationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApiExportFormat:
      type: string
      enum:
        - link
        - pdf
        - ppt
      title: ApiExportFormat
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your Alai API key. Get one from your account settings at app.getalai.com

````