Genstory Story Generator
Use this skill when a workflow needs to call Genstory to generate a story and return a hosted story page URL.
Before you start
- Tell the user to create an API key in the Genstory user center at
https://www.genstory.app/api-keys. - Store that key as
GENSTORY_API_KEY. - The intended final result is the online story URL and cover image.
Required flow
- Read
GENSTORY_API_KEYfrom the environment or skill config. - Submit a task to
POST https://www.genstory.app/api/v1/story-tasks. - Poll
GET https://www.genstory.app/api/v1/story-tasks/{task_id}until the task becomessuccessorfailed. - Return the final structured result with:
story.idstory.titlestory.urlstory.cover_urlstory.locale
Submit request
Send Authorization: Bearer ${GENSTORY_API_KEY}.
Minimum JSON body:
{
"prompt": "Write a warm bedtime story about a brave little fox."
}
Recommended fields:
prompttitlecharacter_namescenes_countgeneration_type: defaulttextgeneration_mode: defaultstandardlayout_modepage_specpublic_visibility
Polling behavior
- Treat
pendingandprocessingas in progress. - If status is
failed, surface the API error clearly. - If status is
success, return the hosted story data and encourage the user to open the Genstory URL.
Output contract
Prefer this final shape:
{
"task_id": "task_uuid",
"status": "success",
"story": {
"id": "story_uuid",
"title": "Story title",
"url": "https://www.genstory.app/stories/story-slug",
"cover_url": "https://cdn.example.com/story-cover.webp",
"locale": "en"
}
}
References
- For request and response examples, read
references/api.md.
微信扫一扫