本文へ移動
cccskills
無料GitHub で公開

iflytek-image-understanding

Use when user asks to analyze an image, describe image contents, or answer questions about a picture. iFlytek Image Understanding (图片理解) — analyze and answer questions about images using Spark Vision model. WebSocket API, pure Python stdlib, no pip dependencies.

インストール方法を見る

含まれるファイル(4)

  • SKILL.md5.1 KB
  • _meta.json147 B
  • README.md2.0 KB
  • scripts/image_understanding.py16.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

ifly-image-understanding

Analyze images and answer questions about their content using iFlytek's Spark Vision model (图片理解).

Setup

  1. Create an app at 讯飞控制台 with 图片理解 service enabled
  2. Set environment variables:
    export IFLY_APP_ID="your_app_id"
    export IFLY_API_KEY="your_api_key"
    export IFLY_API_SECRET="your_api_secret"
    

Usage

Describe an image

python3 scripts/image_understanding.py photo.jpg

Ask a question about an image

python3 scripts/image_understanding.py photo.jpg -q "图片里有什么动物?"

Use basic model (lower token cost)

python3 scripts/image_understanding.py photo.jpg --domain general

Options

FlagShortDescription
imageImage file path (.jpg, .jpeg, .png)
--question-qQuestion about the image (default: describe)
--domain-dimagev3 (advanced, default) or general (basic, fixed 273 tokens/image)
--temperature-tSampling temperature (0,1], default 0.5
--max-tokensMax response tokens 1-8192, default 2048
--rawOutput raw WebSocket JSON frames

Examples

# OCR a receipt
python3 scripts/image_understanding.py receipt.png -q "总金额是多少?"

# Identify objects
python3 scripts/image_understanding.py scene.jpg -q "图片中有哪些物体?"

# Low-cost basic model
python3 scripts/image_understanding.py chart.png -q "图表的趋势是什么?" -d general

Notes

  • Image formats: .jpg, .jpeg, .png
  • Max image size: 4MB
  • Max tokens: 8192 (input + output combined)
  • Auth: HMAC-SHA256 signed WebSocket URL
  • Endpoint: wss://spark-api.cn-huabei-1.xf-yun.com/v2.1/image
  • Pure stdlib: No pip dependencies — uses built-in socket + ssl for WebSocket
  • Model versions: imagev3 (advanced, dynamic token cost) vs general (basic, fixed 273 tokens/image)

错误码说明 😢

遇到错误先别慌~看看下面找到对应的解决方法吧!✨

错误码错误信息解决办法
0🎉 成功恭喜你!请求正常完成啦~
10003用户的消息格式有错误检查一下你的请求格式是否正确哦~确保发送的是合法的JSON格式呢!
10004用户数据的schema错误看起来数据结构有点问题~请检查一下字段名称和类型是否正确呀!
10005用户参数值有错误参数值可能不太对呢~仔细核对一下每个参数的有效范围吧!
10006用户并发错误:同一用户不能多处同时连接检测到重复连接啦!请确保只有一个客户端在连接同一个用户ID哦~
10013用户问题涉及敏感信息,审核不通过哎呀,你的问题可能包含了一些不太合适的内容~换个问题试试看吧!
10022模型生产的图片涉及敏感信息,审核不通过生成的图片没有通过审核呢...很抱歉,换张图片再试一下吧!
10029图片任何一边的长度超过12800图片尺寸太大啦!请确保图片宽高都不超过12800像素哦~
10041图片分辨率不符合要求图片尺寸不合适的呢~要求是:50×50 < 图片总像素值 < 6000×6000 哦!
10907Token数量超过上限内容太丰富啦!对话历史+问题的字数太多,需要精简一下输入哦~

💡 小贴士:如果还有其他问题,可以查看官方文档或者联系技术支持哦!


常见问题 🤔

图片理解的主要功能是什么呀?🐱

答:用户输入一张图片和问题,从而识别出图片中的对象、场景等信息,然后回答你的问题~是不是很方便呢!✨

图片理解支持什么应用平台呢?📱

答:目前支持 Web API 应用平台哦!直接在代码里调用就可以啦~

图片理解的文本大小限制多少呀?📝

答:有效内容不能超过 8192 Token 呢~如果超过了就要精简一下输入啦!


更多资源 📚

有更多问题随时来问我哦~祝你使用愉快!🌸

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

生成"黑墨手绘涂鸦"风格的动画架构图/流程图:米色纸面、针管笔墨线、极淡水洗色块、简笔涂鸦图标、序号章、连线上的流动圆点动画、图标微动效。产出单文件自包含动画 HTML(SVG+CSS),可一键导出无缝循环 GIF。当用户想画架构图、流程图、信息图、技术示意图、对比图、pipeline/workflow 可视化,或提到"手绘风""涂鸦风""动图""animated diagram""GIF 架构图"时使用;即使用户没明说要动画,做技术概念科普配图时也应优先考虑本 skill。

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

Use when user asks to review contracts, detect contract risks, or perform compliance checks. 合同智能审核 - 对合同扫描件、图片合同、双语合同进行完整审核。 覆盖 OCR 识别、条款分析、风险检测、合规校对、翻译摘要全流程。 适用于法务审核、采购合同审查、供应链合规检查等场景。 关键词:合同审核、风险检测、条款分析、合规校对、contract review、risk detection。

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

Use when user asks to synthesize speech, convert text to audio, or read text aloud. 讯飞超拟人语音合成 - 支持文本转语音、语音合成(发音人/语速/语调/音量/输出格式)。大模型语音合成技能。语音合成, 文字转语音, 超拟人, TTS.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

Use when user asks to recognize invoices, extract receipt data, or OCR bills and tickets. Recognize and extract structured data from invoices, receipts, and bills using iFlytek OCR API (科大讯飞票据识别). Supports VAT invoices, taxi receipts, train tickets, toll invoices, medical bills, bank receipts, and more.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

ifly-pdf-image-ocr skill supporting both image OCR (AI-powered LLM OCR) and PDF document recognition. Use when user asks to OCR images, extract text from images/PDFs, convert PDF to Word/Markdown, or perform any OCR tasks on images or PDFs. Supports multi-language text extraction, document layout understanding, and various output formats.

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

Ultra-fast speech transcription using iFLYTEK Speed Transcription API. Transcribe audio files (WAV/PCM/MP3) up to 5 hours in ~20 seconds per hour. Supports Chinese, English, and 202+ Chinese dialects with automatic language detection. Use when user asks to transcribe audio files, convert speech to text, or mentions "speed transcription" or "极速转写".

日本語の概要は準備中です。原文の説明を表示しています。

iflytek/iFly-Skills2092026年10月8日 更新

iflytek のスキルをすべて見る

このスキルの問題を報告する