Knowfun.io API Skill
This skill helps you interact with the Knowfun.io OpenAPI to generate educational content, posters, games, and films.
Prerequisites
Before using this skill, you need:
- A Knowfun.io API Key (get it from https://www.knowfun.io/api-platform)
- Sufficient credits in your account
Configuration
Set your API key as an environment variable:
export KNOWFUN_API_KEY="kf_your_api_key_here"
Or the skill will prompt you for it when needed.
Available Commands
When invoked, this skill supports the following operations:
1. Create a Task
Generate content by creating a task. Supports four types: course, poster, game, film.
Basic Example:
/knowfun create course "Introduction to Machine Learning"
/knowfun create poster "Climate Change Facts"
/knowfun create game "Learn Python Basics"
/knowfun create film "History of the Internet"
With URL:
/knowfun create course https://example.com/document.pdf
2. Check Task Status
Check the status of a task by its ID:
/knowfun status <taskId>
3. Get Task Details
Get detailed information about a completed task:
/knowfun detail <taskId>
4. List Tasks
List recent tasks:
/knowfun list
5. Check Credits
Check your credit balance:
/knowfun credits
6. Get Schema
Get available configuration options for each task type:
/knowfun schema
Task Configuration
Each task type has specific configuration options. See api-reference.md for complete details.
Course Configuration
- contentStyle: detailed, concise, conversational
- contentLanguage: zh, en, etc.
- explainLanguage: zh, en, etc.
- voiceType: standard voice options
- ttsStyle: classroom, professional, etc.
Poster Configuration
- usage: infographic (default), businessReports, marketing, illustration
- style: handDrawn (default), photorealistic, anime, sciFi, custom
- aspectRatio: 1:1, 16:9, 9:16, etc.
- posterTitle: Custom title for the poster
Game Configuration
- gameType: story, interactive (default), explore, mission, roleplay, simulation, puzzle, arcade, card, word, timeline, custom
- customPrompt: Custom game description
Film Configuration
- filmStyle: narration (default), story, documentary, tutorial, concept_explainer, case_study, animation, cinematic, promotional, custom
- aspectRatio: 16:9 (default), 9:16, 1:1
- visualStyle: Custom visual style description
How This Skill Works
- Extract API Key: First checks if KNOWFUN_API_KEY environment variable is set
- Parse Command: Interprets the command (create, status, list, credits, schema)
- Make API Request: Uses curl to interact with the Knowfun.io API
- Format Response: Presents results in a readable format
- Handle Errors: Provides helpful error messages and troubleshooting tips
API Endpoints
The skill uses the following base URL:
- Production:
https://api.knowfun.io
Examples
See examples.md for comprehensive usage examples.
Error Handling
Common errors and solutions:
- 401 Unauthorized: Check your API key is correct and not expired
- 402 Insufficient Credits: Top up your account at https://knowfun.io
- 429 Rate Limit: Wait a moment and try again
- 400 Bad Request: Check your input parameters
Reference Documentation
For complete API documentation, see api-reference.md.
Implementation Details
When this skill is invoked, Claude will:
- Verify the API key is available
- Parse the command and arguments from
$ARGUMENTS
- Construct appropriate curl commands to call the Knowfun.io API
- Handle authentication headers
- Parse JSON responses
- Format results for display
- Provide actionable next steps
The skill uses curl for API requests and jq for JSON parsing when available.
1---2name: knowfun3description: Generate educational content using Knowfun.io API - create courses, posters, games, and films with AI. Use when user wants to generate educational content, visual materials, or interactive experiences.4---56# Knowfun.io API Skill78This skill helps you interact with the Knowfun.io OpenAPI to generate educational content, posters, games, and films.910## Prerequisites1112Before using this skill, you need:131. A Knowfun.io API Key (get it from https://www.knowfun.io/api-platform)142. Sufficient credits in your account1516## Configuration1718Set your API key as an environment variable:19```bash20export KNOWFUN_API_KEY="kf_your_api_key_here"21```2223Or the skill will prompt you for it when needed.2425## Available Commands2627When invoked, this skill supports the following operations:2829### 1. Create a Task3031Generate content by creating a task. Supports four types: `course`, `poster`, `game`, `film`.3233**Basic Example:**34```bash35/knowfun create course "Introduction to Machine Learning"36/knowfun create poster "Climate Change Facts"37/knowfun create game "Learn Python Basics"38/knowfun create film "History of the Internet"39```4041**With URL:**42```bash43/knowfun create course https://example.com/document.pdf44```4546### 2. Check Task Status4748Check the status of a task by its ID:49```bash50/knowfun status <taskId>51```5253### 3. Get Task Details5455Get detailed information about a completed task:56```bash57/knowfun detail <taskId>58```5960### 4. List Tasks6162List recent tasks:63```bash64/knowfun list65```6667### 5. Check Credits6869Check your credit balance:70```bash71/knowfun credits72```7374### 6. Get Schema7576Get available configuration options for each task type:77```bash78/knowfun schema79```8081## Task Configuration8283Each task type has specific configuration options. See [api-reference.md](api-reference.md) for complete details.8485### Course Configuration86- **contentStyle**: detailed, concise, conversational87- **contentLanguage**: zh, en, etc.88- **explainLanguage**: zh, en, etc.89- **voiceType**: standard voice options90- **ttsStyle**: classroom, professional, etc.9192### Poster Configuration93- **usage**: infographic (default), businessReports, marketing, illustration94- **style**: handDrawn (default), photorealistic, anime, sciFi, custom95- **aspectRatio**: 1:1, 16:9, 9:16, etc.96- **posterTitle**: Custom title for the poster9798### Game Configuration99- **gameType**: story, interactive (default), explore, mission, roleplay, simulation, puzzle, arcade, card, word, timeline, custom100- **customPrompt**: Custom game description101102### Film Configuration103- **filmStyle**: narration (default), story, documentary, tutorial, concept_explainer, case_study, animation, cinematic, promotional, custom104- **aspectRatio**: 16:9 (default), 9:16, 1:1105- **visualStyle**: Custom visual style description106107## How This Skill Works1081091. **Extract API Key**: First checks if KNOWFUN_API_KEY environment variable is set1102. **Parse Command**: Interprets the command (create, status, list, credits, schema)1113. **Make API Request**: Uses curl to interact with the Knowfun.io API1124. **Format Response**: Presents results in a readable format1135. **Handle Errors**: Provides helpful error messages and troubleshooting tips114115## API Endpoints116117The skill uses the following base URL:118- Production: `https://api.knowfun.io`119120## Examples121122See [examples.md](examples.md) for comprehensive usage examples.123124## Error Handling125126Common errors and solutions:127128- **401 Unauthorized**: Check your API key is correct and not expired129- **402 Insufficient Credits**: Top up your account at https://knowfun.io130- **429 Rate Limit**: Wait a moment and try again131- **400 Bad Request**: Check your input parameters132133## Reference Documentation134135For complete API documentation, see [api-reference.md](api-reference.md).136137## Implementation Details138139When this skill is invoked, Claude will:1401411. Verify the API key is available1422. Parse the command and arguments from `$ARGUMENTS`1433. Construct appropriate curl commands to call the Knowfun.io API1444. Handle authentication headers1455. Parse JSON responses1466. Format results for display1477. Provide actionable next steps148149The skill uses `curl` for API requests and `jq` for JSON parsing when available.