← 返回 Skills 市场
🔌

gpt

作者 RunAPI · GitHub ↗ · v0.2.4 · MIT-0
cross-platform ⚠ pending
40
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install runapi-gpt
功能描述
Call the GPT API (gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.5, gpt-5.3-codex) through RunAPI using the official OpenAI SDK or any OpenAI-compatible client. Use w...
使用说明 (SKILL.md)

GPT on RunAPI

Use the official OpenAI SDK (Python, TypeScript, Ruby) — or any OpenAI-compatible HTTP client — and switch the base URL to https://runapi.ai/v1. The endpoints speak the standard OpenAI protocol: Chat Completions (POST /v1/chat/completions) and the Responses API (POST /v1/responses). No client code changes beyond base_url and api_key.

Setup

OPENAI_API_KEY=YOUR_RUNAPI_TOKEN
OPENAI_BASE_URL=https://runapi.ai/v1

Get a RunAPI API Key at \x3Chttps://runapi.ai/api_keys>.

Language Init
Python OpenAI(api_key=..., base_url="https://runapi.ai/v1")
TypeScript new OpenAI({ apiKey: ..., baseURL: "https://runapi.ai/v1" })
Ruby OpenAI::Client.new(access_token: ..., uri_base: "https://runapi.ai/v1")
curl POST https://runapi.ai/v1/chat/completions (or /v1/responses)

Pick the right endpoint

Model Endpoint to use
gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.4-nano, gpt-5.5, gpt-5.3-codex, gpt-5.3-codex-spark Chat Completions or Responses
gpt-5.2-pro, gpt-5.4-pro, gpt-5.5-pro Responses only (per OpenAI)

Core recipe — Chat Completions

from openai import OpenAI

client = OpenAI(api_key="YOUR_RUNAPI_TOKEN", base_url="https://runapi.ai/v1")

response = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Explain quantum computing simply."}],
    reasoning_effort="high",
)
print(response.choices[0].message.content)
print(response.usage)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "YOUR_RUNAPI_TOKEN",
  baseURL: "https://runapi.ai/v1",
});

const response = await client.chat.completions.create({
  model: "gpt-5.4",
  messages: [{ role: "user", content: "Explain quantum computing simply." }],
});

Core recipe — Responses API

import httpx

response = httpx.post(
    "https://runapi.ai/v1/responses",
    headers={"x-api-key": "YOUR_RUNAPI_TOKEN"},
    json={
        "model": "gpt-5.4",
        "input": "Explain the theory of relativity.",
        "reasoning": {"effort": "medium"},
    },
)
print(response.json())

The Responses API takes input (string or structured), reasoning.effort ("low" / "medium" / "high"), and optional include for thinking blocks.

Streaming

stream = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "Write a haiku about coding."}],
    stream=True,
)
for chunk in stream:
    delta = chunk.choices[0].delta.content
    if delta:
        print(delta, end="", flush=True)
const stream = await client.chat.completions.create({
  model: "gpt-5.4",
  messages: [{ role: "user", content: "Write a haiku about coding." }],
  stream: true,
});

for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0].delta.content ?? "");
}

Streaming runs through a regional edge proxy so the request does not hold a Rails/Puma thread. Long generations should always stream.

Vision / multimodal

{
  "model": "gpt-5.4",
  "messages": [
    {
      "role": "user",
      "content": [
        { "type": "text", "text": "What is in this image?" },
        { "type": "image_url", "image_url": { "url": "https://example.com/img.jpg" } }
      ]
    }
  ]
}

Standard OpenAI multimodal block — works on both Chat Completions and Responses (Responses also accepts structured input items).

Tool use / function calling / web search

{
  "model": "gpt-5.4",
  "messages": [
    { "role": "user", "content": "Find the latest news on RunAPI." }
  ],
  "tools": [
    { "type": "function", "function": { "name": "web_search" } }
  ]
}

web_search is supported across the GPT models above. Custom function tools use the standard OpenAI tools schema.

List models

curl https://runapi.ai/v1/models -H "Authorization: Bearer YOUR_RUNAPI_TOKEN"

Returns OpenAI-compatible model objects. If the API Key has allowed_models restrictions, only permitted models are returned.

Supported models

Model ID API Use when
gpt-5.5 Chat, Responses Latest general model
gpt-5.5-pro Responses only Reasoning-heavy
gpt-5.4 Chat, Responses Production default
gpt-5.4-mini Chat, Responses Cost-optimized
gpt-5.4-nano Chat, Responses Smallest, fastest
gpt-5.4-pro Responses only Reasoning
gpt-5.3-codex Chat, Responses Code generation
gpt-5.3-codex-spark Chat, Responses Faster Codex variant
gpt-5.2 Chat, Responses Cost-effective
gpt-5.2-pro Responses only Reasoning

Connect Codex CLI itself

export OPENAI_BASE_URL=https://runapi.ai/v1
export OPENAI_API_KEY=YOUR_RUNAPI_TOKEN
codex

Agent rules

  • Pro models (gpt-5.*-pro) reject Chat Completions — always use Responses for them. Other models accept either endpoint.
  • Use streaming for any response longer than a few hundred tokens. Do not hold the agent on a long blocking request.
  • reasoning_effort is supported on every GPT model above; default is usually "high" for non-Pro models.
  • Pricing, rate limits, quotas — link to \x3Chttps://runapi.ai/models/gpt.md>, not this skill file.

Routing

  • Model page: \x3Chttps://runapi.ai/models/gpt.md>
  • Provider page: \x3Chttps://runapi.ai/providers/openai.md>
  • Catalog: \x3Chttps://runapi.ai/models.md>
能力标签
requires-sensitive-credentials
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install runapi-gpt
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /runapi-gpt 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.4
Agent-facing CLI-first redesign
元数据
Slug runapi-gpt
版本 0.2.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

gpt 是什么?

Call the GPT API (gpt-5.2, gpt-5.4, gpt-5.4-mini, gpt-5.5, gpt-5.3-codex) through RunAPI using the official OpenAI SDK or any OpenAI-compatible client. Use w... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 40 次。

如何安装 gpt?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install runapi-gpt」即可一键安装,无需额外配置。

gpt 是免费的吗?

是的,gpt 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

gpt 支持哪些平台?

gpt 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 gpt?

由 RunAPI(@runapi-ai)开发并维护,当前版本 v0.2.4。

💬 留言讨论