## Create a quota configuration

`client.quotaManagement.create(QuotaManagementCreateParamsparams, RequestOptionsoptions?): QuotaConfiguration`

**post** `/api/v1/beta/quota-management`

Create a quota configuration for your organization, or for a single project within it.

### Parameters

- `params: QuotaManagementCreateParams`

  - `organization_id: string`

    Query param

  - `setting: "allow_pay_as_you_go" | "limit_daily_usage_credits" | "limit_monthly_usage_credits"`

    Body param: The quota setting to update

    - `"allow_pay_as_you_go"`

    - `"limit_daily_usage_credits"`

    - `"limit_monthly_usage_credits"`

  - `value: number`

    Body param: The value for the setting. For boolean settings, use 1 (enabled) or 0 (disabled). For credit limits, the number of credits allowed in the window; delete the setting to remove the limit. For limits denominated in USD cents, a whole number of dollars (a multiple of 100).

  - `project_id?: string | null`

    Body param: Limit this project on its own. Omit to limit the organization as a whole. A project limit does not inherit from the organization limit: both apply, and whichever is reached first stops the work. Credit limits only.

### Returns

- `QuotaConfiguration`

  Full quota configuration model.

  - `configuration_metadata: Record<string, unknown> | null`

    The configuration metadata

  - `configuration_type: "allow_pay_as_you_go" | "limit_agent_coder_daily_usage_usd" | "limit_agent_deployments" | 61 more`

    The quota configuration type

    - `"allow_pay_as_you_go"`

    - `"limit_agent_coder_daily_usage_usd"`

    - `"limit_agent_deployments"`

    - `"limit_batch_files"`

    - `"limit_classify_input_tokens"`

    - `"limit_daily_usage_credits"`

    - `"limit_directories"`

    - `"limit_directory_files_per_directory"`

    - `"limit_directory_ingest_download_size_bytes"`

    - `"limit_directory_ingest_files"`

    - `"limit_directory_sync_plan_actions"`

    - `"limit_embedding_character"`

    - `"limit_files_per_index"`

    - `"limit_max_monthly_invoice_total_usd_cents"`

    - `"limit_monthly_usage_credits"`

    - `"limit_projects"`

    - `"limit_split_categories"`

    - `"limit_total_file_count"`

    - `"limit_total_file_storage_bytes"`

    - `"limit_users"`

    - `"rate_limit_batch_api_creation"`

    - `"rate_limit_chat_api_message"`

    - `"rate_limit_classify_api_creation"`

    - `"rate_limit_classify_api_list"`

    - `"rate_limit_classify_api_query"`

    - `"rate_limit_concurrent_jobs_in_execution_default"`

    - `"rate_limit_concurrent_jobs_in_execution_doc_ingest"`

    - `"rate_limit_concurrent_jobs_in_execution_metadata_update"`

    - `"rate_limit_default_api_read"`

    - `"rate_limit_default_api_write"`

    - `"rate_limit_directory_file_api_read"`

    - `"rate_limit_directory_file_api_write"`

    - `"rate_limit_directory_ingest_project_job_creation"`

    - `"rate_limit_extract_agent_creation"`

    - `"rate_limit_extract_api_creation"`

    - `"rate_limit_extract_api_list"`

    - `"rate_limit_extract_api_query"`

    - `"rate_limit_extract_concurrent_default"`

    - `"rate_limit_file_api_read"`

    - `"rate_limit_file_api_write"`

    - `"rate_limit_index_v1_pipeline_concurrent_jobs"`

    - `"rate_limit_parse_api_creation"`

    - `"rate_limit_parse_api_list"`

    - `"rate_limit_parse_api_query"`

    - `"rate_limit_parse_concurrent_default"`

    - `"rate_limit_parse_concurrent_pages_agentic"`

    - `"rate_limit_parse_concurrent_pages_agentic_plus"`

    - `"rate_limit_parse_concurrent_pages_cost_effective"`

    - `"rate_limit_parse_concurrent_premium"`

    - `"rate_limit_parse_token_bucket_agentic"`

    - `"rate_limit_parse_token_bucket_agentic_plus"`

    - `"rate_limit_parse_token_bucket_cost_effective"`

    - `"rate_limit_parse_token_bucket_unknown_tier"`

    - `"rate_limit_project_concurrent_jobs"`

    - `"rate_limit_project_concurrent_turbo_jobs"`

    - `"rate_limit_split_api_creation"`

    - `"rate_limit_split_api_query"`

    - `"rate_limit_spreadsheet_api_list"`

    - `"rate_limit_spreadsheet_api_query"`

    - `"rate_limit_spreadsheet_creation"`

    - `"rate_limit_usage_api_query"`

    - `"rate_limit_verify_api_creation"`

    - `"rate_limit_verify_api_list"`

    - `"rate_limit_verify_api_query"`

  - `configuration_value: ConfigurationValue`

    The quota configuration value

    - `numerator: number`

      The rate numerator

    - `denominator?: number | null`

      The rate limit denominator

    - `denominator_units?: "day" | "hour" | "minute" | "second" | null`

      The default rate limit denominator units

      - `"day"`

      - `"hour"`

      - `"minute"`

      - `"second"`

  - `source_id: string`

    The source ID, e.g. the organization ID

  - `source_type: "GLOBAL" | "organization" | "plan_tier" | "project"`

    The source type, e.g. 'organization'

    - `"GLOBAL"`

    - `"organization"`

    - `"plan_tier"`

    - `"project"`

  - `status: "ACTIVE" | "INACTIVE"`

    The status of the quota, i.e. 'ACTIVE' or 'INACTIVE'

    - `"ACTIVE"`

    - `"INACTIVE"`

  - `id?: string | null`

    The system-generated UUID for the quota

  - `created_at?: string | null`

    The creation date of the quota configuration in the database

  - `ended_at?: string | null`

    The end date of the quota

  - `idempotency_key?: string | null`

    The idempotency key

  - `started_at?: string`

    The start date of the quota

  - `updated_at?: string | null`

    The last updated date of the quota configuration in the database

### Example

```typescript
import LlamaCloudAdmin from '@llamaindex/llama-cloud-admin';

const client = new LlamaCloudAdmin({
  apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted
});

const quotaConfiguration = await client.quotaManagement.create({
  organization_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  setting: 'allow_pay_as_you_go',
  value: 0,
});

console.log(quotaConfiguration.source_id);
```

#### Response

```json
{
  "configuration_metadata": {
    "foo": "bar"
  },
  "configuration_type": "allow_pay_as_you_go",
  "configuration_value": {
    "numerator": 0,
    "denominator": 0,
    "denominator_units": "day"
  },
  "source_id": "source_id",
  "source_type": "GLOBAL",
  "status": "ACTIVE",
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "created_at": "2019-12-27T18:11:19.117Z",
  "ended_at": "2019-12-27T18:11:19.117Z",
  "idempotency_key": "idempotency_key",
  "started_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```
