---
title: Einen Guardrail aktualisieren | RunAPI
description: Die angegebenen Sicherheitsregel-Felder ersetzen, während ausgelassene
  Felder unverändert bleiben.
url: https://runapi.ai/de/docs/api/management/guardrails/update.md
canonical: https://runapi.ai/de/docs/api/management/guardrails/update
locale: de
---

> HTML-Version: https://runapi.ai/de/docs/api/management/guardrails/update
> Website-Index für KI-Agenten: https://runapi.ai/llms.txt

# Einen Guardrail aktualisieren

Die angegebenen Sicherheitsregel-Felder ersetzen, während ausgelassene Felder unverändert bleiben.

## Endpunkt

PATCH /api/v1/guardrails/:id

Basis-URL: https://runapi.ai

API-Version: v1

Authentifizierung: Authorization: Bearer YOUR_MANAGEMENT_API_KEY


Autorisierung: Erfordert einen Management-API-Schlüssel mit Kontoadministrator-Rechten.

## Anfrage

Werte nur am angegebenen Anfrage-Speicherort senden.

### JSON-Body

```json
{
  "allowed_models": {
    "description": "Ersatz-Modell-Allowlist.",
    "required": false,
    "type": "array | null"
  },
  "allowed_providers": {
    "description": "Ersatz-Allowlist für Anbieternamen.",
    "required": false,
    "type": "array | null"
  },
  "blocked_models": {
    "description": "Ersatz-Modell-Blocklist.",
    "required": false,
    "type": "array | null"
  },
  "blocked_providers": {
    "description": "Ersatz-Blocklist für Anbieternamen.",
    "required": false,
    "type": "array | null"
  },
  "credit_limit_cents": {
    "description": "Gesamtes Ausgabenlimit in USD-Cent.",
    "required": false,
    "type": "integer | null"
  },
  "credit_limit_reset_interval": {
    "description": "Rücksetzzyklus für die gesamte Ausgabenobergrenze.",
    "enum": [
      "daily",
      "weekly",
      "monthly"
    ],
    "required": false,
    "type": "string | null"
  },
  "description": {
    "description": "Ersatz-Freitextbeschreibung.",
    "required": false,
    "type": "string"
  },
  "enabled": {
    "description": "Ob das Guardrail durchgesetzt wird.",
    "required": false,
    "type": "boolean"
  },
  "model_budgets": {
    "description": "Ersatz-modellspezifische Budget-Regeln.",
    "required": false,
    "type": "array | null"
  },
  "name": {
    "description": "Ersatz-Name der Sicherheitsregel.",
    "required": false,
    "type": "string"
  }
}
```

### Pfadparameter

```json
{
  "id": {
    "description": "Guardrail-Präfix-ID, zum Beispiel guardrail_abc123.",
    "required": true,
    "type": "string"
  }
}
```

## Erfolgsantwort

HTTP 200 - PATCH /api/v1/guardrails/:id

```json
{
  "allowed_models": [
    "gpt-5.4"
  ],
  "allowed_providers": [],
  "assignment_count": 1,
  "blocked_models": [],
  "blocked_providers": [],
  "created_at": "2026-07-27T10:00:00.000Z",
  "credit_limit_cents": 50000,
  "credit_limit_reset_interval": "monthly",
  "description": "Production policy",
  "enabled": false,
  "id": "guardrail_123",
  "model_budgets": [
    {
      "credit_limit_cents": 10000,
      "credit_limit_reset_interval": "monthly",
      "match_mode": "include",
      "models": [
        "gpt-5.4"
      ]
    }
  ],
  "name": "Production budget"
}
```

## Fehlerantwort (401)

HTTP 401

### Antwort-Schema

```json
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Antwortbeispiel

```json
{
  "error": "Authentication required"
}
```

## Fehlerantwort (403)

HTTP 403

### Antwort-Schema

```json
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Antwortbeispiel

```json
{
  "error": "Management API key required"
}
```

## Fehlerantwort (403)

HTTP 403

### Antwort-Schema

```json
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Antwortbeispiel

```json
{
  "error": "Account admin required"
}
```

## Fehlerantwort (400)

HTTP 400

### Antwort-Schema

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Für Menschen lesbare Fehlermeldung.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Menschenlesbare Validierungszusammenfassung.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validierungsmeldungen nach öffentlichem Anforderungsfeld gegliedert, mit einem Array menschenlesbarer Zeichenketten für jedes Feld.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Antwortbeispiel

```json
{
  "error": "page must be an integer"
}
```

## Fehlerantwort (404)

HTTP 404

### Antwort-Schema

```json
{
  "properties": {
    "error": {
      "description": "Für Menschen lesbare Fehlermeldung.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Antwortbeispiel

```json
{
  "error": "Resource not found"
}
```

## Fehlerantwort (422)

HTTP 422

### Antwort-Schema

```json
{
  "properties": {
    "error": {
      "description": "Menschenlesbare Validierungszusammenfassung.",
      "type": "string"
    },
    "errors": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "description": "Validierungsmeldungen nach öffentlichem Anforderungsfeld gegliedert, mit einem Array menschenlesbarer Zeichenketten für jedes Feld.",
      "type": "object"
    }
  },
  "required": [
    "error",
    "errors"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Antwortbeispiel

```json
{
  "error": "Validation failed",
  "errors": {
    "base": [
      "Validation failed"
    ]
  }
}
```

## cURL-Beispiel



### curl

```curl
curl -X PATCH https://runapi.ai/api/v1/guardrails/guardrail_123 \
  -H 'Authorization: Bearer YOUR_MANAGEMENT_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"enabled":false}'
```

## Verwandte Referenz

- [Leitplanken](https://runapi.ai/de/docs/api/management/guardrails.md)
- [Guardrail-Objekt](https://runapi.ai/de/docs/api/management/guardrails/object.md)

---

## Mehr von RunAPI

- [Startseite](https://runapi.ai/de/.md)
- [Modellkatalog](https://runapi.ai/de/models.md)
- [Preise](https://runapi.ai/de/pricing.md)
- [Anbieter](https://runapi.ai/de/models)
- [Dokumentation](https://runapi.ai/de/docs/guides)
- [SDKs](https://runapi.ai/de/sdk.md)
- [CLI](https://runapi.ai/de/cli.md)
- [MCP Server](https://runapi.ai/de/mcp.md)
- [Claude Code vs Cursor](https://runapi.ai/de/claude-code-vs-cursor.md)
- [Cursor API-Einrichtung](https://runapi.ai/de/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/de/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/de/contact.md)
- [Kontakt](https://runapi.ai/de/contact.md)
- [Bedingungen](https://runapi.ai/de/terms.md)
- [Datenschutz](https://runapi.ai/de/privacy.md)
- [Website-Index für KI-Agenten](https://runapi.ai/llms.txt)

Kontakt: contact@runapi.ai

## Strukturierte Daten

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/de",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/de/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/de",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/deicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "de",
    "@type": "TechArticle",
    "headline": "Einen Guardrail aktualisieren",
    "description": "Die angegebenen Sicherheitsregel-Felder ersetzen, während ausgelassene Felder unverändert bleiben.",
    "url": "https://runapi.ai/de/docs/api/management/guardrails/update",
    "mainEntityOfPage": "https://runapi.ai/de/docs/api/management/guardrails/update"
  }
]
```
