Create model provider config
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"credential_secret_id": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"headers": {},
"secret_headers": {}
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs"
payload = {
"name": "<string>",
"credential_secret_id": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"headers": {},
"secret_headers": {}
}
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({
name: '<string>',
credential_secret_id: '<string>',
base_url: '<string>',
endpoint_path: '<string>',
request_timeout_ms: 1073741824,
idle_timeout_ms: 1073741824,
auth_options: {header_name: '<string>', service: '<string>', region: '<string>'},
headers: {},
secret_headers: {}
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs', 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}/model-provider-configs",
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([
'name' => '<string>',
'credential_secret_id' => '<string>',
'base_url' => '<string>',
'endpoint_path' => '<string>',
'request_timeout_ms' => 1073741824,
'idle_timeout_ms' => 1073741824,
'auth_options' => [
'header_name' => '<string>',
'service' => '<string>',
'region' => '<string>'
],
'headers' => [
],
'secret_headers' => [
]
]),
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}/model-provider-configs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\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}/model-provider-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs")
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 \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"config": {
"id": "<string>",
"org_id": "<string>",
"management_kind": "tenant",
"name": "<string>",
"api_format": "openai-responses",
"api_variant": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 123,
"idle_timeout_ms": 123,
"auth_kind": "<string>",
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"model_catalog": {
"status": "ok",
"models": [
{
"slug": "<string>",
"display_name": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"supports_reasoning": true,
"supported_reasoning_efforts": [
"<string>"
],
"pricing": {
"input_usd_per_million": "<string>",
"output_usd_per_million": "<string>",
"cache_read_input_usd_per_million": "<string>",
"cache_write_input_usd_per_million": "<string>"
}
}
],
"error": "<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>"
}Models
Create model provider config
Create a model provider config, validate the configured credential where the provider exposes a validation endpoint, then probe the provider’s /models endpoint. The result is returned as model_catalog; a failed probe does not fail creation.
POST
/
orgs
/
{orgID}
/
model-provider-configs
Create model provider config
curl --request POST \
--url https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"credential_secret_id": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"headers": {},
"secret_headers": {}
}
'import requests
url = "https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs"
payload = {
"name": "<string>",
"credential_secret_id": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 1073741824,
"idle_timeout_ms": 1073741824,
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"headers": {},
"secret_headers": {}
}
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({
name: '<string>',
credential_secret_id: '<string>',
base_url: '<string>',
endpoint_path: '<string>',
request_timeout_ms: 1073741824,
idle_timeout_ms: 1073741824,
auth_options: {header_name: '<string>', service: '<string>', region: '<string>'},
headers: {},
secret_headers: {}
})
};
fetch('https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs', 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}/model-provider-configs",
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([
'name' => '<string>',
'credential_secret_id' => '<string>',
'base_url' => '<string>',
'endpoint_path' => '<string>',
'request_timeout_ms' => 1073741824,
'idle_timeout_ms' => 1073741824,
'auth_options' => [
'header_name' => '<string>',
'service' => '<string>',
'region' => '<string>'
],
'headers' => [
],
'secret_headers' => [
]
]),
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}/model-provider-configs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\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}/model-provider-configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.omnara.com/v1/orgs/{orgID}/model-provider-configs")
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 \"name\": \"<string>\",\n \"credential_secret_id\": \"<string>\",\n \"base_url\": \"<string>\",\n \"endpoint_path\": \"<string>\",\n \"request_timeout_ms\": 1073741824,\n \"idle_timeout_ms\": 1073741824,\n \"auth_options\": {\n \"header_name\": \"<string>\",\n \"service\": \"<string>\",\n \"region\": \"<string>\"\n },\n \"headers\": {},\n \"secret_headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"config": {
"id": "<string>",
"org_id": "<string>",
"management_kind": "tenant",
"name": "<string>",
"api_format": "openai-responses",
"api_variant": "<string>",
"base_url": "<string>",
"endpoint_path": "<string>",
"request_timeout_ms": 123,
"idle_timeout_ms": 123,
"auth_kind": "<string>",
"auth_options": {
"header_name": "<string>",
"service": "<string>",
"region": "<string>"
},
"credential_secret_id": "<string>",
"headers": {},
"secret_headers": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"model_catalog": {
"status": "ok",
"models": [
{
"slug": "<string>",
"display_name": "<string>",
"context_window_tokens": 1073741824,
"max_output_tokens": 1073741824,
"supports_reasoning": true,
"supported_reasoning_efforts": [
"<string>"
],
"pricing": {
"input_usd_per_million": "<string>",
"output_usd_per_million": "<string>",
"cache_read_input_usd_per_million": "<string>",
"cache_write_input_usd_per_million": "<string>"
}
}
],
"error": "<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
bearerAuthbrowserSessionCookie & csrfHeader
Body
application/json
Connect Omnara to a model API endpoint. Use a preset for built-in providers, or provide api_format and base_url for a custom endpoint. When omitted, endpoint_path and auth settings are filled from api_format.
Response
Created route response.