---
title: "Create Model Group"
method: POST
path: "/access_group/new"
tags: ["model management"]
---

# Create Model Group

`POST /access_group/new`

Create a new access group containing multiple model names.

An access group is a named collection of model groups that can be referenced
by teams/keys for simplified access control.

Example:
```bash
curl -X POST 'http://localhost:4000/access_group/new' \
  -H 'Authorization: Bearer sk-1234' \
  -H 'Content-Type: application/json' \
  -d '{
    "access_group": "production-models",
    "model_names": ["gpt-4", "claude-3-opus", "gemini-pro"]
  }'
```

Parameters:
- access_group: str - The access group name (e.g., "production-models")
- model_names: List[str] - List of existing model groups to include

Returns:
- NewModelGroupResponse with the created access group details

Raises:
- HTTPException 400: If any model names don't exist
- HTTPException 500: If database operations fail

## Request body

- NewModelGroupRequest
  - `access_group` string, required
  - `model_names` string[], nullable
  - `model_ids` string[], nullable

## Response `200`

Successful Response

- NewModelGroupResponse
  - `access_group` string, required
  - `model_names` string[], nullable
  - `model_ids` string[], nullable
  - `models_updated` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/flock/apis/litellm-api.md) · [All operations](https://skmtc.net/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flock/litellm-api/revisions/8fbaab4fc7c5/schema)
