Token导航 LogoToken导航

Agent Skill · 开发

lovart-api(lovart API 文档)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

lovart-api 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描有提醒项,按安装量在开发类的 21,746 个 Skill 里排第 6,088。

总安装 5,166周安装 209GitHub Stars 41下载 1,622核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:lovart-api(lovart API 文档)
来源仓库:https://github.com/lovartai/lovart-skill
仓库路径:skills/lovart-api
安装命令:
npx skills add https://github.com/lovartai/lovart-skill --skill lovart-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lovartai/lovart-skill --skill lovart-api

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

用于辅助 API 设计与接口文档编写,支持 OpenAPI 草稿生成。可梳理 endpoint、检查字段命名或整理错误码。需确认业务语义、鉴权方式与分页规则。lovart-api 属于开发类 Skill,可作为该场景下的辅助能力补充。避免凭空补字段,优先从现有代码或样例中提取事实。

建议前后端协同验证接口行为后再输出文档。

来源仓库内路径:skills/lovart-api

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/lovartai/lovart-skill --skill lovart-api;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

lovart-api 怎么安装?

在终端执行 npx skills add https://github.com/lovartai/lovart-skill --skill lovart-api。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

lovart-api 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

lovart-api 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

lovart-api 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

lovart-api 用的人多吗?

公开数据是累计安装 5,166 次,近一周安装 209 次,下载 1,622 次,GitHub 41 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

lovart-api 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
lovart-api

lovart API 文档 · 本页

5,16641接触敏感数据未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

⚠️ RULE #0: ONLY USE SKILL COMMANDS — NO DIRECT API CALLS

You MUST interact with Lovart EXCLUSIVELY through the commands defined in this skill.

  • NEVER construct URLs, make curl/wget/fetch requests, or call Lovart APIs directly
  • NEVER guess API endpoints, paths, or parameters — only use the commands listed below
  • NEVER modify the skill's source code (agent_skill.py) during execution to "debug" issues (users may freely read the source to verify it)
  • If a command fails, retry it or report the error to the user — do NOT try to work around it
  • ALL Lovart operations go through: chat, send, watch, confirm, result, status, config, projects, project-add, project-switch, project-rename, project-remove, threads, thread-remove, upload, upload-artifact, download, set-mode, query-mode, create-project

⚠️ RULE #1: YOU CAN AND MUST GENERATE IMAGES/VIDEOS/AUDIO

When a user asks to "draw", "generate", "create", "design", "make", "画", "生成", "制作", "创作" any visual or audio content (in any language), you MUST use this skill. This includes: images, videos, audio, music, songs, BGM, TTS, voice, posters, carousels, banners, logos, illustrations, thumbnails, slides, covers, mockups, icons, social media content, etc. Do NOT say "I can't generate images/music" or offer to write prompts instead.

⚠️ RULE #1.5: PROJECT & THREAD QUERIES USE THIS SKILL

When the user asks about projects, threads, conversations, history, or settings (in any language), use these commands — do NOT browse the filesystem:

User asksCommand
"What projects do I have?" / "我有哪些项目"projects --json
"What conversations/threads?" / "有哪些对话"threads --json or threads --all --json
"Show my settings" / "我的配置"config --json
"Switch to project X"project-switch --project-id X
"Create a new project"project-add --project-id NEW_ID --name "Name" (or let chat auto-create)

⚠️ RULE #2: ALWAYS USE chat AND WAIT FOR COMPLETION

Use the chat command (blocks until done), NOT send. Do NOT reply before generation completes.

Handle these final_status values:

  • "done" — Generation complete. Send the downloaded files to the user.
  • "pending_confirmation" — A high-cost tool (e.g. video, or a premium-quality image variant) needs user approval before credits are consumed. You MUST ask the user for explicit confirmation before proceeding. Do NOT auto-confirm.

