MyQuizGPT
MyQuizGPT · GPT-Aktionen
MyQuizGPT Actions
Create quizzes or flashcards and return a practice link.
POST /api/createCreate a quiz or flashcard set and return a practice link.
Ursprüngliches API-Schema
{
"openapi": "3.1.1",
"info": {
"title": "MyQuizGPT Actions",
"version": "1.0.0",
"description": "Create quizzes or flashcards and return a practice link."
},
"servers": [
{
"url": "https://myquizgpt.com"
}
],
"paths": {
"/api/create": {
"post": {
"operationId": "createStudyAsset",
"summary": "Create a quiz or flashcard set and return a practice link.",
"security": [
{
"ApiKeyAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatePayload"
},
"examples": {
"quiz": {
"summary": "Quiz Example",
"value": {
"set_type": "quiz",
"title": "Basic English Grammar Quiz",
"data": [
{
"question": "Which sentence is grammatically correct?",
"options": [
"She go to school every day.",
"She goes to school every day.",
"She going to school every day.",
"She gone to school every day."
],
"correct_answer": "She goes to school every day."
}
]
}
},
"flashcard": {
"summary": "Flashcard Example",
"value": {
"set_type": "flashcard",
"title": "French Basics",
"data": [
{
"front": "Hello",
"back": "Bonjour"
},
{
"front": "Thank you",
"back": "Merci"
},
{
"front": "Goodbye",
"back": "Au revoir"
}
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "Created successfully",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateResponse"
}
}
}
},
"400": {
"description": "Bad request"
},
"401": {
"description": "Unauthorized"
},
"500": {
"description": "Server error"
}
}
}
}
},
"components": {
"schemas": {
"CreatePayload": {
"type": "object",
"required": [
"set_type",
"title",
"data"
],
"properties": {
"set_type": {
"type": "string",
"enum": [
"quiz",
"flashcard"
],
"description": "Determines whether the set is a quiz or flashcard."
},
"title": {
"type": "string",
"description": "Short descriptive title of the quiz or flashcard set."
},
"data": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/QuizItem"
},
{
"$ref": "#/components/schemas/FlashcardItem"
}
]
},
"description": "Array of quiz questions or flashcards depending on set_type."
}
}
},
"QuizItem": {
"type": "object",
"required": [
"question",
"options",
"correct_answer"
],
"properties": {
"question": {
"type": "string",
"description": "The question text."
},
"options": {
"type": "array",
"minItems": 2,
"items": {
"type": "string"
},
"description": "The list of multiple-choice options."
},
"correct_answer": {
"type": "string",
"description": "The correct answer, which must be one of the options."
}
},
"example": {
"question": "Which sentence is grammatically correct?",
"options": [
"She go to school every day.",
"She goes to school every day.",
"She going to school every day.",
"She gone to school every day."
],
"correct_answer": "She goes to school every day."
}
},
"FlashcardItem": {
"type": "object",
"required": [
"front",
"back"
],
"properties": {
"front": {
"type": "string",
"description": "Front text of the flashcard."
},
"back": {
"type": "string",
"description": "Back text of the flashcard (answer or translation)."
}
},
"example": {
"front": "Hello",
"back": "Bonjour"
}
},
"CreateResponse": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"description": "Indicates if the creation was successful."
},
"public_id": {
"type": "string",
"description": "Unique identifier for the created study set."
},
"set_type": {
"type": "string",
"enum": [
"quiz",
"flashcard"
],
"description": "The type created."
},
"url": {
"type": "string",
"format": "uri",
"description": "Practice/review URL for the set."
}
}
}
},
"securitySchemes": {
"ApiKeyAuth": {
"type": "apiKey",
"in": "header",
"name": "X-API-Key",
"description": "Custom API key header for MyQuizGPT."
}
}
}
}