Models

Create model provider config

Changed on

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

Request

  • Base URL
    https://api.omnara.com/v1
  • Auth
    • HTTP bearer
    • or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf

Path parameters

orgID, string required

Organization ID (org_...).

Request body

CreateModelProviderConfigRequest required

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.

name, string required

Human-readable name. Spaces and punctuation are allowed; leading or trailing whitespace and invisible or control characters are not.

preset, 'openai' | 'openrouter' | 'anthropic' | 'openlake'

Built-in provider settings: openai, openrouter, anthropic, or openlake. A preset fills in api_format, api_variant, base_url, endpoint_path, auth_kind, and auth_options, so omit those when using one.

api_format, 'openai-responses' | 'openai-chat-completions' | 'anthropic-messages'

Wire protocol the model endpoint speaks.

api_variant, 'default' | 'openrouter' | 'bedrock'

Provider-specific variant of api_format. Use default unless the endpoint is OpenRouter or Bedrock.

base_url, string

Provider endpoint base URL.

endpoint_path, string

URL path under base_url. Defaults to /responses for OpenAI Responses, /chat/completions for Chat Completions, and /messages for Anthropic Messages.

request_timeout_ms, integer

Total deadline for one provider attempt, including reasoning and response streaming, in milliseconds. Defaults to 3600000 (60 minutes). Retries have separate deadlines.

idle_timeout_ms, integer

Maximum wait for response headers or the next response bytes, in milliseconds. Heartbeats count as activity. Defaults to 300000 (5 minutes). Local response processing does not consume this idle budget.

auth_kind, 'bearer_token' | 'api_key_header' | 'sigv4'

How the credential is sent: as a bearer token, in the header named by auth_options.header_name, or signed with AWS SigV4.

auth_options, object

Non-secret authentication settings. Use an empty object with bearer_token. With api_key_header, set {"header_name":"..."}; Anthropic Messages defaults to {"header_name":"x-api-key"}. With sigv4, set the AWS signing service and region.

credential_secret_id, string required

Secret ID (sec_...).

headers, object

Extra HTTP headers sent with every request to this provider. Values are stored and returned as plain text; use secret_headers for keys and tokens.

secret_headers, object

Extra HTTP headers whose values come from org-owned generic secrets, mapping header names to secret references.

Response

Created route response.

CreateModelProviderConfigResponse required
config, ModelProviderConfig required
model_catalog, ModelCatalog required

The provider's model catalog, obtained by validating the configured credential and probing the provider's /models endpoint. A failed probe does not affect the stored config; treat it as a warning that the base URL or API key may be invalid.

Changes

    • info

      added the new openlake enum value to the request property preset

    • info

      added the optional property model_catalog/models/items/supported_reasoning_efforts to the response with the status

    • info

      added the optional property model_catalog/models/items/supports_reasoning to the response with the status