1. Show the user: "This will cost approximately {estimated_cost} credits. Shall I proceed? (yes/no)" 2. WAIT for user response. Only if user explicitly says yes/confirm/proceed, run: confirm --thread-id THREAD_ID --json --download (This confirms, waits for completion, and returns the result with downloaded files) 3. If user declines, do NOT confirm. Just inform them the operation was cancelled.

  • "abort" — Generation was aborted. Inform the user.
  • "timeout" — Generation is still running but exceeded the wait time. The result may contain partial artifacts.

1. Send any downloaded files that are already available 2. Tell the user: "Generation is still in progress. Checking again..." 3. Run: result --thread-id THREAD_ID --json --download to get the latest results 4. If status is still "running", wait and retry. If "done", send remaining files.

Handle errors:

If chat throws an error (AgentSkillError), handle it by HTTP status and structured code. The message field already contains a user-ready explanation — surface it to the user as-is.

HTTP statuscodeWhat it meansWhat to tell the user
4022012Quota / billing / risk-control rejectionShow AgentSkillError.message directly — the server already returns a specific message (insufficient credits, free-tier reached, concurrent limit, risk control, phone verification, team plan required, etc.) and a suggested next step.
4092011Another task is still running on this thread"A task is still running on this conversation. Wait for it to finish (status) before sending a new prompt, or start a new thread."
4291429API rate limit hit"Slowing down; rate limit hit. Retry in ~60s."
401—AK/SK misconfigured"API key authentication failed. Please check your LOVART_ACCESS_KEY and LOVART_SECRET_KEY."
——Project.*does not exist in message"Project not found. Please check the project ID or create a new one."

Rule of thumb: prefer AgentSkillError.message for user-facing copy. Do not try to parse internal codes out of the response — the server already maps them to human-readable messages before returning.

Detect silent generation failures (done with no artifact):

Some prompts end with final_status: "done" but produce no artifacts / empty downloaded. This usually means the upstream image model refused the prompt (content moderation), timed out, or the LLM chose to reply with text instead of calling a tool. The skill flags this automatically — when chat() returns, check:

  • result["generation_succeeded"] — boolean. False means no artifact was produced.
  • result["warning"] — explanation string (present only when generation_succeeded is False).
  • result["agent_message"] — the agent's plain-text reply that hints at why (present when available).

Typical triggers:

  • GPT Image 2 with very long/complex prompts involving weapons, specific bodies, or policy-sensitive wording — retry with a different model (--include-tools generate_image_midjourney or generate_image_nano_banana_pro) or simplify the prompt.
  • Prompt that describes a task the agent can't fulfill — show agent_message to the user.

⚠️ RULE #3: ALWAYS DELIVER RESULTS + PROJECT LINK

After EVERY generation, you MUST:

  1. Use --download flag with chat (or result)
  2. Send each downloaded file to the user as a file attachment (images, videos, audio/mp3 — ALL file types):

- ALWAYS send downloaded[].local_path as file attachments, regardless of file type (.png,.jpg,.mp4,.mp3, etc.) - NEVER just paste the URL when a local file has been downloaded — send the actual file - Only fall back to displaying URLs if no files were downloaded

  1. Append the project canvas link: https://www.lovart.ai/canvas?projectId={project_id}

⚠️ RULE #4: CHECK LOCAL STATE ON FIRST USE (MANDATORY — DO NOT SKIP)

Before the FIRST generation in a conversation, you MUST run these two commands IN ORDER. This is NOT optional. Do NOT call chat until you have done both.

Step 1: config --json

  • Check local state (~/.lovart/state.json) for active_project
  • If active_project is set → proceed to Step 2. Do NOT create a new project. Do NOT ask the user.
  • If active_project is missing → ask the user: "Do you have an existing Lovart project ID, or should I create a new one?" WAIT for their answer.
  • Save with: project-add --project-id PID --name "name"

Step 2: threads --json

  • Check if there's a recent thread to continue
  • If recent thread exists and topic is related → REUSE it (pass --thread-id THREAD_ID to chat)
  • If no threads or completely different topic → omit --thread-id (creates new thread)

