Check process
Python Example
# check_page_status.py
import os
import requests
BASE = "https://api.mangaka.app/v1/api"
API_KEY = os.getenv("MANGAKA_API_KEY", "YOUR_API_KEY")
HEADERS = {"x-api-key": API_KEY}
STORY_ID = "STORY_ID"
CHAPTER_ID = 3151
TASK_TYPE = "page_generation" # Valid: 'page_generation' | 'character_generation'
def check_status(story_id: str, chapter_id: int, task_type: str):
"""
Check progress and status of page generation.
Endpoint: GET /v1/api/stories/{story_id}/chapters/{chapter_id}/status?task_type=page_generation
"""
url = f"{BASE}/stories/{story_id}/chapters/{chapter_id}/status"
params = {"task_type": task_type}
response = requests.get(url, headers=HEADERS, params=params, timeout=60)
response.raise_for_status()
data = response.json()
print(data)
# data['data'] includes: progress, status, message, task_id, task_type
if __name__ == "__main__":
check_status(STORY_ID, CHAPTER_ID, TASK_TYPE)
Last updated