{
  "openapi": "3.1.0",
  "info": {
    "title": "PlusAI REST API",
    "version": "v0",
    "description": "Generate and edit native, fully editable PowerPoint (.pptx) presentations with Plus AI. The Presentation Agent API runs multi-turn agent sessions that create or revise decks, the Presentations API turns a prompt into a deck, and the Files API uploads decks and source files for them to use. Authenticate with an API key sent as a Bearer token (create one at https://app.plusdocs.com/api-settings); API access requires a Pro, Team or Max plan. See https://plusai.com/auth.md. Assembled from the API reference at https://guide.plusai.com/apis-for-presentations/api-reference.",
    "termsOfService": "https://plusai.com/terms",
    "contact": {
      "name": "Plus AI support",
      "email": "support@plusdocs.com",
      "url": "https://plusai.com/contact-us"
    }
  },
  "externalDocs": {
    "description": "Plus AI API reference",
    "url": "https://guide.plusai.com/apis-for-presentations/api-reference"
  },
  "servers": [
    {
      "url": "https://api.plusdocs.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Presentation Agent",
      "description": "Create and drive AI presentation agent sessions."
    },
    {
      "name": "Files",
      "description": "Upload, list, and delete user files."
    },
    {
      "name": "Presentations",
      "description": "Generate presentations from a text prompt."
    }
  ],
  "paths": {
    "/r/v0/agent/sessions": {
      "post": {
        "description": "Creates a new agent session, posts the initial prompt, and starts the\nagent. Returns a polling URL to track progress.\n\nOptionally seeds the session with an existing PowerPoint file\n(`pptxFileId`) and/or file attachments (`attachments[].fileId`). File\nIDs must reference files in the caller's organization that the caller\nowns or that are shared with one of their teams (e.g. uploaded via\n`PUT /r/v0/files/upload`); other files are reported as not found.\n",
        "operationId": "createAgentSession",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAgentSessionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAgentSessionResponse"
                }
              }
            },
            "description": "Session created and started."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequiredError"
                }
              }
            },
            "description": "Insufficient AI agent credits for the billing cycle."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "summary": "Create and start an AI agent session",
        "tags": [
          "Presentation Agent"
        ]
      }
    },
    "/r/v0/agent/sessions/{sessionId}": {
      "get": {
        "description": "Returns the current status of an agent session. Poll this endpoint\nuntil `status` reaches a terminal value. When the agent finishes,\n`pdfUrl`, `pptxUrl`, and `thumbnailUrl` are populated with download URLs.\n\nA session is a conversation: its first prompt is turn 0, and each\nmessage posted with `POST /r/v0/agent/sessions/{sessionId}/messages`\nstarts the next turn. `status`, `lastAssistantMessage`,\n`statusMessage`, `stalled`, `turnCreditsUsed` and `turnPptxUrl` all\ndescribe the current `turn`.\n\n**Polling a turn.** After posting a message that returned turn `N`,\npoll until `turn` equals `N` and `status` is `IDLE`, `FAILED` or\n`INTERRUPTED`, or until `stalled` is `true`. The new turn is recorded\nbefore the message is acknowledged, so a poll never reports the\nprevious turn's result as the new turn's.\n\nAny member of the session's organization can read it; only the user\nwho created it can continue or interrupt it.\n",
        "operationId": "getAgentSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSession"
                }
              }
            },
            "description": "The current session state."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Session not found."
          }
        },
        "summary": "Get the current state of an agent session",
        "tags": [
          "Presentation Agent"
        ]
      }
    },
    "/r/v0/agent/sessions/{sessionId}/interrupt": {
      "post": {
        "description": "Stops the session's current turn, and any sub-agents working on it,\nif it is still in progress. The session then reports `INTERRUPTED`\nand accepts the next message. Pass `expectedTurn` so a late request\ncan't stop a newer turn.\n\nOnly the user who created the session can interrupt it.\n",
        "operationId": "interruptAgentSession",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InterruptAgentSessionRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InterruptAgentSessionResponse"
                }
              }
            },
            "description": "The turn was stopped."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Session not found, or not created by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionNotActive"
                }
              }
            },
            "description": "`NOT_ACTIVE`: nothing was stopped, because the turn had already\nended (or `expectedTurn` isn't the current turn). `status` and\n`turn` are the session's.\n"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "summary": "Stop the turn an agent session is working on",
        "tags": [
          "Presentation Agent"
        ]
      }
    },
    "/r/v0/agent/sessions/{sessionId}/messages": {
      "post": {
        "description": "Posts a follow-up prompt to an existing session, which starts the\nsession's next turn and runs the agent on it. The agent keeps the\nconversation so far and edits the session's presentation in place.\nPoll the returned `pollingUrl` (the same URL as at creation) until\n`turn` equals the returned `turn` and `status` is `IDLE`, `FAILED` or\n`INTERRUPTED`, or until `stalled` is `true`.\n\nOnly the user who created the session can continue it. A turn still\nin progress must finish, or be stopped with\n`POST /r/v0/agent/sessions/{sessionId}/interrupt`, before the next\none can start (`409 AGENT_BUSY`).\n\nSend an `Idempotency-Key` header to retry safely: a retry with the\nsame key after the message was accepted returns the same turn and\ndoesn't start another.\n",
        "operationId": "sendAgentSessionMessage",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A client-generated key for this message (e.g. a UUID), reused on\nretries. 1 to 255 letters, digits, `.`, `_`, `:` or `-`. Without\none, every request is a new message.\n",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "pattern": "^[A-Za-z0-9._:-]{1,255}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendAgentSessionMessageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SendAgentSessionMessageResponse"
                }
              }
            },
            "description": "Message accepted; the new turn has started."
          },
          "400": {
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/Error"
                    },
                    {
                      "$ref": "#/components/schemas/AgentSessionRefusal"
                    }
                  ]
                }
              }
            },
            "description": "The request is invalid, or an attachment can't be used\n(`INVALID_ATTACHMENT_KEY`, `ATTACHMENT_FAILED`, `PDF_PAGE_LIMIT`).\n"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionRefusal"
                }
              }
            },
            "description": "Insufficient AI agent credits for the billing cycle."
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionRefusal"
                }
              }
            },
            "description": "The caller may no longer use the session's organization\n(`NOT_ORG_MEMBER`) or edit its presentation\n(`PRESENTATION_EDIT_FORBIDDEN`).\n"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Session not found, or not created by the caller."
          },
          "409": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionRefusal"
                }
              }
            },
            "description": "The session can't take this message now:\n- `AGENT_BUSY`: a turn is still in progress. Wait for it to end,\n  or stop it with `interruptUrl`, then post again. `staleAt` is\n  when the running turn counts as stalled, after which a new\n  message replaces it.\n- `CONVERSATION_ADVANCED`: `expectedTurn` is behind the session's\n  `turn`.\n- `SESSION_NOT_CONTINUABLE` (see `reason`) or `CONTEXT_OVERFLOW`:\n  the conversation can't continue; create a new session.\n"
          },
          "410": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionRefusal"
                }
              }
            },
            "description": "`SESSION_EXPIRED`: the conversation is too old or has too many\nturns (see `reason`); create a new session.\n"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          },
          "503": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentSessionRefusal"
                }
              }
            },
            "description": "A temporary failure (`ORG_ACCESS_UNVERIFIED`,\n`TURN_START_FAILED`); retry with the same `Idempotency-Key`.\n"
          }
        },
        "summary": "Continue an agent session with another prompt",
        "tags": [
          "Presentation Agent"
        ]
      }
    },
    "/r/v0/files": {
      "get": {
        "description": "Lists the authenticated user's files in the organization, ordered by\ncreation time (newest first). Supports cursor-based pagination.\n",
        "operationId": "listFiles",
        "parameters": [
          {
            "description": "Page size (1–100). Defaults to 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "The `nextCursor` returned by a previous page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileListResponse"
                }
              }
            },
            "description": "A page of files."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "summary": "List files",
        "tags": [
          "Files"
        ]
      }
    },
    "/r/v0/files/upload": {
      "put": {
        "description": "Uploads a file as `multipart/form-data`. The upload is validated and\naccepted synchronously, then processed asynchronously.\n\nConstraints:\n- The request method must be `PUT`.\n- `Content-Type` must be `multipart/form-data`.\n- `Content-Length` is required (chunked transfer encoding is not\n  supported).\n- Maximum size is 125 MB.\n",
        "operationId": "uploadFile",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "description": "The file to upload.",
                    "format": "binary",
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadAccepted"
                }
              }
            },
            "description": "File received; processing will begin shortly."
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "405": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadError"
                }
              }
            },
            "description": "Method not allowed (must use PUT)."
          },
          "411": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadError"
                }
              }
            },
            "description": "Content-Length header is required."
          },
          "413": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadError"
                }
              }
            },
            "description": "File exceeds the size limit."
          },
          "415": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadError"
                }
              }
            },
            "description": "Content-Type must be multipart/form-data."
          }
        },
        "summary": "Upload a file",
        "tags": [
          "Files"
        ]
      }
    },
    "/r/v0/files/{fileId}": {
      "delete": {
        "description": "Deletes a file the caller owns.\nReturns `204` on success.\n",
        "operationId": "deleteFile",
        "parameters": [
          {
            "in": "path",
            "name": "fileId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deletion accepted; no content."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "File not found."
          }
        },
        "summary": "Delete a file",
        "tags": [
          "Files"
        ]
      }
    },
    "/r/v0/presentation": {
      "post": {
        "operationId": "createPresentation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePresentationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePresentationResponse"
                }
              }
            },
            "description": "Presentation generation started."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            },
            "description": "Concurrent presentation processing limit exceeded."
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "summary": "Generate a presentation from a prompt",
        "tags": [
          "Presentations"
        ]
      }
    },
    "/r/v0/presentation/{presentationId}": {
      "get": {
        "operationId": "getPresentation",
        "parameters": [
          {
            "in": "path",
            "name": "presentationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Presentation"
                }
              }
            },
            "description": "The presentation."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "description": "Presentation not found."
          }
        },
        "summary": "Get a presentation",
        "tags": [
          "Presentations"
        ]
      }
    },
    "/r/v0/presentations": {
      "get": {
        "description": "Returns up to 50 of the presentations created via this API.",
        "operationId": "listPresentations",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "presentations": {
                      "items": {
                        "$ref": "#/components/schemas/Presentation"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "A list of presentations."
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        },
        "summary": "List presentations",
        "tags": [
          "Presentations"
        ]
      }
    }
  },
  "components": {
    "responses": {
      "BadRequest": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "The request was malformed or missing required fields."
      },
      "InternalServerError": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "An unexpected error occurred."
      },
      "Unauthorized": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        },
        "description": "Missing or invalid API key."
      }
    },
    "schemas": {
      "AgentSession": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "lastAssistantMessage": {
            "description": "The agent's latest reply in the current turn, once it has ended. Null for sessions not created through this API (e.g. the web app's or the PowerPoint add-in's chats).",
            "type": [
              "string",
              "null"
            ]
          },
          "pdfUrl": {
            "description": "Download URL for the generated PDF (populated when finished).",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "pptxUrl": {
            "description": "Download URL for the generated PPTX (populated when finished).",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "sessionId": {
            "type": "string"
          },
          "stalled": {
            "description": "The current turn can no longer finish (it never started, or stopped\nmaking progress). Stop polling it; posting a new message replaces\nthe stalled turn.\n",
            "type": "boolean"
          },
          "status": {
            "description": "The status of the current turn: `READY`, `RUNNING` and\n`PENDING_TOOL_CALLS` are in progress; `IDLE` means the turn\nfinished and the session is waiting for the next message.\n",
            "enum": [
              "READY",
              "IDLE",
              "RUNNING",
              "PENDING_TOOL_CALLS",
              "DONE",
              "INTERRUPTED",
              "FAILED"
            ],
            "type": "string"
          },
          "statusMessage": {
            "description": "A description of the current status, e.g. why the turn failed.",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnailUrl": {
            "description": "Download URL for a thumbnail image (populated when finished).",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "turn": {
            "description": "The conversation turn the session is on: 0 for the prompt it was\ncreated with, then one more for each message posted to it.\n",
            "minimum": 0,
            "type": "integer"
          },
          "turnCreditsUsed": {
            "description": "AI agent credits the current turn has used so far.",
            "type": [
              "number",
              "null"
            ]
          },
          "turnPptxUrl": {
            "description": "Download URL for the presentation as of the end of the current\nturn (populated once the turn is finished). `pptxUrl` is always the\nlatest version.\n",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "status",
          "turn",
          "stalled"
        ],
        "type": "object"
      },
      "AgentSessionNotActive": {
        "properties": {
          "code": {
            "enum": [
              "NOT_ACTIVE"
            ],
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "status": {
            "description": "The session's status.",
            "type": "string"
          },
          "turn": {
            "description": "The session's current turn.",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "message",
          "turn",
          "status"
        ],
        "type": "object"
      },
      "AgentSessionRefusal": {
        "description": "Why the session didn't accept the message. Nothing was changed.",
        "properties": {
          "code": {
            "enum": [
              "AGENT_BUSY",
              "CONVERSATION_ADVANCED",
              "SESSION_NOT_CONTINUABLE",
              "CONTEXT_OVERFLOW",
              "INSUFFICIENT_AGENT_CREDITS",
              "NOT_ORG_MEMBER",
              "PRESENTATION_EDIT_FORBIDDEN",
              "SESSION_EXPIRED",
              "INVALID_ATTACHMENT_KEY",
              "ATTACHMENT_FAILED",
              "PDF_PAGE_LIMIT",
              "ORG_ACCESS_UNVERIFIED",
              "TURN_START_FAILED"
            ],
            "type": "string"
          },
          "interruptUrl": {
            "description": "`AGENT_BUSY` only: the URL that stops the running turn.",
            "format": "uri",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "reason": {
            "description": "For `SESSION_NOT_CONTINUABLE` and `SESSION_EXPIRED`, why the\nconversation can't continue (e.g. `agent`, `model_retired`, `age`, `turns`).\n",
            "type": "string"
          },
          "staleAt": {
            "description": "`AGENT_BUSY` only: when the running turn counts as stalled, after\nwhich a new message replaces it.\n",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "turn": {
            "description": "The session's current turn.",
            "type": "integer"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "CreateAgentSessionRequest": {
        "properties": {
          "attachments": {
            "description": "Files to attach to the initial message.",
            "items": {
              "properties": {
                "fileId": {
                  "type": "string"
                }
              },
              "required": [
                "fileId"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "callbackUrl": {
            "description": "HTTPS URL invoked when the session changes state. Must be a public\nHTTPS address (no localhost/private IPs).\n",
            "format": "uri",
            "type": "string"
          },
          "language": {
            "default": "auto",
            "description": "Target language. Defaults to `auto`.",
            "type": "string"
          },
          "model": {
            "description": "The model to use.",
            "enum": [
              "claude-fable-5",
              "claude-opus-5-5",
              "claude-opus-5",
              "claude-opus-4-8",
              "claude-opus-4-7",
              "claude-opus-4-6",
              "claude-sonnet-5-5",
              "claude-sonnet-5",
              "claude-sonnet-4-6",
              "claude-haiku-4-5",
              "gpt-5.4",
              "gpt-5.4-nano",
              "gpt-5.4-mini",
              "gpt-5.4-pro",
              "gpt-5.5",
              "gpt-5.5-pro",
              "gpt-5.6-sol",
              "gpt-5.6-terra",
              "gpt-5.6-luna",
              "@cf/moonshotai/kimi-k2.7-code"
            ],
            "type": "string"
          },
          "pptxFileId": {
            "description": "ID of an existing PowerPoint file (uploaded via the files API) to\nseed the session with. Must reference a `.pptx` file (legacy\n`.ppt` files aren't supported).\n",
            "type": "string"
          },
          "prompt": {
            "description": "The initial instruction for the agent.",
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ],
        "type": "object"
      },
      "CreateAgentSessionResponse": {
        "properties": {
          "pollingUrl": {
            "description": "URL to poll for session state.",
            "format": "uri",
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          }
        },
        "required": [
          "sessionId",
          "pollingUrl"
        ],
        "type": "object"
      },
      "CreatePresentationRequest": {
        "properties": {
          "attachments": {
            "description": "Files to use as content sources for the deck. In `IMAGES` mode,\nPNG/JPEG attachments additionally steer the generated images as\nstyle references. Each `fileId` comes from\n`PUT /r/v0/files/upload`.\n",
            "items": {
              "properties": {
                "fileId": {
                  "type": "string"
                }
              },
              "required": [
                "fileId"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "design": {
            "description": "`IMAGES` mode only. Free-form deck-wide design direction (as\nproduced by the writer agent), threaded into every per-slide image\nprompt so the deck stays visually cohesive. Rejected with `400` in\n`SLIDES` mode.\n",
            "type": "string"
          },
          "generationMode": {
            "default": "SLIDES",
            "description": "Generation pipeline to use. `SLIDES` (default) produces a\ntext-based deck; `IMAGES` produces an image-per-slide deck.\n",
            "enum": [
              "SLIDES",
              "IMAGES"
            ],
            "type": "string"
          },
          "includeUserTips": {
            "default": false,
            "type": "boolean"
          },
          "language": {
            "default": "en",
            "type": "string"
          },
          "numberOfSlides": {
            "type": "integer"
          },
          "prompt": {
            "type": "string"
          },
          "slides": {
            "description": "`IMAGES` mode only. A caller-supplied outline, matching what the\nweb app's writer agent produces. When provided, the deck is\ngenerated from these slides rather than from the prompt alone.\nMust contain between 1 and 40 slides; rejected with `400` in\n`SLIDES` mode.\n",
            "items": {
              "properties": {
                "keyPoints": {
                  "description": "The main ideas this slide must communicate.",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "referenceFileIds": {
                  "description": "Reference image file IDs targeted at this slide. Each id must\nalso appear in `attachments` (from `PUT /r/v0/files/upload`).\n",
                  "items": {
                    "type": "string"
                  },
                  "type": "array"
                },
                "supportingInformation": {
                  "description": "Supporting data, facts, quotes, or context the slide can\ndraw on.\n",
                  "type": "string"
                },
                "title": {
                  "description": "The slide title. Required and must be non-empty.",
                  "type": "string"
                }
              },
              "required": [
                "title"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "templateId": {
            "type": "string"
          },
          "textHandling": {
            "description": "How existing text content should be handled.",
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ],
        "type": "object"
      },
      "CreatePresentationResponse": {
        "properties": {
          "generationMode": {
            "description": "The generation mode the presentation was created with.",
            "enum": [
              "SLIDES",
              "IMAGES"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "pollingUrl": {
            "format": "uri",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "pollingUrl"
        ],
        "type": "object"
      },
      "Error": {
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "required": [
          "message"
        ],
        "type": "object"
      },
      "File": {
        "properties": {
          "contentType": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "urn": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "urn"
        ],
        "type": "object"
      },
      "FileListResponse": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/File"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "Cursor for the next page, or null if there are no more files.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "files",
          "nextCursor"
        ],
        "type": "object"
      },
      "InterruptAgentSessionRequest": {
        "properties": {
          "expectedTurn": {
            "description": "Stop only this turn. Without it, whichever turn is in progress is\nstopped.\n",
            "minimum": 0,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "InterruptAgentSessionResponse": {
        "properties": {
          "sessionId": {
            "type": "string"
          },
          "status": {
            "enum": [
              "INTERRUPTED"
            ],
            "type": "string"
          },
          "turn": {
            "description": "The turn that was stopped.",
            "type": "integer"
          }
        },
        "required": [
          "sessionId",
          "turn",
          "status"
        ],
        "type": "object"
      },
      "PaymentRequiredError": {
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "Presentation": {
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "generationMode": {
            "description": "The generation mode the presentation was created with.",
            "enum": [
              "SLIDES",
              "IMAGES"
            ],
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "images": {
            "description": "Per-slide generated image URLs, in slide order. Only populated for\nimage-mode decks (`null` otherwise). The URLs resolve once the\npresentation reaches `COMPLETED`.\n",
            "items": {
              "format": "uri",
              "type": [
                "string",
                "null"
              ]
            },
            "type": [
              "array",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "slides": {
            "description": "Slide titles.",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "thumbnailUrl": {
            "description": "URL to a thumbnail image of the presentation.",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "URL to the full generated PPTX.",
            "format": "uri",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "status"
        ],
        "type": "object"
      },
      "SendAgentSessionMessageRequest": {
        "properties": {
          "attachments": {
            "description": "Files to attach to the message, as for `POST /r/v0/agent/sessions`.\n",
            "items": {
              "properties": {
                "fileId": {
                  "type": "string"
                }
              },
              "required": [
                "fileId"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "callbackUrl": {
            "description": "HTTPS URL invoked when this turn ends, replacing the session's\ncallback URL. Must be a public HTTPS address (no localhost/private\nIPs).\n",
            "format": "uri",
            "type": "string"
          },
          "expectedTurn": {
            "description": "The session's `turn` the caller last saw. The message is refused\nwith `409 CONVERSATION_ADVANCED` if the session has moved on.\n",
            "minimum": 0,
            "type": "integer"
          },
          "prompt": {
            "description": "The follow-up instruction for the agent.",
            "type": "string"
          }
        },
        "required": [
          "prompt"
        ],
        "type": "object"
      },
      "SendAgentSessionMessageResponse": {
        "properties": {
          "pollingUrl": {
            "description": "URL to poll for session state (the same for every turn).",
            "format": "uri",
            "type": "string"
          },
          "sessionId": {
            "type": "string"
          },
          "turn": {
            "description": "The turn this message started. Poll until the session reports it.",
            "type": "integer"
          }
        },
        "required": [
          "sessionId",
          "turn",
          "pollingUrl"
        ],
        "type": "object"
      },
      "UploadAccepted": {
        "properties": {
          "message": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "uploadId": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "uploadId",
          "message"
        ],
        "type": "object"
      },
      "UploadError": {
        "description": "Error envelope returned by the file-upload endpoint.",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "User": {
        "properties": {
          "email": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "description": "API key issued for your Plus organization, sent as a bearer token.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  }
}