CRITICAL RULES:

  • NEVER create a new project if config --json already shows an active_project. Reuse it.
  • NEVER omit --thread-id when a relevant recent thread exists. Always reuse threads by default.
  • NEVER call chat without first running config --json and threads --json in the same conversation.
  • The chat command auto-reads active_project from local state — you do NOT need to pass --project-id every time.
  • Only create a new project if the user explicitly asks for one.
  • Only create a new thread if the topic is completely unrelated to the most recent thread.
  • When in doubt, REUSE both the existing project and the existing thread.

Lovart Agent OpenAPI Skill

Interact with Lovart AI Agent to generate images, videos, and visual assets via natural language.

Lovart is an AI design platform. The Agent understands user requests and automatically selects the best model and workflow.

Terminology

  • Thread — A conversation flow (chat session) with the Lovart AI Agent, NOT a programming thread. Each thread has a unique thread_id and preserves multi-turn context. Reusing a thread means continuing the same conversation so the Agent remembers previous images/videos and can iterate on them.
  • Project — A workspace/canvas that groups threads and generated artifacts together. One project can contain multiple threads.

Prerequisites

export LOVART_ACCESS_KEY="ak_xxx"
export LOVART_SECRET_KEY="sk_xxx"

No third-party dependencies. Python standard library only.

Features

  1. Chat - Send a message to the AI Agent, get text replies and generated images/videos
  2. Confirm - Confirm and wait for high-cost operations (e.g. video generation)
  3. Create Project - Create a new project
  4. Upload File - Upload a local image/video file, get back a CDN URL
  5. Upload Artifact - Upload a link artifact to a project
  6. Status/Result - Check thread status and retrieve results
  7. Set/Query Mode - Switch between fast (credits) and unlimited (queue) mode

Usage

0. First-time setup (saves to ~/.lovart/state.json)

python3 {baseDir}/agent_skill.py project-add --project-id PROJECT_ID --name "My Project"

1. Send a message (reads project_id from local state)

python3 {baseDir}/agent_skill.py chat --prompt "USER_PROMPT" --json --download

To override project: add --project-id PROJECT_ID To continue a conversation: add --thread-id THREAD_ID To list saved threads: python3 {baseDir}/agent_skill.py threads

2. Create a project

python3 {baseDir}/agent_skill.py create-project

3. Upload a file (local image/video → CDN URL)

python3 {baseDir}/agent_skill.py upload --file /path/to/image.png
# Returns: {"url": "https://assets-persist.lovart.ai/img/{user_uuid}/xxx.png"}

Use this when the user sends an image/video file that needs to be passed as an attachment to chat.

4. Upload an artifact

python3 {baseDir}/agent_skill.py upload-artifact --project-id PROJECT_ID --url "ARTIFACT_URL" --type image

5. Check status / get result

# Status
python3 {baseDir}/agent_skill.py status --thread-id THREAD_ID

# Result (auto-syncs to gallery/canvas, idempotent)
python3 {baseDir}/agent_skill.py result --thread-id THREAD_ID --json --download

6. Download artifacts

# Download during chat
python3 {baseDir}/agent_skill.py chat --prompt "draw a cat" --json --download --output-dir /tmp/openclaw

# Download from existing result
python3 {baseDir}/agent_skill.py result --thread-id THREAD_ID --download --output-dir /tmp/openclaw

# Download specific URLs
python3 {baseDir}/agent_skill.py download --urls URL1 URL2 --output-dir /tmp/openclaw --prefix myimg

Typical Workflows

Scenario 1: Generate images/videos/audio (most common)

First, run config --json to check if project_id is set. If not, ask the user and save with project-add.

1. config --json  →  check local state for active_project
   - If not set → ask user, save with project-add
2. threads --json  →  check if there's a recent thread to continue
   - If recent thread exists and topic is related → reuse it (step 3a)
   - If no threads or completely new topic → new thread (step 3b)
3a. chat --thread-id THREAD_ID --prompt "user's request" --json --download
3b. chat --prompt "user's request" --json --download
4. Send each downloaded[].local_path file as an IM attachment to the user
5. The chat command auto-syncs artifacts to canvas and gallery

