Image generation, video generation, and speech synthesis models in Token Plan must be integrated through each tool's extension mechanism (Skill, Slash Command, or Agent).
Example: Integrate an image generation model in Claude Code
This example shows how to integrate an image generation model in Claude Code using a Slash Command. The process is similar for other tools, with differences in extension mechanism and configuration file path.
Step 1: Create a Slash Command
Set the plan-specific API Key (prefixed with sk-sp-) as the environment variable $ANTHROPIC_AUTH_TOKEN for curl authentication in subsequent steps.
Create the file .claude/commands/text-to-image.md in your project root directory with the following content:
Step 2: Generate an image
In Claude Code, type /text-to-image draw a cat. To use an image generation model other than the default, include the model name in the command, for example /text-to-image draw a cat using wan2.7-image.
Example: Integrate a video generation model in Claude Code
This example shows how to integrate a video generation model in Claude Code using a Slash Command. Video generation uses an asynchronous API with the workflow: submit task, poll status, and download video.
Step 1: Create a Slash Command
Set the plan-specific API Key (prefixed with sk-sp-) as the environment variable $ANTHROPIC_AUTH_TOKEN for curl authentication in subsequent steps.
Create the file .claude/commands/text-to-video.md in your project root directory with the following content:
Step 2: Generate a video
In Claude Code, type /text-to-video a white cat sunbathing on a balcony. To use a different video generation model, include the model name in the command, for example /text-to-video generate a video of a cat jumping using happyhorse-1.1-r2v.
Example: Integrate a speech synthesis model in Claude Code
This example shows how to integrate a speech synthesis model in Claude Code using a Slash Command. Speech synthesis uses a synchronous API and supports both non-streaming and streaming modes.
Step 1: Create a Slash Command
Set the plan-specific API Key (prefixed with sk-sp-) as the environment variable $ANTHROPIC_AUTH_TOKEN for curl authentication in subsequent steps.
Create the file .claude/commands/text-to-speech.md in your project root directory with the following content:
Step 2: Synthesize speech
In Claude Code, type /text-to-speech Hello, welcome to Model Studio.
Other tools
The following table lists the extension mechanism and configuration file path for mainstream AI coding tools that support extensions. Save the same content from the Claude Code example above to the corresponding path.
Tool | Extension mechanism | Configuration file path |
|---|---|---|
Claude Code | Slash Command |
|
Codex | Skill |
|
Qwen Code | Skill |
|
OpenCode | Agent |
|
OpenClaw | Skill |
|
Hermes Agent | Skill |
|
Qoder | Skill |
|
Skill-based tools (Codex, Qwen Code, OpenClaw, Hermes Agent, Qoder) require YAML front matter at the beginning of the configuration file: