ModelScope
Alibaba's ModelScope inference for Chinese models across chat, embeddings, image, video, audio, and 3D.
Overview
ModelScope (魔搭) is Alibaba's open-source model community and inference platform, with strong coverage of Chinese models across many modalities.
Official Website: https://modelscope.cn Documentation: https://modelscope.cn/docs
Key features
- Chinese excellence — Strong performance on Chinese language tasks
- Chat & vision — Text generation with image understanding on supported models
- Embeddings — Text embeddings for search and retrieval
- Image & video — Image generation and video generation (see Video)
- Audio — TTS and STT on supported models (see Audio)
- 3D generation — Text-to-3D and image-to-3D
- Open source — Many models available with downloadable weights
Using ModelScope with Yunxin
Address ModelScope models with the modelscope/<model> prefix in the model field. You use the same Yunxin base URL (https://api.yuhuanstudio.com/v1) and your sk- API key. Media and 3D features are reached through the corresponding Yunxin endpoints using a ModelScope model id.
Capabilities vary by model. Query GET /v1/models to discover available models and what each one supports.
Usage example
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["YUNXIN_API_KEY"],
base_url="https://api.yuhuanstudio.com/v1"
)
response = client.chat.completions.create(
model="modelscope/model-id",
messages=[{"role": "user", "content": "你好!"}]
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.YUNXIN_API_KEY,
baseURL: "https://api.yuhuanstudio.com/v1",
});
const response = await client.chat.completions.create({
model: "modelscope/model-id",
messages: [{ role: "user", content: "你好!" }],
});
console.log(response.choices[0].message.content);curl https://api.yuhuanstudio.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YUNXIN_API_KEY" \
-d '{
"model": "modelscope/model-id",
"messages": [{"role": "user", "content": "你好!"}]
}'Available models
Query the Models API for the current list and per-model capabilities:
curl "https://api.yuhuanstudio.com/v1/models?provider=modelscope" \
-H "Authorization: Bearer $YUNXIN_API_KEY"Capabilities and pricing are defined per model. Use GET /v1/models (and GET /v1/models/{model_id}) to discover the authoritative model list, supported features, and current rates.
Official resources
How is this guide?