Skip to content

302ai/302ai-cli-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cli skill readme首图

302.AI CLI Skill


English | δΈ­ζ–‡ζ–‡ζ‘£

πŸš€ Empower your AI assistant with multimodal generation capabilities - A powerful AI coding assistant skill that enables image, video, speech, sound effect, 3D model, music/song generation, and web search through the 302ai command-line tool, powered by 302.AI Official Website.

πŸ’‘ Cross-Tool Compatible - This Skill uses the standard SKILL.md format, supporting Claude Code, Cursor, and other compatible AI coding tools


πŸš€ Quick Start

Tell your Agent:

Install this skill: https://github.com/302ai/302ai-cli-skill

✨ What is This?

A powerful AI coding skill that lets your AI assistant understand natural language requests like "generate a watercolor image of a cat" and automatically translate them into the correct 302ai CLI commands β€” sending requests to 302.AI's cloud services and returning results to you.


🎯 Core Features

  • 🎨 Multimodal generation β€” Images, videos, speech, sound effects, 3D models, and music
  • πŸ” Web search β€” Multiple search providers (Tavily, Bocha, Exa, Metaso)
  • πŸ€– Intelligent command translation β€” Automatically convert natural language into CLI commands
  • ⚑ Async and sync modes β€” Flexible workflows for different scenarios
  • 🌐 1400+ AI models β€” Access to 302.AI's comprehensive model ecosystem
  • πŸ› οΈ Model management β€” Easily list, set defaults, and query parameters

πŸ“¦ What's Included?

Modules Overview

Module Description Mode Output Format
🎨 Image Text-to-image / Image-to-image Async (recommended) or Sync PNG / WEBP / JPG URL
🎬 Video Text-to-video / Image-to-video Async only MP4 URL
πŸ—£οΈ TTS Text-to-speech Async MP3 / WAV URL
πŸ“ STT Speech-to-text (transcription) Sync JSON text
πŸ”Š SFX Text-to-sound-effect Async MP3 URL
🧊 3D Text-to-3D / Image-to-3D Async GLB file URL
🎡 Music AI music/song generation + lyric writing Async (Suno) or Sync (Minimax/ElevenLabs) MP3 URL
πŸ” Search Web search (multiple providers) Sync JSON results

🎯 Supported Models per Module

Module Supported Models
🎨 Image nano-banana-2 β€’ gpt-image-2 β€’ doubao-seedream-5-0-260128 β€’ nano-banana-pro β€’ nano-banana β€’ gpt-image-1.5 β€’ wan2.7-image β€’ wan2.7-image-pro
🎬 Video happyhorse-1.0 β€’ kling-o3 β€’ doubao-seedance-2-0-260128 β€’ wan2.7 β€’ official-kling-v3 β€’ runway-gen4 β€’ minimaxi-hailuo-02 β€’ google-veo3.1 β€’ google-veo3.1-pro β€’ minimaxi-hailuo-2.3 β€’ viduq3-pro
πŸ—£οΈ TTS tts-1-hd β€’ qwen-tts-latest β€’ glm-tts β€’ doubao-tts β€’ speech-02-hd β€’ speech-1.6 β€’ dubbingx-tts β€’ eleven_multilingual_v2 β€’ gemini-2.5-flash-preview-ttsβ€’ mureka-tts and 32 more models
πŸ“ STT whisper-1 β€’ gpt-4o-transcribe β€’ gpt-4o-mini-transcribe β€’ gpt-4o-transcribe-diarize β€’ recognize β€’ scribe_v1_experimental β€’ scribe_v1 β€’ sensevoice
πŸ”Š SFX kling-sfx
🧊 3D hyper3d-rodin
🎡 Music suno-v5 (fenix/crow/bluejay/auk) β€’ suno-v4 β€’ suno-v3.5 β€’ minimax-music-2.5+ β€’ minimax-music-2.5 β€’ minimax-music-2.0 β€’ minimax-music-1.5 β€’ elevenlabs-music-v1
πŸ” Search tavily β€’ search1_search β€’ search1_news β€’ bocha β€’ exa β€’ firecrawl β€’ metaso β€’ unifuncs β€’ perplexity

πŸ’‘ Tips:

  • The models above are listed for reference. For exact model IDs to use in commands, run 302ai model list <type>
  • Speed, quality, and price vary across models β€” choose based on your actual needs. For pricing, visit the official website