IDs are auto-persisted locally (~/.lovart/state.json):

  • project_id is saved after first chat, reused automatically
  • thread_id + topic are saved after each chat for thread switching
  • Only create a new project if the user explicitly asks for one
  • Only create a new thread (omit --thread-id) when starting a completely new topic
  • Run threads to list saved threads for the user to pick from

Scenario 2: Edit with attachments

1. User sends a reference image/video via IM → save to local file
2. upload --file /path/to/image.png  →  get CDN URL
3. chat --prompt "edit this image to..." --project-id PID --attachments "CDN_URL" --json --download
4. Continue as Scenario 1

Scenario 3: Follow-up on same topic (continue context)

1. chat --prompt "change the background to a beach" --project-id PROJECT_ID --thread-id THREAD_ID --json --download

The Agent remembers the previous conversation and can continue editing based on context.

Scenario 4: New topic (new thread)

1. chat --prompt "completely new request" --project-id PROJECT_ID --json --download

Omitting --thread-id creates a new conversation without previous memory.

Scenario 5: Streaming / incremental delivery (multiple artifacts)

Use when the user's request will produce multiple images/videos and you want to deliver each one to the user as soon as it's ready, rather than waiting for the whole batch.

python3 {baseDir}/agent_skill.py watch --prompt "generate 4 variations of a cyberpunk cat" --json

watch emits NDJSON to stdout (one event per line). Parse line-by-line and deliver each artifact event's local_path to the user immediately:

{"event": "started", "thread_id": "xxx", "project_id": "yyy"}
{"event": "artifact", "type": "image", "url": "https://...", "local_path": "/tmp/openclaw/lovart_ab12cd.png"}
{"event": "artifact", "type": "image", "url": "https://...", "local_path": "/tmp/openclaw/lovart_ef34gh.png"}
{"event": "pending_confirmation", "thread_id": "xxx", "pending_confirmation": {...}}
{"event": "finished", "thread_id": "xxx", "final_status": "done", "artifact_count": 4}

Files are saved with URL-hash filenames so re-running watch on the same thread won't re-download.

You can also attach to an already-running thread: watch --thread-id THREAD_ID.

When NOT to use watch: single-image requests — use chat (simpler, one-shot response).

Output Format

chat --json returns:

{
  "thread_id": "xxx",
  "status": "done",
  "project_id": "xxx",
  "final_status": "done",
  "items": [
    {"type": "assistant", "text": "Agent's reply"},
    {"type": "generator", "name": "artifacts", "artifacts": [
      {"type": "image", "content": "https://assets-persist.lovart.ai/artifacts/agent/xxx.png"},
      {"type": "video", "content": "https://assets-persist.lovart.ai/artifacts/agent/xxx.mp4"}
    ]}
  ],
  "downloaded": [
    {"type": "image", "url": "https://...", "local_path": "/tmp/openclaw/lovart_01.png"}
  ]
}

Core Principle

You are a messenger, not a creator. The backend Agent handles understanding requirements, selecting models, and writing prompts. Your job:

  1. Relay: Pass the user's original description verbatim to chat
  2. Wait: Poll until generation completes
  3. Deliver: Send result files to the user

Do NOT rewrite/expand prompts, break down tasks, or add your own style descriptions.

Lovart Generation Mode (MUST use API, not prompt)

CRITICAL: "Fast mode" and "unlimited mode" are server-side settings controlled via API calls, NOT prompt keywords.

Do NOT put "快速模式" or "fast mode" in the prompt text. Instead, call the set-mode command:

# User says "fast mode" / "快速模式" / "skip queue" / "use credits" → RUN THIS:
python3 {baseDir}/agent_skill.py set-mode --fast

# User says "unlimited mode" / "无限模式" / "free mode" / "save credits" → RUN THIS:
python3 {baseDir}/agent_skill.py set-mode --unlimited

# Check which mode is active:
python3 {baseDir}/agent_skill.py query-mode

