---
title: "Create Partition"
method: POST
path: "/partitions"
tags: ["partitions"]
---

# Create Partition

`POST /partitions`

Create a new partition. Partitions are used to scope documents, connections, and instructions. Partitions must be lowercase alphanumeric and may only include the special characters `_` and `-`. A partition may also be created by creating a document in it. Limits for a partition may optionally be defined when creating.

## Request body

- CreatePartitionParams
  - `name` string, required
  - `description` string, nullable — Description of the partition. Automatic description generation can be enabled in the web dashboard.
  - `pages_hosted_limit_monthly` integer, nullable — Monthly limit of hosted pages added in the current month in the partition.
  - `pages_processed_limit_monthly` integer, nullable — Monthly limit, in pages, for processed documents in the partition.
  - `pages_hosted_limit_max` integer, nullable — Maximum limit, in pages, for hosted documents in the partition.
  - `pages_processed_limit_max` integer, nullable — Maximum limit, in pages, for processed documents in the partition.
  - `audio_processed_limit_monthly` integer, nullable — Monthly limit, in minutes, for audio processing in the partition.
  - `audio_processed_limit_max` integer, nullable — Maximum limit, in minutes, for audio processing in the partition.
  - `video_processed_limit_monthly` integer, nullable — Monthly limit, in minutes, for video processing in the partition.
  - `video_processed_limit_max` integer, nullable — Maximum limit, in minutes, for video processing in the partition.
  - `media_streamed_limit_monthly` integer, nullable — Monthly limit, in MBs, for media streamed from the partition.
  - `media_streamed_limit_max` integer, nullable — Maximum limit, in MBs, for media streamed from the partition.
  - `media_hosted_limit_monthly` integer, nullable — Monthly limit, in MBs, for media hosted in the partition.
  - `media_hosted_limit_max` integer, nullable — Maximum limit, in MBs, for media hosted in the partition.
  - `metadata_schema` object, nullable — Metadata schema for the partition. This is an optional subset of the metadata of documents in the partition, defined as JSON Schema, that can be used in filter generatation. Providing detailed descriptions of the fields in the schema can be helpful for LLMs generating filters dynamically.

## Response `200`

Successful Response

- Partition
  - `name` string, required
  - `is_default` boolean, required
  - `limit_exceeded_at` string, date-time, nullable — Timestamp when the partition exceeded its limits, if applicable.
  - `description` string, nullable, required
  - `context_aware` boolean, required
  - `metadata_schema` object, nullable, required
  - `limits` PartitionLimits, required
    - `pages_processed_limit_monthly` integer, nullable — Monthly limit, in pages, for processed documents in the partition.
    - `pages_hosted_limit_monthly` integer, nullable — Monthly limit of hosted pages added in the current month in the partition.
    - `pages_processed_limit_max` integer, nullable — Maximum limit, in pages, for processed documents in the partition.
    - `pages_hosted_limit_max` integer, nullable — Maximum limit, in pages, for hosted documents in the partition.
    - `video_processed_limit_monthly` integer, nullable — Monthly limit, in minutes, for video processing in the partition.
    - `video_processed_limit_max` integer, nullable — Maximum limit, in minutes, for video processing in the partition.
    - `audio_processed_limit_monthly` integer, nullable — Monthly limit, in minutes, for audio processing in the partition.
    - `audio_processed_limit_max` integer, nullable — Maximum limit, in minutes, for audio processing in the partition.
    - `media_streamed_limit_monthly` integer, nullable — Monthly limit, in MBs, for media streamed from the partition.
    - `media_streamed_limit_max` integer, nullable — Maximum limit, in MBs, for media streamed from the partition.
    - `media_hosted_limit_monthly` integer, nullable — Monthly limit, in MBs, for media hosted in the partition.
    - `media_hosted_limit_max` integer, nullable — Maximum limit, in MBs, for media hosted in the partition.

## Other responses

- `401` — Unauthorized
- `402` — Payment Required
- `422` — Validation Error
- `429` — Too Many Requests
- `500` — Internal Server Error

---

[API](https://skmtc.dev/ragie/apis/ragie-api.md) · [All operations](https://skmtc.dev/ragie/apis/ragie-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ragie/ragie-api/revisions/ffdf960539ca/schema)
