Skip to main content

Integration overview

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

CapabilityEndpoint
Decision modelhttps://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1/systemone
Image generationhttps://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 synthesishttps://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/audio/tts/SpeechSynthesizer
Speech recognitionhttps://token-plan.cn-beijing.maas.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
Real-time voice conversationwss://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.

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.
ToolExtension mechanismConfiguration file path
Claude CodeSlash Command.claude/commands/text-to-image.md
CodexSkill~/.codex/skills/token-plan-image/SKILL.md
Qwen CodeSkill~/.qwen/skills/text-to-image/SKILL.md
OpenCodeAgent.opencode/agents/text-to-image.md
OpenClawSkill~/.openclaw/workspace/skills/token-plan-image/SKILL.md
Hermes AgentSkill~/.hermes/skills/media/text-to-image/SKILL.md
QoderSkill~/.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.