---
title: "Create project model grant"
method: POST
path: "/orgs/{orgID}/projects/{projectID}/model-grants"
tags: ["Models"]
---

# Create project model grant

`POST /orgs/{orgID}/projects/{projectID}/model-grants`

## Request

- Base URL: `https://api.omnara.com/v1`
- URL: `https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `__Host-omnara_session` and API key in header `X-Omnara-Csrf`

Lets a project's agent configs use a configured model and returns the new grant. Optional overrides can narrow the model for that project (lower token limits, tools or reasoning turned off, fewer reasoning efforts or modalities) and set its per-request defaults within those limits.

## Path parameters

- `orgID` string, required
- `projectID` string, required

## Request body

- CreateProjectModelGrantRequest: Grant a project access to a configured model. Optional fields can narrow the model's limits for this project; omitted fields inherit from the org-level configured model.
  - `configured_model_id` string, required: Configured model the project can use.
  - `context_window_tokens` integer: Optional project context budget for input and output tokens. Cannot exceed the configured model's budget. Triggers compaction when estimated input exceeds the remaining budget after output and safety reserves. The turn fails if compaction cannot make it fit.
  - `max_output_tokens` integer: Optional project output-token ceiling. Cannot exceed the configured model's ceiling.
  - `default_max_output_tokens` integer: Default output allowance per request for this project; agents can raise it up to max_output_tokens. Omit to inherit the configured model's.
  - `default_cache_retention` 'none' | 'short' | 'long': Prompt-cache preference for model requests; `short` when omitted. `short` applies the route's default caching (explicit cache breakpoints where the provider requires them) and, where the route accepts one, a stable conversation key for cache-aware routing. `long` prefers the route's extended cache lifetime where one exists (currently Anthropic's one-hour cache, which on Bedrock requires Claude 4.5 or newer) and behaves like `short` elsewhere. `none` sends no Omnara-managed cache controls or conversation key; providers may still cache prefixes on their own.
  - `supports_tools` boolean: Optional project-level tool-use gate. Can disable tools, but cannot enable tools when the configured model does not support them.
  - `supports_reasoning` boolean: Optional project-level reasoning gate. Can disable reasoning, but cannot enable reasoning when the configured model does not support it.
  - `default_reasoning_effort` string: Reasoning effort this project uses by default, such as low or high. Omit to inherit the configured model's.
  - `supported_reasoning_efforts` string[]: Reasoning efforts this project may use, limited to the configured model's. If this excludes the inherited default_reasoning_effort, set default_reasoning_effort too.
  - `input_modalities` string[]: Optional project subset of configured-model input types (text, image, or file). Empty or omitted means inherit.
  - `output_modalities` string[]: Optional project subset of configured-model output types. Empty or omitted means inherit.

## Response `201`

Created route response.

- ProjectModelGrantEnvelope
  - `grant` ProjectModelGrant, required
    - `id` string, required
    - `org_id` string, required
    - `project_id` string, required: Project ID (proj_...).
    - `configured_model_id` string, required
    - `context_window_tokens` integer, nullable: Project context budget for input and output tokens, or omitted/null to inherit from the configured model. Triggers compaction when estimated input exceeds the remaining budget after output and safety reserves. The turn fails if compaction cannot make it fit.
    - `max_output_tokens` integer, nullable: Project output-token ceiling, or omitted/null to inherit from the configured model.
    - `default_max_output_tokens` integer, nullable: Project default per-request output-token cap, or omitted/null to inherit from the configured model.
    - `default_cache_retention` 'none' | 'short' | 'long': Prompt-cache preference for model requests; `short` when omitted. `short` applies the route's default caching (explicit cache breakpoints where the provider requires them) and, where the route accepts one, a stable conversation key for cache-aware routing. `long` prefers the route's extended cache lifetime where one exists (currently Anthropic's one-hour cache, which on Bedrock requires Claude 4.5 or newer) and behaves like `short` elsewhere. `none` sends no Omnara-managed cache controls or conversation key; providers may still cache prefixes on their own.
    - `supports_tools` boolean, nullable: Project-level tool-use override, or omitted/null to inherit from the configured model.
    - `supports_reasoning` boolean, nullable: Project-level reasoning override, or omitted/null to inherit from the configured model.
    - `default_reasoning_effort` string: Project default reasoning effort, or omitted/empty to inherit from the configured model.
    - `supported_reasoning_efforts` string[], required: Project subset of configured-model reasoning efforts. Empty means inherit. When non-empty, default_reasoning_effort must resolve to one of these values.
    - `input_modalities` string[], required: Project subset of configured-model input types (text, image, or file). Empty means inherit.
    - `output_modalities` string[], required: Project subset of configured-model output types. Empty means inherit.
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: The request was invalid.
- `401`: Authentication is required or invalid.
- `403`: The authenticated principal is not authorized.
- `404`: The requested resource was not found or is not visible.
- `409`: The request conflicts with current resource state or idempotency history.
- `503`: The service dependency required to satisfy the request is unavailable.
- `4XX`: Any other client error. The body carries the shared Error envelope restricted to client error codes; statuses with a dedicated response above are documented precisely.
- `5XX`: Any other server error. The body carries the shared Error envelope restricted to server error codes.

## Changes

- **2026-10-05** `3d9e2cf46e07`: 159 info
  - added the optional property `current_digest` to the response with the `400` status
  - added the optional property `current_digest` to the response with the `401` status
  - added the optional property `current_digest` to the response with the `403` status
  - added the optional property `current_digest` to the response with the `404` status
  - …155 more
  - …this revision’s changelog is incomplete
- **2026-09-28** `acddeb8fc6a5`: 7 warning, 7 info
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `400`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `401`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `403`
  - added the new `upstream_unavailable` enum value to the `code` response property for the response status `404`
  - …10 more
- **2026-09-10** `019b05be2198`: 1 breaking
  - removed the success response with the status `200`
- **2026-09-01** `e4978b047d7a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/omnara/apis/omnara-api-2/changes/orgs/:orgID/projects/:projectID/model-grants/post.md)

---

[API](https://skmtc.dev/omnara/apis/omnara-api-2.md) - [All operations](https://skmtc.dev/omnara/apis/omnara-api-2/llms.txt) - [OpenAPI document](https://skmtc.dev/omnara/apis/omnara-api-2/revisions/343aebb1dff1?raw)