πŸ’‘ Usage Examples

Example 1: Generate an Image

You ask:

Generate a watercolor painting of a sunset over mountains

Your AI assistant executes:

# Async mode (recommended) β€” avoids timeout
302ai image create --prompt "watercolor painting of a sunset over mountains" --model flux-1.1-pro
302ai image fetch <taskid> --short

Result: Returns a URL to the generated image

Example 2: Create a Video

You ask:

Make a video of a cat playing with yarn

Your AI assistant executes:

# Video generation takes 1–5 minutes, async only
302ai video create --prompt "a cat playing with yarn" --model kling-v1.6-standard
302ai video fetch <taskid> --short

Result: Returns a URL to the generated video

Example 3: Text-to-Speech

You ask:

Read this text aloud in a female voice: "Welcome to 302.AI"

Your AI assistant executes:

# First-time TTS setup requires cache refresh
302ai tts refresh

# Then create the speech task
302ai tts create --text "Welcome to 302.AI" --provider openai --voice alloy --model tts-1
302ai tts fetch <taskid> --short

Result: Returns a URL to the audio file

⚠️ Important: The TTS module requires running 302ai tts refresh before first use to cache the provider and voice list.

Example 4: Web Search

You ask:

Search for the latest news on AI developments

Your AI assistant executes:

# Default provider is Tavily (best for English content)
302ai search run --query "latest AI developments" --provider tavily

Result: Returns JSON-formatted search results

πŸ’‘ Search tips:

  • Default provider: tavily (best for English content)
  • Chinese content: Use --provider bocha for better results
  • Academic search: Use --provider metaso --category scholar or --provider exa --category "research paper"

Example 5: Generate a 3D Model

You ask:

Create a 3D model of a coffee mug

Your AI assistant executes:

# 3D model generation takes 1–5 minutes
302ai 3d create --prompt "a coffee mug" --model hyper3d-rodin
302ai 3d fetch <taskid> --short

Result: Returns a URL to the .glb file

πŸ“¦ 3D file viewing: The .glb format can be opened with Blender (free), Three.js online viewer, or any 3D model viewer supporting the glTF format.

Example 6: Generate a Song (Suno β€” Async)

You ask:

Create a song about summer vacation

Your AI assistant executes:

# Suno generates 2 songs per task, takes 1–3 minutes
302ai song create --prompt "a cheerful song about summer vacation at the beach" --provider suno
302ai song fetch <taskid> --short

Result: Returns 2 audio URLs (Suno generates 2 variations per request)

πŸ’‘ Song generation tips:

  • Suno (async): Best quality, generates 2 songs per task, supports custom lyrics
  • Minimax (sync): Faster, requires the --lyrics parameter
  • ElevenLabs (sync): Requires --composition-plan instead of lyrics

Example 7: Generate Lyrics

You ask:

Write lyrics for a rock song about freedom

Your AI assistant executes:

# Generate lyrics (compatible with Suno and Minimax)
302ai song lyrics --prompt "rock song about freedom and breaking chains" --provider suno

Result: Returns formatted lyrics in JSON

πŸ“ Using lyrics: The generated lyrics can be passed to song create --lyrics or song generate --lyrics for music generation.

Example 8: Generate Music with Custom Lyrics (Minimax β€” Sync)

You ask:

Generate music for these lyrics: [your lyrics here]

Your AI assistant executes:

# Minimax sync mode β€” returns the audio URL immediately
302ai song generate --lyrics "Your verse here\nChorus here\n..." --provider minimax --model speech-01-turbo

Result: Returns a single audio URL


πŸ“š Installation Guide

This Skill is suitable for all AI coding tools that support the SKILL.md format.

Command-line installation (recommended)

If your tool supports claude skill commands (such as Claude Code, Cursor):

claude skill install github:302ai/302ai-cli-skill/.claude/skills/302ai-cli

Manual installation

For other tools that support SKILL.md:

  1. Clone the 302ai-cli-skill repository or download the 302ai-cli-skill ZIP:

    git clone https://github.com/302ai/302ai-cli-skill.git

    Or click Code β†’ Download ZIP on the 302ai/302ai-cli-skill repository page on GitHub, then extract the files.

  2. Copy the 302ai-cli-skill folder to your tool's skills directory (check your tool's documentation for the location)

  3. Restart your tool


