360 Secure SkillHub
360 安全技能中心

deepseek

该工具可通过RunAPI调用DeepSeek系列大模型,兼容OpenAI接口。核心功能涵盖快速文本推理、高质量文本生成、图像理解等,支持流式输出及工具调用。典型场景包括日常文本处理、专业内容创作、图片分析等。输入为对话消息,视觉任务需传入公开图片URL;输出为对应文本结果,可按需选择流式返回,使用前需配置RunAPI密钥及指定Base URL。

runapi-ai
热度 59.24
最近更新 2026-09-24 11:52:15
分类:开发依赖:代码执行 / 第三方 API应用场景:API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add runapi-deepseek
Metadata
name
deepseek
description
Call the DeepSeek API (deepseek-flash, deepseek-v4-pro, deepseek-v4-flash, and deepseek-v4-flash-vision-exp) through RunAPI using OpenAI-compatible Chat Completions and Responses. Use deepseek-flash for the current V4.1 Flash model; the v4 names remain compatibility aliases.
documentation
https://runapi.ai/models/deepseek.md
provider_page
https://runapi.ai/providers/deepseek.md
catalog
https://runapi.ai/models.md
metadata
{"openclaw":{"homepage":"https://runapi.ai/models/deepseek","primaryEnv":"OPENAI_API_KEY","requires":{"env":["OPENAI_API_KEY","OPENAI_BASE_URL"]},"envVars":[{"name":"OPENAI_API_KEY","required":true,"description":"RunAPI API key used by OpenAI-compatible DeepSeek clients."},{"name":"OPENAI_BASE_URL","required":true,"description":"Set to https://runapi.ai/v1 for DeepSeek on RunAPI."}]}}

DeepSeek on RunAPI

Use OpenAI-compatible endpoints at https://runapi.ai/v1 as the primary protocol.

Primary protocol recipe

Authenticate

Set OPENAI_API_KEY to a RunAPI API key and OPENAI_BASE_URL to https://runapi.ai/v1.

Send request

from openai import OpenAI
client = OpenAI(api_key="YOUR_RUNAPI_TOKEN", base_url="https://runapi.ai/v1")
response = client.chat.completions.create(
    model="deepseek-v4-pro",
    messages=[{"role": "user", "content": "Explain this decision."}],
)
print(response.choices[0].message.content)
print(response.usage)

For long output, set stream=True and stream_options={"include_usage": True}; consume through [DONE]. deepseek-v4-flash additionally supports one custom function on Responses; keep automatic tool selection and one serial call/result lifecycle.

For image input, use deepseek-v4-flash-vision-exp with a Chat Completions message content array containing a text part and an image_url part. The image URL must be publicly reachable and use JPEG, PNG, GIF, or WebP.

Verify result

For Chat, require final assistant content, finish_reason, and usage. For Responses, require final output, one usage-bearing response.completed, and [DONE] when streaming.

Stop boundaries

Correct a rejected shape once using the structured error. Retry transport once only before any response or Usage and when replay is safe. Record a terminal error and stop without changing model or protocol. Add tools, reasoning, storage, cache controls, documents, or multimodal input only when the current RunAPI contract verifies the exact model/protocol shape.

Compatibility protocols

Load compatibility protocols only when an existing client requires Anthropic Messages or Gemini contents.

Supported models

Model ID Use when
deepseek-flash Current V4.1 Flash model for fast text and reasoning
deepseek-v4-flash-vision-exp Image input and vision tasks
deepseek-v4-pro Higher-quality verified text workloads
deepseek-v4-flash Compatibility alias for Flash

References