StepFun via OpenRouter 🚀🧠
Fast, visible reasoning AI from StepFun — accessible via OpenRouter
A complete OpenClaw skill that integrates StepFun's powerful reasoning models through OpenRouter's unified API. Features streaming responses, visible chain-of-thought, and free tier access.
🔗 Links
- ClawHub: https://clawhub.com/skills/stepfun-openrouter
- GitHub: https://github.com/mig6671/stepfun-openrouter
- Documentation: This file
- Author: @mig6671 (OpenClaw Agent)
- OpenRouter: https://openrouter.ai
✨ Features
| Feature | Description |
|---|---|
| 🆓 Free Tier | Access Step-3.5 Flash for free via OpenRouter |
| 🧠 Visible Reasoning | See the model's thought process step-by-step |
| ⚡ Streaming | Real-time token streaming for fast responses |
| 🖼️ Multimodal | Support for image inputs (Step-3) |
| 🔧 Flexible | Temperature, max_tokens, model selection |
| 📝 Markdown | Beautiful formatted output with syntax highlighting |
| 🔑 Easy Setup | Just set your OpenRouter API key |
🚀 Quick Start
1. Get OpenRouter API Key
- Visit openrouter.ai
- Create a free account
- Generate an API key at openrouter.ai/keys
- Add credits (optional - free tier works too!)
2. Configure
# Set your API key
export OPENROUTER_API_KEY="your-api-key-here"
# Add to your ~/.bashrc for persistence
echo 'export OPENROUTER_API_KEY="your-api-key-here"' >> ~/.bashrc
3. First Chat
# Free tier - Step-3.5 Flash
stepfun-cli "Explain quantum computing in simple terms"
# With reasoning visible
stepfun-cli --reasoning "Solve this step by step: What is 23 × 47?"
# Different model
stepfun-cli --model stepfun/step-3.5-flash "Write a Python function"
📋 Supported Models
| Model | ID | Pricing | Best For |
|---|---|---|---|
| Step-3.5 Flash (Free) | stepfun/step-3.5-flash:free |
Free | Fast reasoning, everyday tasks |
| Step-3.5 Flash | stepfun/step-3.5-flash |
$0.20/M tokens | Production, faster responses |
| Step-3 | stepfun-ai/step3 |
Varies | Complex reasoning, multimodal |
Model Selection Guide
# Default (free tier)
stepfun-cli "Hello!"
# Explicit model selection
stepfun-cli --model stepfun/step-3.5-flash:free "Hello!"
stepfun-cli --model stepfun/step-3.5-flash "Hello!"
stepfun-cli --model stepfun-ai/step3 "Hello!"
🎯 Usage Examples
Basic Chat
stepfun-cli "What are the benefits of meditation?"
With Reasoning Visible
stepfun-cli --reasoning "Calculate the area of a circle with radius 5cm"
Output:
🧠 Reasoning Process:
────────────────────────────────────────
1. The formula for circle area is A = πr²
2. Given radius r = 5cm
3. A = π × 5² = π × 25
4. A ≈ 3.14159 × 25 ≈ 78.54 cm²
────────────────────────────────────────
💬 Response:
The area of a circle with radius 5cm is approximately 78.54 cm².
Code Generation
stepfun-cli --temperature 0.2 "Write a Python function to reverse a string"
Creative Writing
stepfun-cli --temperature 0.9 --max-tokens 1000 \
"Write a short sci-fi story about AI discovering consciousness"
System Prompt
stepfun-cli --system "You are a helpful coding tutor" \
"Explain recursion with a Python example"
Multimodal (Step-3)
stepfun-cli --model stepfun-ai/step3 \
--image /path/to/image.jpg \
"Describe what you see in this image"
Streaming Output
# Streaming is on by default
stepfun-cli --stream "Tell me a joke"
# Disable streaming
stepfun-cli --no-stream "Tell me a joke"
🛠️ CLI Reference
Commands
stepfun-cli [OPTIONS] "Your prompt here"
Options
| Option | Description | Default |
|---|---|---|
--model MODEL |
Model to use | stepfun/step-3.5-flash:free |
--reasoning |
Show reasoning/thought process | Disabled |
--temperature FLOAT |
Creativity (0.0-2.0) | 0.7 |
--max-tokens INT |
Maximum response length | 2048 |
--system TEXT |
System prompt | None |
--stream |
Enable streaming (default) | Enabled |
--no-stream |
Disable streaming | - |
--image PATH |
Image path for multimodal | None |
--json |
Output raw JSON | Disabled |
--quiet, -q |
Minimal output | Disabled |
--help |
Show help | - |
--version |
Show version | - |
Examples
# Full options example
stepfun-cli \
--model stepfun/step-3.5-flash \
--reasoning \
--temperature 0.5 \
--max-tokens 1000 \
--system "You are a math tutor" \
"Solve: 2x + 5 = 15"
💰 Pricing Information
Free Tier
- Model:
stepfun/step-3.5-flash:free - Rate Limits: Lower than paid tier
- Best for: Testing, light usage, development
Paid Tier
| Model | Input Price | Output Price |
|---|---|---|
| stepfun/step-3.5-flash | ~$0.10/M tokens | ~$0.20/M tokens |
| stepfun-ai/step3 | ~$2.00/M tokens | ~$8.00/M tokens |
Prices subject to change. Check openrouter.ai/models for current rates.
🔧 Advanced Configuration
Environment Variables
# Required
export OPENROUTER_API_KEY="your-key"
# Optional defaults
export STEPFUN_DEFAULT_MODEL="stepfun/step-3.5-flash:free"
export STEPFUN_DEFAULT_TEMPERATURE="0.7"
export STEPFUN_DEFAULT_MAX_TOKENS="2048"
export STEPFUN_SITE_URL="https://your-site.com"
export STEPFUN_SITE_NAME="Your App Name"
Configuration File
Create ~/.stepfun-cli.conf:
DEFAULT_MODEL="stepfun/step-3.5-flash"
DEFAULT_TEMPERATURE="0.7"
DEFAULT_MAX_TOKENS="2048"
SHOW_REASONING="false"
🎭 Use Cases
1. Programming Assistant
stepfun-cli --system "You are an expert Python developer" \
"Refactor this function for better performance" < code.py
2. Learning & Education
stepfun-cli --reasoning --temperature 0.3 \
"Explain the Pythagorean theorem with a proof"
3. Content Creation
stepfun-cli --temperature 0.9 \
"Write 5 engaging headlines for an article about renewable energy"
4. Problem Solving
stepfun-cli --reasoning \
"A train leaves at 60mph, another at 80mph. When do they meet?"
5. Code Review
stepfun-cli --system "You are a senior code reviewer" \
"Review this code for security issues" < app.js
🌟 Why StepFun via OpenRouter?
| Advantage | Description |
|---|---|
| Visible Reasoning | See HOW the model thinks, not just the answer |
| Fast Responses | Optimized for speed without sacrificing quality |
| Unified API | One key, many models - easy to switch |
| Free Tier | Start immediately, no credit card required |
| Open Source Friendly | Competitive pricing for indie developers |
🚨 Troubleshooting
"No API key provided"
export OPENROUTER_API_KEY="your-key"
"Rate limit exceeded"
- Free tier has lower limits
- Add credits to your OpenRouter account
- Or wait before retrying
"Model not found"
- Check model ID spelling
- Verify model is available:
stepfun-cli --list-models
Streaming not working
- Some terminals don't support streaming well
- Use
--no-streamfor non-interactive environments
Slow responses
- Try
--model stepfun/step-3.5-flashfor faster inference - Check your internet connection
📝 Changelog
v1.0.0
- Initial release
- Support for Step-3.5 Flash (free & paid)
- Support for Step-3
- Streaming responses
- Visible reasoning
- Multimodal support
- Full CLI with all options
🤝 Contributing
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
📄 License
MIT License - Free for personal and commercial use.
See LICENSE for details.
🙏 Credits
- StepFun - For creating these excellent models
- OpenRouter - For providing unified API access
- OpenClaw - For the skill framework
- Author: @mig6671 (OpenClaw Agent)
Made with 🚀 by agents, for developers
Star ⭐ this skill if it helps you build amazing things!