Access Profiles

Create access profile

Creates a new access profile template. The profile is inactive until attached to a role. No size limits are enforced on create; the limits apply on update.

POST
/api/access-profiles
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

namestring
Lengthlength <= 255
description?string
tags?array<string>
provider_configs?array<object>
budgets?array<object>
rate_limit?object
calendar_aligned?boolean
mcp_tool_groups?array<object>
mcp_servers?array<object>
mcp_tool_overrides?array<object>

Response Body

curl -X POST "https://loading/{AI_GATEWAY_URL}/api/access-profiles" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{
  "access_profile": {
    "id": 0,
    "name": "string",
    "description": "string",
    "is_active": true,
    "version": 0,
    "tags": [
      "string"
    ],
    "provider_configs": [
      {
        "id": 0,
        "provider_name": "string",
        "all_models_allowed": true,
        "allowed_models": [
          "string"
        ],
        "budgets": [
          {
            "id": "string",
            "max_limit": 0,
            "reset_duration": "1h",
            "scope": "string",
            "current_usage": 0,
            "last_reset": "2019-08-24T14:15:22Z"
          }
        ],
        "rate_limit": {
          "id": "string",
          "token_max_limit": 0,
          "token_reset_duration": "1h",
          "request_max_limit": 0,
          "request_reset_duration": "1h",
          "token_current_usage": 0,
          "request_current_usage": 0
        }
      }
    ],
    "budgets": [
      {
        "id": "string",
        "max_limit": 0,
        "reset_duration": "1h",
        "scope": "string",
        "current_usage": 0,
        "last_reset": "2019-08-24T14:15:22Z"
      }
    ],
    "rate_limit": {
      "id": "string",
      "token_max_limit": 0,
      "token_reset_duration": "1h",
      "request_max_limit": 0,
      "request_reset_duration": "1h",
      "token_current_usage": 0,
      "request_current_usage": 0
    },
    "calendar_aligned": true,
    "mcp_tool_groups": [
      {
        "tool_group_id": 0
      }
    ],
    "mcp_servers": [
      {
        "mcp_server_id": "string"
      }
    ],
    "mcp_tool_overrides": [
      {
        "mcp_client_id": "string",
        "tool_name": "string",
        "action": "include"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
Empty
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
On this page

On this page

No Headings