Presentation GPT by SlideSpeak
Presentation GPT by SlideSpeak · GPT Actions
FastAPI
POST /presentation/generate-from-gptCreate a new presentation directly with content as json.Create a new presentation by directly providing the content as json.
原始 API 定义
{
"components": {
"schemas": {
"GenerateFromGptRequest": {
"properties": {
"presentationTitle": {
"type": "string",
"description": "Title of the presentation"
},
"presentationSubtitle": {
"type": "string",
"description": "Subtitle of the presentation"
},
"imageDescription": {
"description": "Exactly 2 word search term to search for an image that represents the presentation title",
"type": "string",
"nullable": true
},
"fetchMissingImages": {
"description": "Always true to fetch images",
"type": "boolean"
},
"slides": {
"description": "List of slides for the presentation.",
"items": {
"$ref": "#/components/schemas/PowerPointPresentationSlide"
},
"title": "Slides",
"type": "array"
}
},
"required": [
"presentationTitle",
"presentationSubtitle",
"slides",
"fetchMissingImages"
],
"title": "GenerateFromGptRequest",
"type": "object"
},
"PowerPointPresentationSlide": {
"properties": {
"layout": {
"type": "string",
"enum": [
"items",
"comparison",
"summary",
"steps",
"milestone",
"pyramid",
"timeline",
"funnel",
"cycle"
],
"description": "The layout type for the slide: 'items' for general content (1-5 items), 'comparison' for comparing two concepts (exactly 2 items), 'summary' for key points (1-5 items), 'steps' for processes (3-5 items), 'milestone' for key dates (3-5 items), 'pyramid' for hierarchical levels (1-5 items), 'timeline' for chronological events (3-5 items), 'funnel' for filtering processes (3-5 items), 'cycle' for cyclical processes (3-5 items). Choose the most appropriate layout based on the content and ensure the correct number of items."
},
"imageDescription": {
"type": "string",
"nullable": true,
"description": "2-word description to be used to search a stock photo for the slide."
},
"items": {
"description": "List of content items for the slide. Must match layout constraints: items (1-5), comparison (exactly 2), summary (1-5), steps (3-5), milestone (3-5), pyramid (1-5), timeline (3-5), funnel (3-5), cycle (3-5).",
"type": "array",
"items": {
"type": "object",
"properties": {
"headline": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"headline",
"content"
],
"description": "Data for a content element containing headline and content."
}
},
"slideTitle": {
"description": "The title of the slide.",
"title": "Title of Slide",
"type": "string"
}
},
"required": [
"slideTitle",
"items",
"layout"
],
"title": "PowerPointPresentationSlide",
"type": "object"
}
}
},
"info": {
"title": "FastAPI",
"version": "0.1.0"
},
"openapi": "3.1.0",
"paths": {
"/presentation/generate-from-gpt": {
"post": {
"description": "Create a new presentation by directly providing the content as json.",
"operationId": "generate_presentation_from_gpt",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateFromGptRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
},
"summary": "Create a new presentation directly with content as json."
}
}
},
"servers": [
{
"url": "https://api.slidespeak.co"
}
]
}