KidVerseAI: bedtime story for your child
KidVerseAI: bedtime story for your child · GPT-Aktionen
KidVerse AI API
API for submitting stories in KidVerse AI.
POST /api/v1/story-submissionSubmit a storyEndpoint for submitting stories along with user details.
Ursprüngliches API-Schema
{
"openapi": "3.1.0",
"info": {
"title": "KidVerse AI API",
"description": "API for submitting stories in KidVerse AI.",
"version": "v1.0.0"
},
"servers": [
{
"url": "https://api.kidverseai.com"
}
],
"paths": {
"/api/v1/story-submission": {
"post": {
"operationId": "submitStory",
"summary": "Submit a story",
"description": "Endpoint for submitting stories along with user details.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StorySubmission"
}
}
}
},
"responses": {
"201": {
"description": "Story successfully submitted",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SuccessfulResponse"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"StorySubmission": {
"type": "object",
"properties": {
"code": {
"type": "string",
"pattern": "^[A-Z][A-Z0-9]{5}$",
"example": "G68BCYSM"
},
"story": {
"$ref": "#/components/schemas/Story"
},
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"code",
"story",
"user"
]
},
"Story": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"topic": {
"type": "string"
},
"text": {
"type": "string"
},
"child_age": {
"type": "integer",
"description": "Age of the child in years",
"example": 8
},
"child_name": {
"type": "string"
}
},
"required": [
"type",
"topic",
"text",
"child_age",
"child_name"
]
},
"User": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email"
}
},
"required": [
"name",
"email"
]
},
"SuccessfulResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"code": {
"type": "string"
}
}
},
"ValidationError": {
"type": "object",
"properties": {
"detail": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
}
}
}
},
"ErrorDetail": {
"type": "object",
"properties": {
"loc": {
"type": "array",
"items": {
"type": "string"
}
},
"msg": {
"type": "string"
},
"type": {
"type": "string"
}
}
}
}
}
}