---
title: Guardrail 物件 | RunAPI
description: 包含模型、提供商及消費控制的可重用策略。
url: https://runapi.ai/zh-HK/docs/api/management/guardrails/object.md
canonical: https://runapi.ai/zh-HK/docs/api/management/guardrails/object
locale: zh-HK
---

> HTML 版本: https://runapi.ai/zh-HK/docs/api/management/guardrails/object
> 智能代理網站索引: https://runapi.ai/llms.txt

# Guardrail 物件

包含模型、提供商及消費控制的可重用策略。

## 物件欄位

資源可重用物件共享的穩定欄位。

### 護欄

```json
{
  "allowed_models": {
    "description": "允許的模型識別碼。",
    "required": true,
    "type": "array"
  },
  "allowed_providers": {
    "description": "允許的提供商名稱。",
    "required": true,
    "type": "array"
  },
  "assignment_count": {
    "description": "指派此護欄的 API 金鑰或成員數量。",
    "required": true,
    "type": "integer"
  },
  "blocked_models": {
    "description": "已封鎖的模型識別碼。",
    "required": true,
    "type": "array"
  },
  "blocked_providers": {
    "description": "已封鎖的供應商名稱。",
    "required": true,
    "type": "array"
  },
  "created_at": {
    "description": "護欄的建立時間。",
    "required": true,
    "type": "string"
  },
  "credit_limit_cents": {
    "description": "以美分為單位的可選總消費上限。",
    "required": true,
    "type": "integer | null"
  },
  "credit_limit_reset_interval": {
    "description": "總消費上限的重置週期。",
    "enum": [
      "daily",
      "weekly",
      "monthly",
      null
    ],
    "required": true,
    "type": "string | null"
  },
  "description": {
    "description": "可選的護欄描述。",
    "required": true,
    "type": "string | null"
  },
  "enabled": {
    "description": "是否強制執行防護欄。",
    "required": true,
    "type": "boolean"
  },
  "id": {
    "description": "Guardrail 前綴 ID。",
    "required": true,
    "type": "string"
  },
  "model_budgets": {
    "description": "各模型的預算規則。",
    "required": true,
    "type": "array"
  },
  "name": {
    "description": "Guardrail 名稱。",
    "required": true,
    "type": "string"
  }
}
```

## 相關參考資料

- [護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails.md)
- [列出護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails/list.md)
- [擷取護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails/retrieve.md)
- [建立護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails/create.md)
- [更新護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails/update.md)
- [刪除安全護欄](https://runapi.ai/zh-HK/docs/api/management/guardrails/delete.md)

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-HK/.md)
- [模型目錄](https://runapi.ai/zh-HK/models.md)
- [收費](https://runapi.ai/zh-HK/pricing.md)
- [服務商](https://runapi.ai/zh-HK/models)
- [文件](https://runapi.ai/zh-HK/docs/guides)
- [SDK](https://runapi.ai/zh-HK/sdk.md)
- [CLI](https://runapi.ai/zh-HK/cli.md)
- [MCP Server](https://runapi.ai/zh-HK/mcp.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-HK/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-HK/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-HK/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-HK/contact.md)
- [聯絡](https://runapi.ai/zh-HK/contact.md)
- [條款](https://runapi.ai/zh-HK/terms.md)
- [私隱](https://runapi.ai/zh-HK/privacy.md)
- [智能代理網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-HK/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-HK",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-HKicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-HK",
    "@type": "TechArticle",
    "headline": "Guardrail 物件",
    "description": "包含模型、提供商及消費控制的可重用策略。",
    "url": "https://runapi.ai/zh-HK/docs/api/management/guardrails/object",
    "mainEntityOfPage": "https://runapi.ai/zh-HK/docs/api/management/guardrails/object"
  }
]
```
