skills/958877748/skills/modelscope-api

modelscope-api

SKILL.md

ModelScope API Skill

This skill provides convenient access to ModelScope platform APIs for text generation, image generation, and AI model services.

Quick Start

Text Generation

const { ModelScopeAPI } = require('./scripts/modelscope-api');

// Initialize API client
const api = new ModelScopeAPI('your-modelscope-token');

// Generate text
const response = await api.chatCompletion(
    'Qwen/Qwen3-VL-235B-A22B-Instruct',
    [{ role: 'user', content: 'Hello' }]
);
console.log(response.choices[0].message.content);

// Generate text with streaming
const stream = await api.chatCompletionStream(
    'Qwen/Qwen3-VL-235B-A22B-Instruct',
    [{ role: 'user', content: 'Hello' }]
);
// Process streaming response (see examples.js for full implementation)

Image Generation

// Generate image
const imageUrl = await api.generateImage(
    'Tongyi-MAI/Z-Image-Turbo',
    'A golden cat'
);
console.log('Generated image:', imageUrl);

When to Use References

Key Features

  • Text generation with OpenAI-compatible interface
  • Image generation with asynchronous processing
  • LoRA model support
  • Streaming responses for text generation
  • Batch image generation capabilities
Weekly Installs
1
First Seen
5 days ago
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1