> ## 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.

# Edit Presentation

Revise a generated Modern artifact with natural-language instructions. Omit `slide_ids` for a deck-wide edit or include up to 50 slide IDs to scope the change. Uploaded assets can be introduced or reused through `asset_ids`.

Pass the latest `repo_commit_sha` as `base_commit_sha` to ensure the edit applies to the revision you read. If the deck has changed, the operation fails instead of overwriting newer work.

```json theme={null}
{
  "instruction": "Make the opening more energetic and retain the station logo.",
  "slide_ids": ["slide-1"],
  "asset_ids": ["LOGO_ASSET_ID"],
  "model": {
    "id": "anthropic/claude-opus-4.8",
    "fallback_policy": "deny"
  },
  "base_commit_sha": "CURRENT_COMMIT_SHA",
  "idempotency_key": "futuri-edit-123"
}
```


## OpenAPI

````yaml POST /api/modern/v1/presentations/{presentation_id}/edits
openapi: 3.1.0
info:
  title: Alai API
  description: API endpoints for Alai Classic, Creative, and Modern presentation generation
  version: 1.1.0
servers:
  - url: https://slides-api.getalai.com
security:
  - BearerAuth: []
paths:
  /api/modern/v1/presentations/{presentation_id}/edits:
    post:
      tags:
        - Modern Slides API
      summary: Edit Presentation
      operationId: >-
        edit_presentation_api_modern_v1_presentations__presentation_id__edits_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/ModernApiEditInput'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModernApiOperation'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ModernApiEditInput:
      properties:
        instruction:
          type: string
          maxLength: 20000
          minLength: 1
          title: Instruction
        slide_ids:
          items:
            type: string
          type: array
          maxItems: 50
          title: Slide Ids
        asset_ids:
          items:
            type: string
          type: array
          maxItems: 20
          title: Asset Ids
        model:
          anyOf:
            - $ref: '#/components/schemas/ModernApiModelSelection'
            - type: 'null'
        base_commit_sha:
          anyOf:
            - type: string
              maxLength: 64
              minLength: 7
            - type: 'null'
          title: Base Commit Sha
        idempotency_key:
          anyOf:
            - type: string
              maxLength: 128
              minLength: 1
            - type: 'null'
          title: Idempotency Key
      additionalProperties: false
      type: object
      required:
        - instruction
      title: ModernApiEditInput
    ModernApiOperation:
      properties:
        id:
          type: string
          title: Id
        operation_type:
          type: string
          enum:
            - generate
            - edit
            - export
          title: Operation Type
        presentation_id:
          type: string
          title: Presentation Id
        status:
          $ref: '#/components/schemas/ModernApiOperationStatus'
        progress:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Progress
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        started_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Started At
        completed_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Completed At
      type: object
      required:
        - id
        - operation_type
        - presentation_id
        - status
      title: ModernApiOperation
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ModernApiModelSelection:
      properties:
        id:
          $ref: '#/components/schemas/AgentPrimaryModel'
        fallback_policy:
          type: string
          const: deny
          title: Fallback Policy
          default: deny
      additionalProperties: false
      type: object
      required:
        - id
      title: ModernApiModelSelection
    ModernApiOperationStatus:
      type: string
      enum:
        - queued
        - running
        - succeeded
        - failed
      title: ModernApiOperationStatus
    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
    AgentPrimaryModel:
      type: string
      enum:
        - openai/gpt-5.6-sol
        - openai/gpt-5.6-terra
        - anthropic/claude-opus-4.8
        - anthropic/claude-sonnet-5
        - anthropic/claude-sonnet-4-6
        - anthropic/claude-haiku-4-5
        - google/gemini-3.1-pro-preview
        - moonshotai/kimi-k2.6
        - z-ai/glm-5.2
        - anthropic/claude-opus-4.8-fast
        - anthropic/claude-fable-5
      title: AgentPrimaryModel
      description: >-
        Selectable primary model for the modern deck and design system agents.


        Values are OpenRouter model IDs (see OpenRouterModels in
        ai_models/model_list.py).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your Alai API key. Get one from your account settings at app.getalai.com

````