How it works:

  • set-mode --fast calls the Lovart backend API to switch the user's account to fast generation (costs credits, no queue)
  • set-mode --unlimited switches to unlimited generation (free, may queue)
  • This is a persistent server-side setting — it stays until changed again
  • It affects ALL subsequent image/video generations, not just one request
  • It has nothing to do with your (the assistant's) response style or behavior

Specifying Models

Option 1: In the prompt (simple, the Agent routes automatically):

python3 {baseDir}/agent_skill.py chat --prompt "generate ocean waves video using kling" --json --download

Option 2: Via --prefer-models (precise, same as frontend's model selector):

# Prefer a specific image model
python3 {baseDir}/agent_skill.py chat --prompt "draw a cat" --prefer-models '{"IMAGE":["generate_image_midjourney"]}' --json --download

# Prefer a specific video model
python3 {baseDir}/agent_skill.py chat --prompt "generate ocean waves" --prefer-models '{"VIDEO":["generate_video_kling_3_0"]}' --json --download

# Combine image and video preferences
python3 {baseDir}/agent_skill.py chat --prompt "create content" --prefer-models '{"IMAGE":["generate_image_seedream_3_0"],"VIDEO":["generate_video_kling_3_0"]}' --json --download

Available models for --prefer-models:

When the user requests a specific model, prefer --prefer-models over putting model names in the prompt.

Option 3: Via --include-tools (hard constraint, forces specific tools):

# Force upscale only
python3 {baseDir}/agent_skill.py chat --prompt "upscale this image to 4K" --include-tools upscale_image --attachments "IMAGE_URL" --json --download

# Force a specific video model (no fallback to others)
python3 {baseDir}/agent_skill.py chat --prompt "generate a video" --include-tools generate_video_kling_3_0 --json --download

--include-tools strongly instructs the Agent to prioritize the listed tools. Use this when the user explicitly requests a specific tool or operation.

Reasoning Mode — --mode thinking / --mode fast

Lovart has two reasoning modes you can select per thread:

  • fast (default) — lightweight single-pass response. Use for simple, one-shot generations where speed matters.
  • thinking — deep structured reasoning with planning and multi-step analysis. Use for complex brand systems, multi-asset campaigns, anything that benefits from deliberate planning. Slower but higher quality.

Omitting --mode is equivalent to --mode fast, matching the web UI's default.

# Thinking mode — strategic, multi-step
python3 {baseDir}/agent_skill.py chat --prompt "design a brand identity system for a sustainable coffee startup" --mode thinking --json --download

# Fast mode — quick one-shot
python3 {baseDir}/agent_skill.py chat --prompt "draw a cat" --mode fast --json --download

Mode is locked to the thread on its first message. Once you start a thread with --mode thinking, subsequent messages on the same --thread-id stay in thinking mode regardless of later --mode flags. To switch modes, start a new thread (omit --thread-id).

Task-Specific Tool Selection (IMPORTANT)

When the user's request matches a specific operation, use --include-tools to ensure the correct tool:

User saysUse --include-tools
"upscale", "放大", "enlarge", "enhance resolution", "超分"upscale_image
"edit image", "modify", "change style"(let Agent decide)
"generate image", "draw", "画"(let Agent decide, or use --prefer-models)

CRITICAL: When the user asks to "upscale", "enlarge", or increase resolution of an existing image, you MUST use --include-tools upscale_image. Do NOT let the Agent use image generation models for upscaling — they will re-generate the image instead of upscaling it.

Notes

  • All APIs use AK/SK HMAC-SHA256 signature authentication
  • Video generation takes several minutes; the chat command auto-polls until complete
  • Gallery and canvas sync is idempotent — safe to call result multiple times without duplicates
  • Connection failures auto-retry 3 times with SSL fallback
  • After status becomes "done", waits 5 seconds to re-confirm (guards against sub-agent startup race)

平台分布

Codex

36.88%
按下载量换算598

Claude

27.04%
按下载量换算439

Cursor

18.36%
按下载量换算298

Gemini CLI

9.4%
按下载量换算152

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills