Agent tools natively handle only text generation protocols. Image generation, video generation, speech synthesis, speech recognition, real-time voice conversation, and decision models must be integrated through Slash Commands, Skills, or Agents.
Why extension is required
Agent tools such as Claude Code, Codex, OpenCode, and Qwen Code natively handle only text generation protocols (OpenAI-compatible or Anthropic-compatible). Image generation, video generation, speech synthesis, speech recognition, real-time voice conversation, and decision models in Token Plan are outside these protocols and require tools to call their respective APIs through Slash Commands, Skills, or Agents.
Endpoint overview
| Capability | Endpoint |
|---|---|
| Decision model | https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/systemone |
| Image generation | https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation |
| Video generation (submit) | https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis |
| Video generation (query) | https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/tasks/{task_id} |
| Speech synthesis | https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/SpeechSynthesizer |
| Speech recognition | https://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation |
| Real-time voice conversation | wss://token-plan.cn-beijing.maas.aliyuncs.com/api-ws/v1/realtime?model=qwen-audio-3.0-realtime-plus |
Quick access
Choose the document for the capability you want to integrate. Configuration steps are in each document.
Integrate the decision model
Synchronous, structured responses
Integrate an image generation model
Synchronous
Integrate a video generation model
Asynchronous task
Integrate a speech synthesis model
Synchronous
Integrate a speech recognition model
Synchronous
Integrate the real-time voice conversation model
WebSocket
Prerequisites
- A Token Plan subscription. For Personal Edition, get an API key starting with
sk-sp-from My Subscriptions (Personal Edition). For Team Edition, assign a seat in Member Management and then get the API key. - Your tool supports one of the extension mechanisms listed under Tool configuration paths.
Tool configuration paths
The table uses image generation as an example. For other capabilities, replace text-to-image with the corresponding command name and token-plan-image with the corresponding Skill name.
| Tool | Extension mechanism | Configuration file path |
|---|---|---|
| Claude Code | Slash Command | .claude/commands/text-to-image.md |
| Codex | Skill | ~/.codex/skills/token-plan-image/SKILL.md |
| Qwen Code | Skill | ~/.qwen/skills/text-to-image/SKILL.md |
| OpenCode | Agent | .opencode/agents/text-to-image.md |
| OpenClaw | Skill | ~/.openclaw/workspace/skills/token-plan-image/SKILL.md |
| Hermes Agent | Skill | ~/.hermes/skills/media/text-to-image/SKILL.md |
| Qoder | Skill | ~/.qoder/skills/text-to-image/SKILL.md |
Configuration example
Skill-based tools (Codex, Qwen Code, OpenClaw, Hermes Agent, and Qoder) require YAML front matter at the beginning of the configuration file, with at least name and description fields. OpenCode Agents use description, mode, and tools. For a complete example, see the front matter description in Integrate the decision model.
Billing and security
- Billing differs by capability. Actual Credits consumption is shown in the console usage statistics.
- Use the API key only in tool configuration or environment variables. Do not write it into command files, code repositories, or logs.
- Generated URLs expire. Download results promptly.