πŸ”„ Update Guide

When new features are released (such as the Music module), follow these steps:

Step 1: Update the Skill

# For Claude Code
claude skill update github:302ai/302ai-cli-skill/.claude/skills/302ai-cli

# For Cursor or other tools
# Re-download SKILL.md and replace the old one

Step 2: Upgrade the CLI package

pip install cli_302ai==1.0.2b2 --upgrade

⚠️ Critical: Both steps are required. Updating only the skill will not enable new modules such as 3D, Search, or Song. The CLI package version must match the skill version.


πŸŽ›οΈ API Key Configuration

Method 1: Environment variable (recommended)

macOS / Linux:

# Add to ~/.bashrc or ~/.zshrc for persistence
export AI302_KEY="your-api-key-here"

Windows PowerShell:

# Add to PowerShell profile for persistence
$env:AI302_KEY = "your-api-key-here"

Windows CMD:

set AI302_KEY=your-api-key-here

Method 2: Per-command flag

302ai image create --prompt "a cat" --api_key "your-api-key-here"

πŸ—οΈ Project Structure

ai302-cli/
β”œβ”€β”€ SKILL.md              # Main skill instructions
β”œβ”€β”€ README.md             # This file (English documentation)
β”œβ”€β”€ README_CN.md          # Chinese documentation
└── references/
    β”œβ”€β”€ image.md          # Image generation commands
    β”œβ”€β”€ video.md          # Video generation commands
    β”œβ”€β”€ tts.md            # Text-to-speech commands
    β”œβ”€β”€ stt.md            # Speech-to-text commands
    β”œβ”€β”€ sfx.md            # Sound effect commands
    β”œβ”€β”€ 3d.md             # 3D model generation
    β”œβ”€β”€ song.md           # Music/song generation
    β”œβ”€β”€ search.md         # Web search
    β”œβ”€β”€ model.md          # Model management
    └── record.md         # Billing queries

🎨 Advanced Usage

Working with Multiple Modules

Your AI assistant can chain multiple operations together:

Generate an image of a sunset, then create an animated video from it, and add background music

The assistant will:

  1. Generate the image using 302ai image create
  2. Use that image for 302ai video create --image
  3. Generate music using 302ai song create
  4. Return all three URLs

Model Selection

If you do not specify a model, the CLI uses smart defaults:

  • Images: flux-1.1-pro (high quality)
  • Videos: kling-v1.6-standard (balanced)
  • TTS: Provider-specific defaults
  • Songs: suno-v4 (Suno) or speech-01 (Minimax)

View available models:

302ai model list t2i    # Image models
302ai model list t2v    # Video models
302ai model list tts    # TTS models

Billing Queries

Track your usage and costs:

# Get billing information for a specific request
302ai record get <request_id>

# Request IDs are available in the JSON output of generation commands

πŸ“š Reference Documentation

Detailed command options, flags, and examples for each module are available in the references/ folder:

File Contents
references/image.md Image generation β€” t2i, i2i, sync/async workflows, all options
references/video.md Video generation β€” t2v, i2v, async-only workflow
references/tts.md Text-to-speech β€” providers, voices, async workflow
references/stt.md Speech-to-text β€” sync transcription, supported formats
references/sfx.md Sound effects β€” async generation, duration options
references/3d.md 3D model generation β€” t23d, i23d, async workflow
references/song.md Music/song generation β€” Suno async, Minimax/ElevenLabs sync, lyrics
references/search.md Web search β€” providers (Tavily, Bocha, Exa), category filters
references/model.md Model management β€” list, set default, get, params
references/record.md Billing queries β€” look up cost and usage by request ID

πŸ“Š Changelog

Version Date Changes
v1.0.2b2 2025-06 Added Song/Music module, package renamed to cli_302ai
v1.0.1b2 2025-06 Added 3D module, Search module
v1.0.1b1 2025-05 Initial release: Image, Video, TTS, STT, SFX

πŸ“ License

MIT


πŸ”— Links


πŸ’¬ Support


⭐ Star this repo if you find it useful!

Made with ❀️ for developers and AI enthusiasts across all platforms

Get Started β€’ View Examples β€’ Read Docs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors