curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configured_model_id": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"default_max_output_tokens": 1073741824,
"supports_tools": true,
"supports_reasoning": true,
"default_reasoning_effort": "<string>",
"supported_reasoning_efforts": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
]
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants"
payload = {
"configured_model_id": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"default_max_output_tokens": 1073741824,
"supports_tools": True,
"supports_reasoning": True,
"default_reasoning_effort": "<string>",
"supported_reasoning_efforts": ["<string>"],
"input_modalities": ["<string>"],
"output_modalities": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configured_model_id: '<string>',
context_window_tokens: 1073741824,
max_output_tokens: 1073741824,
default_max_output_tokens: 1073741824,
supports_tools: true,
supports_reasoning: true,
default_reasoning_effort: '<string>',
supported_reasoning_efforts: ['<string>'],
input_modalities: ['<string>'],
output_modalities: ['<string>']
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configured_model_id' => '<string>',
'context_window_tokens' => 1073741824,
'max_output_tokens' => 1073741824,
'default_max_output_tokens' => 1073741824,
'supports_tools' => true,
'supports_reasoning' => true,
'default_reasoning_effort' => '<string>',
'supported_reasoning_efforts' => [
'<string>'
],
'input_modalities' => [
'<string>'
],
'output_modalities' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants"
payload := strings.NewReader("{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"grant": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"configured_model_id": "<string>",
"supported_reasoning_efforts": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"context_window_tokens": 123,
"max_output_tokens": 123,
"default_max_output_tokens": 123,
"default_cache_retention": "none",
"supports_tools": true,
"supports_reasoning": true,
"default_reasoning_effort": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Create project model grant
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.
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"configured_model_id": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"default_max_output_tokens": 1073741824,
"supports_tools": true,
"supports_reasoning": true,
"default_reasoning_effort": "<string>",
"supported_reasoning_efforts": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
]
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants"
payload = {
"configured_model_id": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"default_max_output_tokens": 1073741824,
"supports_tools": True,
"supports_reasoning": True,
"default_reasoning_effort": "<string>",
"supported_reasoning_efforts": ["<string>"],
"input_modalities": ["<string>"],
"output_modalities": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
configured_model_id: '<string>',
context_window_tokens: 1073741824,
max_output_tokens: 1073741824,
default_max_output_tokens: 1073741824,
supports_tools: true,
supports_reasoning: true,
default_reasoning_effort: '<string>',
supported_reasoning_efforts: ['<string>'],
input_modalities: ['<string>'],
output_modalities: ['<string>']
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'configured_model_id' => '<string>',
'context_window_tokens' => 1073741824,
'max_output_tokens' => 1073741824,
'default_max_output_tokens' => 1073741824,
'supports_tools' => true,
'supports_reasoning' => true,
'default_reasoning_effort' => '<string>',
'supported_reasoning_efforts' => [
'<string>'
],
'input_modalities' => [
'<string>'
],
'output_modalities' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants"
payload := strings.NewReader("{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/projects/{projectID}/model-grants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"configured_model_id\": \"<string>\",\n \"context_window_tokens\": 1073741824,\n \"max_output_tokens\": 1073741824,\n \"default_max_output_tokens\": 1073741824,\n \"supports_tools\": true,\n \"supports_reasoning\": true,\n \"default_reasoning_effort\": \"<string>\",\n \"supported_reasoning_efforts\": [\n \"<string>\"\n ],\n \"input_modalities\": [\n \"<string>\"\n ],\n \"output_modalities\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"grant": {
"id": "<string>",
"org_id": "<string>",
"project_id": "<string>",
"configured_model_id": "<string>",
"supported_reasoning_efforts": [
"<string>"
],
"input_modalities": [
"<string>"
],
"output_modalities": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"context_window_tokens": 123,
"max_output_tokens": 123,
"default_max_output_tokens": 123,
"default_cache_retention": "none",
"supports_tools": true,
"supports_reasoning": true,
"default_reasoning_effort": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>",
"current_digest": "<string>",
"issues": [
{
"path": "<string>",
"message": "<string>",
"line": 2,
"column": 2
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
An opaque Omnara personal or organization bearer token.
Path Parameters
Organization ID (org_...).
^org_[a-z2-7]{26}$Project ID (proj_...).
^proj_[a-z2-7]{26}$Body
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.
^mdl_[a-z2-7]{26}$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.
2 <= x <= 2147483647Optional project output-token ceiling. Cannot exceed the configured model's ceiling.
1 <= x <= 2147483647Optional project default per-request output-token cap.
1 <= x <= 2147483647Prompt-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.
none, short, long Optional project-level tool-use gate. Can disable tools, but cannot enable tools when the configured model does not support them.
Optional project-level reasoning gate. Can disable reasoning, but cannot enable reasoning when the configured model does not support it.
Optional project default reasoning effort.
Optional project subset of configured-model reasoning efforts. If this excludes the inherited default_reasoning_effort, set default_reasoning_effort on the grant too.
Optional project subset of configured-model input types (text, image, or file). Empty or omitted means inherit.
Optional project subset of configured-model output types. Empty or omitted means inherit.
Response
Created route response.
Show child attributes
Show child attributes